ajax_term_search_results
Filter HookDescription
Filters the Ajax term search results.Hook Information
File Location |
wp-admin/includes/ajax-actions.php
View on GitHub
|
Hook Type | Filter |
Line Number | 174 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$results
|
Array of term names. |
WP_Taxonomy
|
$taxonomy_object
|
The taxonomy object. |
string
|
$search
|
The search term. |
Usage Examples
Basic Usage
<?php
// Hook into ajax_term_search_results
add_filter('ajax_term_search_results', 'my_custom_filter', 10, 3);
function my_custom_filter($results, $taxonomy_object, $search) {
// Your custom filtering logic here
return $results;
}
Source Code Context
wp-admin/includes/ajax-actions.php:174
- How this hook is used in WordPress core
<?php
169 *
170 * @param string[] $results Array of term names.
171 * @param WP_Taxonomy $taxonomy_object The taxonomy object.
172 * @param string $search The search term.
173 */
174 $results = apply_filters( 'ajax_term_search_results', $results, $taxonomy_object, $search );
175
176 echo implode( "\n", $results );
177 wp_die();
178 }
179
PHP Documentation
<?php
/**
* Filters the Ajax term search results.
*
* @since 6.1.0
*
* @param string[] $results Array of term names.
* @param WP_Taxonomy $taxonomy_object The taxonomy object.
* @param string $search The search term.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-admin/includes/ajax-actions.php
Related Hooks
Related hooks will be displayed here in future updates.