From b658e546840b8f23e2a1e413f6510104d73ea91f Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 10 Sep 2007 18:26:30 +0000 Subject: Sync with WP 2.2.3 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1051 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/rewrite.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'wp-includes/rewrite.php') 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; -- cgit