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:
ryan 2006-08-30 04:02:12 +00:00
parent 79e681baf5
commit 51005b397d
1 changed files with 4 additions and 1 deletions

View File

@ -334,7 +334,10 @@ class WP_Query {
function parse_query ($query) {
if ( !empty($query) || !isset($this->query) ) {
$this->init();
parse_str($query, $qv);
if ( is_array($query) )
$qv = & $query;
else
parse_str($query, $qv);
$this->query = $query;
$this->query_vars = $qv;
}