| 1 | Index: wp-includes/rewrite.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/rewrite.php (revision 17225) |
|---|
| 4 | +++ wp-includes/rewrite.php (working copy) |
|---|
| 5 | @@ -1897,17 +1897,19 @@ |
|---|
| 6 | $this->root = ''; |
|---|
| 7 | if ( $this->using_index_permalinks() ) |
|---|
| 8 | $this->root = $this->index . '/'; |
|---|
| 9 | - |
|---|
| 10 | unset($this->author_structure); |
|---|
| 11 | unset($this->date_structure); |
|---|
| 12 | unset($this->page_structure); |
|---|
| 13 | unset($this->search_structure); |
|---|
| 14 | unset($this->feed_structure); |
|---|
| 15 | unset($this->comment_feed_structure); |
|---|
| 16 | - |
|---|
| 17 | $this->use_trailing_slashes = ( '/' == substr($this->permalink_structure, -1, 1) ); |
|---|
| 18 | |
|---|
| 19 | - $this->use_verbose_page_rules = (bool) preg_match( "#^/%(postname|category|tag|author)%#", $this->permalink_structure ); |
|---|
| 20 | + // Enable generic rules for pages if permalink structure doesn't begin with a wildcard. |
|---|
| 21 | + if ( preg_match("/^[^%]*%(?:postname|category|tag|author)%/", $this->permalink_structure) ) |
|---|
| 22 | + $this->use_verbose_page_rules = true; |
|---|
| 23 | + else |
|---|
| 24 | + $this->use_verbose_page_rules = false; |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | /** |
|---|