Make WordPress Core

Ticket #9824: revert-r15987.diff

File revert-r15987.diff, 1.0 KB (added by nacin, 14 years ago)
  • wp-includes/rewrite.php

     
    18971897                $this->root = '';
    18981898                if ( $this->using_index_permalinks() )
    18991899                        $this->root = $this->index . '/';
    1900 
    19011900                unset($this->author_structure);
    19021901                unset($this->date_structure);
    19031902                unset($this->page_structure);
    19041903                unset($this->search_structure);
    19051904                unset($this->feed_structure);
    19061905                unset($this->comment_feed_structure);
    1907 
    19081906                $this->use_trailing_slashes = ( '/' == substr($this->permalink_structure, -1, 1) );
    19091907
    1910                 $this->use_verbose_page_rules = (bool) preg_match( "#^/%(postname|category|tag|author)%#", $this->permalink_structure );
     1908                // Enable generic rules for pages if permalink structure doesn't begin with a wildcard.
     1909                if ( preg_match("/^[^%]*%(?:postname|category|tag|author)%/", $this->permalink_structure) )
     1910                         $this->use_verbose_page_rules = true;
     1911                else
     1912                        $this->use_verbose_page_rules = false;
    19111913        }
    19121914
    19131915        /**