Allow passing an associative array of query vars to avoid parse_str overhead.
git-svn-id: http://svn.automattic.com/wordpress/trunk@4128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
79e681baf5
commit
51005b397d
|
@ -334,7 +334,10 @@ class WP_Query {
|
||||||
function parse_query ($query) {
|
function parse_query ($query) {
|
||||||
if ( !empty($query) || !isset($this->query) ) {
|
if ( !empty($query) || !isset($this->query) ) {
|
||||||
$this->init();
|
$this->init();
|
||||||
parse_str($query, $qv);
|
if ( is_array($query) )
|
||||||
|
$qv = & $query;
|
||||||
|
else
|
||||||
|
parse_str($query, $qv);
|
||||||
$this->query = $query;
|
$this->query = $query;
|
||||||
$this->query_vars = $qv;
|
$this->query_vars = $qv;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue