summaryrefslogtreecommitdiffstats
path: root/wp-includes/rewrite.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-09-10 18:26:30 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-09-10 18:26:30 +0000
commitb658e546840b8f23e2a1e413f6510104d73ea91f (patch)
tree1cd6bbbda247b5ae6cfff42f2cea731b4d8b667f /wp-includes/rewrite.php
parent305d7e7228e097a26a98abdb45eb8283df7d5603 (diff)
downloadwordpress-mu-b658e546840b8f23e2a1e413f6510104d73ea91f.tar.gz
wordpress-mu-b658e546840b8f23e2a1e413f6510104d73ea91f.tar.xz
wordpress-mu-b658e546840b8f23e2a1e413f6510104d73ea91f.zip
Sync with WP 2.2.3
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1051 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/rewrite.php')
-rw-r--r--wp-includes/rewrite.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php
index 2f440ab..19d5224 100644
--- a/wp-includes/rewrite.php
+++ b/wp-includes/rewrite.php
@@ -135,6 +135,15 @@ function url_to_postid($url) {
// Substitute the substring matches into the query.
eval("\$query = \"$query\";");
+ // Filter out non-public query vars
+ global $wp;
+ parse_str($query, $query_vars);
+ $query = array();
+ foreach ( $query_vars as $key => $value ) {
+ if ( in_array($key, $wp->public_query_vars) )
+ $query[$key] = $value;
+ }
+ // Do the query
$query = new WP_Query($query);
if ( $query->is_single || $query->is_page )
return $query->post->ID;