Gists

11 months ago
<?php

add_filter( 'facetwp_indexer_is_enabled', function( $enabled ) {
    if ( 'test.php' == FWP()->helper->get_uri() ) { // change test.php
        return false;
    }
    return $enabled;
} );
5 years ago
<?php
/** disables indexer when post an update to acf field group **/
add_filter( 'facetwp_indexer_is_enabled', function( $enabled ) {
    if ( isset( $_POST['action'] ) && 'editpost' == $_POST['action'] &&
        isset( $_POST['post_type'] ) && 'acf-field-group' == $_POST['post_type'] ) {
            return false;
        }
    return $enabled;    
});