Make WordPress Core


Ignore:
Timestamp:
11/30/2006 01:54:05 AM (18 years ago)
Author:
ryan
Message:

Fix feed links when using %category% permalink structure. Props westi. fixes #3214

File:
1 edited

Legend:

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

    r4495 r4551  
    701701        $robots_rewrite = array('robots.txt$' => $this->index . '?robots=1');
    702702
     703        //Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category%
     704        $default_feeds = array( 'wp-atom.php$'  =>  $this->index .'?feed=atom',
     705                                'wp-rdf.php$'   =>  $this->index .'?feed=rdf',
     706                                'wp-rss.php$'   =>  $this->index .'?feed=rss',
     707                                'wp-rss2.php$'  =>  $this->index .'?feed=rss2',
     708                                'wp-feed.php$'  =>  $this->index .'?feed=feed',
     709                                'wp-commentsrss2.php$'  =>  $this->index . '?feed=rss2&withcomments=1');
     710
    703711        // Post
    704712        $post_rewrite = $this->generate_rewrite_rules($this->permalink_structure, EP_PERMALINK);
     
    735743
    736744        // Put them together.
    737         $this->rules = array_merge($robots_rewrite, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $category_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $this->extra_rules);
     745        $this->rules = array_merge($robots_rewrite, $default_feeds, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $category_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $this->extra_rules);
    738746
    739747        do_action_ref_array('generate_rewrite_rules', array(&$this));
Note: See TracChangeset for help on using the changeset viewer.