Make WordPress Core


Ignore:
Timestamp:
10/27/2010 06:16:52 PM (13 years ago)
Author:
scribu
Message:

Move get() and set() methods from WP_Query to WP_Object_Query. See #15032

File:
1 edited

Legend:

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

    r15982 r16018  
    659659 */
    660660class WP_Query extends WP_Object_Query {
    661 
    662     /**
    663      * Query vars set by the user
     661    /**
     662     * Initial query vars
    664663     *
    665664     * @since 1.5.0
     
    668667     */
    669668    var $query;
    670 
    671     /**
    672      * Query vars, after parsing
    673      *
    674      * @since 1.5.0
    675      * @access public
    676      * @var array
    677      */
    678     var $query_vars = array();
    679669
    680670    /**
     
    15831573
    15841574    /**
    1585      * Retrieve query variable.
    1586      *
    1587      * @since 1.5.0
    1588      * @access public
    1589      *
    1590      * @param string $query_var Query variable key.
    1591      * @return mixed
    1592      */
    1593     function get($query_var) {
    1594         if ( isset($this->query_vars[$query_var]) )
    1595             return $this->query_vars[$query_var];
    1596 
    1597         return '';
    1598     }
    1599 
    1600     /**
    1601      * Set query variable.
    1602      *
    1603      * @since 1.5.0
    1604      * @access public
    1605      *
    1606      * @param string $query_var Query variable key.
    1607      * @param mixed $value Query variable value.
    1608      */
    1609     function set($query_var, $value) {
    1610         $this->query_vars[$query_var] = $value;
    1611     }
    1612 
    1613     /**
    16141575     * Retrieve the posts based on query variables.
    16151576     *
Note: See TracChangeset for help on using the changeset viewer.