From 1d6b027adca05c7506e022096baa92738edea1c0 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 6 Jan 2011 03:59:22 +0000 Subject: [PATCH] Revert [15987] [15988] [15989]. Props SergeyBiryukov. see #9824 fixes #16041 git-svn-id: http://svn.automattic.com/wordpress/trunk@17226 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rewrite.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 741ff3e7f..839d2aeef 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -1897,17 +1897,19 @@ class WP_Rewrite { $this->root = ''; if ( $this->using_index_permalinks() ) $this->root = $this->index . '/'; - unset($this->author_structure); unset($this->date_structure); unset($this->page_structure); unset($this->search_structure); unset($this->feed_structure); unset($this->comment_feed_structure); - $this->use_trailing_slashes = ( '/' == substr($this->permalink_structure, -1, 1) ); - $this->use_verbose_page_rules = (bool) preg_match( "#^/%(postname|category|tag|author)%#", $this->permalink_structure ); + // Enable generic rules for pages if permalink structure doesn't begin with a wildcard. + if ( preg_match("/^[^%]*%(?:postname|category|tag|author)%/", $this->permalink_structure) ) + $this->use_verbose_page_rules = true; + else + $this->use_verbose_page_rules = false; } /**