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

git-svn-id: https://develop.svn.wordpress.org/trunk@16018 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu
2010-10-27 18:16:52 +00:00
parent 9cc035e926
commit 174c0acfb4
4 changed files with 68 additions and 49 deletions

View File

@@ -658,9 +658,8 @@ function the_comment() {
* @since 1.5.0
*/
class WP_Query extends WP_Object_Query {
/**
* Query vars set by the user
* Initial query vars
*
* @since 1.5.0
* @access public
@@ -668,15 +667,6 @@ class WP_Query extends WP_Object_Query {
*/
var $query;
/**
* Query vars, after parsing
*
* @since 1.5.0
* @access public
* @var array
*/
var $query_vars = array();
/**
* Holds the data for a single object that is queried.
*
@@ -1581,35 +1571,6 @@ class WP_Query extends WP_Object_Query {
$this->is_feed = $is_feed;
}
/**
* Retrieve query variable.
*
* @since 1.5.0
* @access public
*
* @param string $query_var Query variable key.
* @return mixed
*/
function get($query_var) {
if ( isset($this->query_vars[$query_var]) )
return $this->query_vars[$query_var];
return '';
}
/**
* Set query variable.
*
* @since 1.5.0
* @access public
*
* @param string $query_var Query variable key.
* @param mixed $value Query variable value.
*/
function set($query_var, $value) {
$this->query_vars[$query_var] = $value;
}
/**
* Retrieve the posts based on query variables.
*