Don't trigger verbose page rules if permalink begins with fixed string. Fixes #9824
git-svn-id: http://svn.automattic.com/wordpress/trunk@15987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3102a4edf5
commit
8feaf39b4d
|
@ -1904,19 +1904,17 @@ class WP_Rewrite {
|
||||||
$this->root = '';
|
$this->root = '';
|
||||||
if ( $this->using_index_permalinks() )
|
if ( $this->using_index_permalinks() )
|
||||||
$this->root = $this->index . '/';
|
$this->root = $this->index . '/';
|
||||||
|
|
||||||
unset($this->author_structure);
|
unset($this->author_structure);
|
||||||
unset($this->date_structure);
|
unset($this->date_structure);
|
||||||
unset($this->page_structure);
|
unset($this->page_structure);
|
||||||
unset($this->search_structure);
|
unset($this->search_structure);
|
||||||
unset($this->feed_structure);
|
unset($this->feed_structure);
|
||||||
unset($this->comment_feed_structure);
|
unset($this->comment_feed_structure);
|
||||||
|
|
||||||
$this->use_trailing_slashes = ( '/' == substr($this->permalink_structure, -1, 1) );
|
$this->use_trailing_slashes = ( '/' == substr($this->permalink_structure, -1, 1) );
|
||||||
|
|
||||||
// Enable generic rules for pages if permalink structure doesn't begin with a wildcard.
|
$this->use_verbose_page_rules = preg_match( "#^/%(postname|category|tag|author)%#", $this->permalink_structure );
|
||||||
if ( preg_match("/^[^%]*%(?:postname|category|tag|author)%/", $this->permalink_structure) )
|
|
||||||
$this->use_verbose_page_rules = true;
|
|
||||||
else
|
|
||||||
$this->use_verbose_page_rules = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue