From c0b9ade921ba489f23a61095bfa4e532534b59c7 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 7 Dec 2006 00:02:03 +0000 Subject: [PATCH] =?UTF-8?q?Add=20=C3=BCberpowerful=20"query"=20filter,=20f?= =?UTF-8?q?or=20SQL=20queries.=20=20fixes=20#2721?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://develop.svn.wordpress.org/trunk@4619 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/wp-db.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 47a32f7ed8..8d727bdf98 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -139,6 +139,11 @@ class wpdb { // Basic Query - see docs for more detail function query($query) { + // filter the query, if filters are available + // NOTE: some queries are made before the plugins have been loaded, and thus cannot be filtered with this method + if ( function_exists('apply_filters') ) + $query = apply_filters('query', $query); + // initialise return $return_val = 0; $this->flush();