get_omnisearch_form

Filters the Omnisearch search form output.

Description

apply_filters( 'get_omnisearch_form', $ob_get_clean, (array) $args, (array) $defaults ); 

Parameters (3)

0. $ob_get_clean
Ob_get_clean() Omnisearch search form output.
1. $args (array)
Array of arguments to pass to the form to overwrite the default form parameters.
2. $defaults (array)
Array of default form parameters.

Usage

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

Defined (1)

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

/modules/omnisearch/omnisearch-core.php  
  1. return apply_filters( 'get_omnisearch_form', ob_get_clean(), $args, $defaults );