$term_search_min_chars =
(int) apply_filters( 'term_search_min_chars', 2,
$taxonomy_object,
$search );
/*
* Require $term_search_min_chars chars for matching (default: 2)
* ensure it's a non-negative, non-zero integer.
*/
if ( ( 0 ==
$term_search_min_chars ) || ( strlen( $search ) <
$term_search_min_chars ) ) { wp_die();
} $results =
get_terms( array
( 'taxonomy' =>
$taxonomy,
'name__like' =>
$search,
'fields' => 'names',
'hide_empty' => false,
'number' =>
isset( $_GET['number'
] ) ?
(int) $_GET['number'
] : 0,
) );
/**
* 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.
*/