K
K
Knowledge Base - Ajax Search Pro for WordPress
Buy Ajax Search Pro!
Documentation
Get Support
Search…
Knowledge Base
Safe Coding Guideline
Hooks
Filters
Query & Output
Search Results
CSS & JS
Index Table Related
asp_index_on_save_stop
asp_indexing_keywords
asp_indexing_string_pre_process
asp_indexing_string_post_process
asp_post_content_before_tokenize_clear
asp_post_content_before_tokenize
asp_post_excerpt_before_tokenize
asp_post_title_before_tokenize
asp_file_contents_before_tokenize
asp_post_permalink_before_tokenize
asp_index_terms
asp_post_custom_field_before_tokenize
asp_index_cf_contents_before_tokenize
asp_index_before_shortcode_execution
asp_index_after_shortcode_execution
Templating
Constants
Frontend Filters
Taxonomy Filters
Frontend filters API
Tips & Miscellaneous
Tutorials
Post Types
Taxonomy Terms
WooCommerce
Compatibility
Other
Other
ASP_Query
REST API
Building a custom REST API
Javascript API
Javascript Hooks
Changelog
Powered By
GitBook
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
;
}
Previous
Index Table Related
Next
asp_indexing_keywords
Last modified
2yr ago
Copy link
Outline
Parameters
Usage