From 842741c81d025df0e7ea23d08d1ad9e592939e39 Mon Sep 17 00:00:00 2001 From: markjaquith 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: http://svn.automattic.com/wordpress/trunk@4619 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 47a32f7ed..8d727bdf9 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();