ajax_term_search_results
Filters the Ajax term search results.
Usage
add_filter( 'ajax_term_search_results', 'wp_kama_ajax_term_search_results_filter', 10, 3 );
/**
* Function for `ajax_term_search_results` filter-hook.
*
* @param string[] $results Array of term names.
* @param WP_Taxonomy $taxonomy_object The taxonomy object.
* @param string $search The search term.
*
* @return string[]
*/
function wp_kama_ajax_term_search_results_filter( $results, $taxonomy_object, $search ){
// filter...
return $results;
}
- $results(string[])
- Array of term names.
- $taxonomy_object(WP_Taxonomy)
- The taxonomy object.
- $search(string)
- The search term.
Changelog
| Since 6.1.0 | Introduced. |
Where the hook is called
ajax_term_search_results
wp-admin/includes/ajax-actions.php 174
$results = apply_filters( 'ajax_term_search_results', $results, $taxonomy_object, $search );