ajax_term_search_results
Filters the Ajax term search results.
Использование
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(строка)
- The search term.
Список изменений
С версии 6.1.0 | Введена. |
Где вызывается хук
ajax_term_search_results
wp-admin/includes/ajax-actions.php 174
$results = apply_filters( 'ajax_term_search_results', $results, $taxonomy_object, $search );