query filter-hook . WP 2.1.0
Filters the database query.
Some queries are made before the plugins have been loaded, and thus cannot be filtered with this method.
Usage
add_filter( 'query', 'filter_function_name_9520' ); function filter_function_name_9520( $query ){ // filter... return $query; }
- $query(string)
- Database query.
Changelog
Since 2.1.0 | Introduced. |
Where the hook is called
query
wp-includes/wp-db.php 1916
$query = apply_filters( 'query', $query );
Where in WP core the hook is used WordPress
wp-includes/wp-db.php 2135
add_filter( 'query', array( $this, 'remove_placeholder_escape' ), 0 );