Revert most of [16018]. See #15032
git-svn-id: http://svn.automattic.com/wordpress/trunk@16352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6267650ddd
commit
cd60463f36
|
@ -8,45 +8,6 @@
|
|||
* @since 3.1.0
|
||||
*/
|
||||
class WP_Object_Query {
|
||||
|
||||
/**
|
||||
* Query vars, after parsing
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
var $query_vars;
|
||||
|
||||
/**
|
||||
* Retrieve query variable.
|
||||
*
|
||||
* @since 3.1.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 3.1.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;
|
||||
}
|
||||
|
||||
/*
|
||||
* Populates the $meta_query property
|
||||
*
|
||||
|
|
|
@ -689,8 +689,9 @@ function the_comment() {
|
|||
* @since 1.5.0
|
||||
*/
|
||||
class WP_Query extends WP_Object_Query {
|
||||
|
||||
/**
|
||||
* Initial query vars
|
||||
* Query vars set by the user
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @access public
|
||||
|
@ -698,6 +699,15 @@ 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.
|
||||
*
|
||||
|
@ -1603,6 +1613,35 @@ 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.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue