WordPress.org

Make WordPress Core

Changeset 15987


Ignore:
Timestamp:
10/27/2010 12:25:03 AM (9 years ago)
Author:
scribu
Message:

Don't trigger verbose page rules if permalink begins with fixed string. Fixes #9824

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/rewrite.php

    r15826 r15987  
    19051905        if ( $this->using_index_permalinks() )
    19061906            $this->root = $this->index . '/';
     1907
    19071908        unset($this->author_structure);
    19081909        unset($this->date_structure);
     
    19111912        unset($this->feed_structure);
    19121913        unset($this->comment_feed_structure);
     1914
    19131915        $this->use_trailing_slashes = ( '/' == substr($this->permalink_structure, -1, 1) );
    19141916
    1915         // Enable generic rules for pages if permalink structure doesn't begin with a wildcard.
    1916         if ( preg_match("/^[^%]*%(?:postname|category|tag|author)%/", $this->permalink_structure) )
    1917              $this->use_verbose_page_rules = true;
    1918         else
    1919             $this->use_verbose_page_rules = false;
     1917        $this->use_verbose_page_rules = preg_match( "#^/%(postname|category|tag|author)%#", $this->permalink_structure );
    19201918    }
    19211919
Note: See TracChangeset for help on using the changeset viewer.