From 20b0153753ad32354f5775ec8e55e31672cc5396 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 6 Sep 2013 17:07:09 +0000 Subject: [PATCH] Document the 'query' filter in wp-db. props natejacobs. see #25229. Built from https://develop.svn.wordpress.org/trunk@25284 git-svn-id: http://core.svn.wordpress.org/trunk@25248 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/wp-db.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 2398002e32..068351b766 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1180,8 +1180,14 @@ class wpdb { function query( $query ) { if ( ! $this->ready ) return false; - - // some queries are made before the plugins have been loaded, and thus cannot be filtered with this method + /** + * Filter the database query. + * + * Some queries are made before the plugins have been loaded, and thus cannot be filtered with this method. + * + * @since 2.1.0 + * @param string $query Database query. + */ $query = apply_filters( 'query', $query ); $return_val = 0;