WordPress.org

Make WordPress Core

Changeset 4619


Ignore:
Timestamp:
12/07/2006 12:02:03 AM (11 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-db.php

    r4549 r4619  
    140140
    141141    function query($query) {
     142        // filter the query, if filters are available
     143        // NOTE: some queries are made before the plugins have been loaded, and thus cannot be filtered with this method
     144        if ( function_exists('apply_filters') )
     145            $query = apply_filters('query', $query);
     146
    142147        // initialise return
    143148        $return_val = 0;
Note: See TracChangeset for help on using the changeset viewer.