Add überpowerful "query" filter, for SQL queries. fixes #2721

git-svn-id: http://svn.automattic.com/wordpress/trunk@4619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2006-12-07 00:02:03 +00:00
parent 4d72cff3fe
commit 842741c81d
1 changed files with 5 additions and 0 deletions

View File

@ -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();