mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 07:37:44 +02:00
Store some values in the class for debug purposes.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d6ec4672a7
commit
9426478867
@ -1401,6 +1401,9 @@ class WP {
|
|||||||
|
|
||||||
var $query_vars;
|
var $query_vars;
|
||||||
var $query_string;
|
var $query_string;
|
||||||
|
var $request;
|
||||||
|
var $matched_rule;
|
||||||
|
var $matched_query;
|
||||||
var $did_permalink = false;
|
var $did_permalink = false;
|
||||||
|
|
||||||
function parse_request($extra_query_vars = '') {
|
function parse_request($extra_query_vars = '') {
|
||||||
@ -1451,6 +1454,7 @@ class WP {
|
|||||||
} else {
|
} else {
|
||||||
$request = $req_uri;
|
$request = $req_uri;
|
||||||
}
|
}
|
||||||
|
$this->request = $request;
|
||||||
|
|
||||||
// Look for matches.
|
// Look for matches.
|
||||||
$request_match = $request;
|
$request_match = $request;
|
||||||
@ -1463,11 +1467,14 @@ class WP {
|
|||||||
|
|
||||||
if (preg_match("!^$match!", $request_match, $matches)) {
|
if (preg_match("!^$match!", $request_match, $matches)) {
|
||||||
// Got a match.
|
// Got a match.
|
||||||
|
$this->matched_rule = $match;
|
||||||
|
|
||||||
// Trim the query of everything up to the '?'.
|
// Trim the query of everything up to the '?'.
|
||||||
$query = preg_replace("!^.+\?!", '', $query);
|
$query = preg_replace("!^.+\?!", '', $query);
|
||||||
|
|
||||||
// Substitute the substring matches into the query.
|
// Substitute the substring matches into the query.
|
||||||
eval("\$query = \"$query\";");
|
eval("\$query = \"$query\";");
|
||||||
|
$this->matched_query = $query;
|
||||||
|
|
||||||
// Parse the query.
|
// Parse the query.
|
||||||
parse_str($query, $query_vars);
|
parse_str($query, $query_vars);
|
||||||
|
Loading…
Reference in New Issue
Block a user