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.


Top ↑

Parameters

$query

(string)Database query.


Top ↑

Source

File: wp-includes/wp-db.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.