I want to use the edit-tags.php search function with multiple term id's. For example, if i type into the searchbox something like this: #1245&6832, it should display these two terms in the results table(WP_Terms_List_Table).
I tried to use the pre_get_posts action to get access to the query that is running for the search, but this is just showing me an "empty" query:
add_action('pre_get_posts', 'filter_terms_by_ids' );
function filter_terms_by_ids( $wp_query ) {
global $pagenow;
if($pagenow == 'edit-tags.php' && $_GET['s']):
print_r($wp_query->query_vars);
endif;
}
My idea is to check the $_GET['s'] and if # is the first character, i can modify the query to only include these terms in the search:
if ('#' == substr($_GET['s'],0,1))