asp_index_terms

Gives access to taxonomy terms related to post, before they are merged to tokenization

apply_filters('asp_index_terms', $terms, $taxonomy, $post);

Parameters

  • $terms(array) - array of taxonomy term names

  • $taxonomy(string) - taxonomy name

  • $post(WP_Post) - post type object

add_filter( 'asp_index_terms', 'asp_change_terms_index', 10, 3 );
function asp_change_terms_index( $terms, $taxonomy, $post ) {
if ( $taxonomy == 'my_taxonomy' ) {
return array_diff($terms, array('term 1', 'term 2'));
} else {
return $terms;
}
}