asp_index_on_save_stop

Allows stopping the indexing process when a new post is added or an existing one is saved
apply_filters('asp_index_on_save_stop', $stop, $post_id, $the_post, $update);

Parameters

  • $stop (bool) - false by default

  • $post_id (int) - the currently indexed post ID

  • $the_post (object) - the currently indexed post object

  • $update (bool) - If true, then this is a new post, not an existing one

Usage

add_filter( 'asp_index_on_save_stop', 'asp_stop_index_by_id', 10, 4 );
function asp_stop_index_by_id( $stop, $post_id, $the_post, $update ) {
if ( $post_id == 1 || $post_id == 2 )
return true;
return $stop;
}