mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 23:57:41 +02:00
Add überpowerful "query" filter, for SQL queries. fixes #2721
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
49cb0def04
commit
709bdc5d9a
@ -131,6 +131,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
Block a user