Allow passing an associative array of query vars to avoid parse_str overhead.

git-svn-id: https://develop.svn.wordpress.org/trunk@4128 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-08-30 04:02:12 +00:00
parent 0f6f0b20ae
commit 54786c0cc5
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;
}