jetpack_search_terms_<module>

Filter the search terms for a module.

Description

apply_filters( 'jetpack_search_terms_<module>', (string) $module_array_additional_search_queries ); 

Search terms are typically added to the module headers, under Additional Search Queries..

Use syntax: function jetpack_$module_search_terms( $terms ) add_filter( jetpack_search_terms_$module, jetpack_$module_search_terms );

Parameters (1)

0. $module_array_additional_search_queries (string)
The module array additional search queries.

Usage

To run the hook, copy the example below.
  1. $module_array_additional_search_queries = apply_filters( 'jetpack_search_terms_{$module}', $module_array_additional_search_queries ); 
  2.  
  3. if ( !empty( $module_array_additional_search_queries ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the jetpack_search_terms_<module> callback 
  2. function filter_jetpack_search_terms_module( $module_array_additional_search_queries ) { 
  3. // make filter magic happen here... 
  4. return $module_array_additional_search_queries
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "jetpack_search_terms_{$module}", 'filter_jetpack_search_terms_module', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "jetpack_search_terms_{$module}", 'filter_jetpack_search_terms_module', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/class.jetpack-admin.php  
  1. echo apply_filters( 'jetpack_search_terms_' . $module, $module_array['additional_search_queries'] );