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
This commit is contained in:
ryan 2007-12-17 06:29:30 +00:00
parent 1d9a4211dc
commit c0d2060f82
1 changed files with 10 additions and 0 deletions

View File

@ -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) {