WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/09/2010 10:19:15 AM (9 years ago)
Author:
scribu
Message:

Get rid of redundant ->tax_query. See #12891

File:
1 edited

Legend:

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

    r15756 r15765  
    565565
    566566    /*
    567      * List of taxonomy queries
    568      *
    569      * A query is an associative array:
    570      * - 'taxonomy' string|array The taxonomy being queried
    571      * - 'terms' string|array The list of terms
    572      * - 'field' string (optional) Which term field is being used.
    573      *      Possible values: 'term_id', 'slug' or 'name'
    574      *      Default: 'slug'
    575      * - 'operator' string (optional)
    576      *      Possible values: 'IN' and 'NOT IN'.
    577      *      Default: 'IN'
    578      * - 'include_children' bool (optional) Whether to include child terms.
    579      *      Default: true
    580      *
    581      * @since 3.1.0
    582      * @access public
    583      * @var array
    584      */
    585     var $tax_query = array();
    586 
    587     /*
    588567     * Populates the $meta_query property
    589568     *
     
    695674     * @since 3.1.0
    696675     *
    697      * @uses $this->tax_query
     676     * @param array $tax_query List of taxonomy queries. A single taxonomy query is an associative array:
     677     * - 'taxonomy' string|array The taxonomy being queried
     678     * - 'terms' string|array The list of terms
     679     * - 'field' string (optional) Which term field is being used.
     680     *      Possible values: 'term_id', 'slug' or 'name'
     681     *      Default: 'slug'
     682     * - 'operator' string (optional)
     683     *      Possible values: 'IN' and 'NOT IN'.
     684     *      Default: 'IN'
     685     * - 'include_children' bool (optional) Whether to include child terms.
     686     *      Default: true
    698687     *
    699688     * @param string $object_id_column
    700689     * @return string
    701690     */
    702     function get_tax_sql( $object_id_column ) {
     691    function get_tax_sql( $tax_query, $object_id_column ) {
    703692        global $wpdb;
    704693
    705694        $sql = array();
    706         foreach ( $this->tax_query as $query ) {
     695        foreach ( $tax_query as $query ) {
    707696            if ( !isset( $query['include_children'] ) )
    708697                $query['include_children'] = true;
Note: See TracChangeset for help on using the changeset viewer.