request
Filters the array of parsed query variables.
Description
Parameters (1)
- 0. $array (callback) =>
array(&$this, 'query_filter')
- The array.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'request', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the request callback
- function filter_request( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'request', 'filter_request', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'request', 'filter_request', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /classes/class-s2-core.php
- add_filter('request', array(&$this, 'query_filter'));