This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Escape and echo search output and pagination | |
echo wp_kses( $content, array( | |
'div' => array( | |
'class' => array(), | |
'id' => array()), | |
'ul' => array('class' => array()), | |
'li' => array( | |
'class' => array(), | |
'p' => array()), | |
'a' => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_acf_save_post_searchwp( $post_id ) { | |
// re-index the post | |
SWP()->purge_post( absint( $post_id ) ); | |
SWP()->trigger_index(); | |
// For some reason the above doesn't work unless there is some sort of output below it?? | |
// The js can be any arbitrary even an alert, which causes an error with acf's redirect function | |
// but still updates the searchwp index | |
// Without the code below, the post is purged - i.e. the old meta is not found, but the new meta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Populate Envira Gallery with ACF gallery field | |
* | |
* Filters the gallery $data and replaces with the image data for our images in the ACF gallery field. | |
* | |
* @uses ACF Pro | |
* @uses Envira Gallery | |
* @param $data | |
* @param $gallery_id | |
*/ |
NewerOlder