query WordPress Filter Hook
A WordPress hook is a PHP function that is executed when a specific action or event occurs in WordPress. Hooks allow you to modify how WordPress behaves without having to edit the core code.
apply_filters( 'query', string $query ) #
Filters the database query.
Description
Some queries are made before the plugins have been loaded, and thus cannot be filtered with this method.
Parameters
- $query
(string)Database query.
Source
File: wp-includes/wp-db.php
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |