Use generic page rewrite rules for compatible permalink strucures. see #3614
git-svn-id: https://develop.svn.wordpress.org/trunk@6398 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
30bb10fba2
commit
7812280d07
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user