From c0d2060f821395597582cb4b23a3a4adddd3085c Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 17 Dec 2007 06:29:30 +0000 Subject: [PATCH] Use generic page rewrite rules for compatible permalink strucures. see #3614 git-svn-id: http://svn.automattic.com/wordpress/trunk@6398 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rewrite.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 43461a102..47eb85830 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -969,6 +969,16 @@ class WP_Rewrite { unset($this->feed_structure); unset($this->comment_feed_structure); $this->use_trailing_slashes = ( substr($this->permalink_structure, -1, 1) == '/' ) ? true : false; + + // Enable generic rules for pages if permalink structure doesn't begin with a wildcard. + $structure = ltrim($this->permalink_structure, '/'); + if ( 0 === strpos($structure, '%postname%') || + 0 === strpos($structure, '%category%') || + 0 === strpos($structure, '%tag%') || + 0 === strpos($structure, '%author%') ) + $this->use_verbose_page_rules = true; + else + $this->use_verbose_page_rules = false; } function set_permalink_structure($permalink_structure) {