WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/12/2011 01:41:23 AM (9 years ago)
Author:
nacin
Message:

Remove the old root feed files. Bump the db version so rewrite rules can regenerate. Don't add these files to old_files to leave them on existing installs. fixes #18384.

File:
1 edited

Legend:

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

    r18538 r18540  
    14991499        $robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array();
    15001500
    1501         // Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category%
    1502         $default_feeds = array( '.*wp-atom.php$'    =>  $this->index . '?feed=atom',
    1503                                 '.*wp-rdf.php$'     =>  $this->index . '?feed=rss2',
    1504                                 '.*wp-rss.php$'     =>  $this->index . '?feed=rss2',
    1505                                 '.*wp-rss2.php$'    =>  $this->index . '?feed=rss2',
    1506                                 '.*wp-feed.php$'    =>  $this->index . '?feed=feed',
    1507                                 '.*wp-commentsrss2.php$'    =>  $this->index . '?feed=rss2&withcomments=1');
     1501        // Old feed files
     1502        $old_feed_files = array( '.*wp-(atom|rdf|rss|rss2|feed|commentsrss2).php$' => $this->index . '?feed=old' );
    15081503
    15091504        // Registration rules
     
    15591554        // Put them together.
    15601555        if ( $this->use_verbose_page_rules )
    1561             $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $registration_pages, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $post_rewrite, $this->extra_rules);
     1556            $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $old_feed_files, $registration_pages, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $post_rewrite, $this->extra_rules);
    15621557        else
    1563             $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules);
     1558            $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $old_feed_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite,  $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules);
    15641559
    15651560        do_action_ref_array('generate_rewrite_rules', array(&$this));
Note: See TracChangeset for help on using the changeset viewer.