query_string
Deprecated since 2.1.0. It is no longer supported and may be removed in future releases. See query_vars.
Filters the query string before parsing.
Usage
add_filter( 'query_string', 'wp_kama_query_string_filter', 10, 3 );
/**
* Function for `query_string` filter-hook.
*
* @param string $query_string The query string to modify.
* @param $string
* @param $request
*
* @return string
*/
function wp_kama_query_string_filter( $query_string, $string, $request ){
// filter...
return $query_string;
}
- $query_string(string)
- The query string to modify.
- $string
- -
- $request
- -
Changelog
| Since 1.5.0 | Introduced. |
| Deprecated since 2.1.0 | Use {@see 'query_vars'} or {@see 'request'} filters instead. |
Where the hook is called
query_string
wp-includes/class-wp.php 630-635
$this->query_string = apply_filters_deprecated( 'query_string', array( $this->query_string ), '2.1.0', 'query_vars, request' );