WordPress.org

Make WordPress Core

Ticket #3214: 3214-208.diff

File 3214-208.diff, 1.5 KB (added by westi, 7 years ago)

Backport of patch to 208

  • wp-includes/classes.php

     
    13191319                if (empty($this->permalink_structure)) { 
    13201320                        return $rewrite; 
    13211321                } 
     1322                //Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category% 
     1323                $default_feeds = array( 'wp-atom.php$'  =>      $this->index .'?feed=atom', 
     1324                                                                'wp-rdf.php$'   =>      $this->index .'?feed=rdf', 
     1325                                                                'wp-rss.php$'   =>      $this->index .'?feed=rss', 
     1326                                                                'wp-rss2.php$'  =>      $this->index .'?feed=rss2', 
     1327                                                                'wp-feed.php$'  =>      $this->index .'?feed=feed', 
     1328                                                                'wp-commentsrss2.php$'  =>      $this->index . '?feed=rss2&withcomments=1'); 
    13221329 
     1330 
    13231331                // Post 
    13241332                $post_rewrite = $this->generate_rewrite_rules($this->permalink_structure); 
    13251333                $post_rewrite = apply_filters('post_rewrite_rules', $post_rewrite); 
     
    13541362                $page_rewrite = apply_filters('page_rewrite_rules', $page_rewrite); 
    13551363 
    13561364                // Put them together. 
    1357                 $this->rules = array_merge($page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $category_rewrite, $author_rewrite, $date_rewrite, $post_rewrite); 
     1365                $this->rules = array_merge($default_feeds, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $category_rewrite, $author_rewrite, $date_rewrite, $post_rewrite); 
    13581366 
    13591367                do_action('generate_rewrite_rules', array(&$this)); 
    13601368                $this->rules = apply_filters('rewrite_rules_array', $this->rules);