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:
parent
4d72cff3fe
commit
842741c81d
|
@ -139,6 +139,11 @@ class wpdb {
|
||||||
// Basic Query - see docs for more detail
|
// Basic Query - see docs for more detail
|
||||||
|
|
||||||
function query($query) {
|
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
|
// initialise return
|
||||||
$return_val = 0;
|
$return_val = 0;
|
||||||
$this->flush();
|
$this->flush();
|
||||||
|
|
Loading…
Reference in New Issue