WordPress.org

Make WordPress Core

Changeset 6398


Ignore:
Timestamp:
12/17/2007 06:29:30 AM (10 years ago)
Author:
ryan
Message:

Use generic page rewrite rules for compatible permalink strucures. see #3614

File:
1 edited

Legend:

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

    r6364 r6398  
    970970        unset($this->comment_feed_structure);
    971971        $this->use_trailing_slashes = ( substr($this->permalink_structure, -1, 1) == '/' ) ? true : false;
     972
     973        // Enable generic rules for pages if permalink structure doesn't begin with a wildcard.
     974        $structure = ltrim($this->permalink_structure, '/');
     975        if ( 0 === strpos($structure, '%postname%') ||
     976             0 === strpos($structure, '%category%') ||
     977             0 === strpos($structure, '%tag%') ||
     978             0 === strpos($structure, '%author%') )
     979             $this->use_verbose_page_rules = true;
     980        else
     981            $this->use_verbose_page_rules = false;
    972982    }
    973983
Note: See TracChangeset for help on using the changeset viewer.