WordPress.org

Make WordPress Core

Ticket #3214: fix-feed-rewrite-rules.diff

File fix-feed-rewrite-rules.diff, 2.1 KB (added by westi, 8 years ago)

Fix wp-rewrite to handle these feeds correctly

  • wp-includes/rewrite.php

     
    700700                // robots.txt 
    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); 
    705713                $post_rewrite = apply_filters('post_rewrite_rules', $post_rewrite); 
     
    734742                $page_rewrite = apply_filters('page_rewrite_rules', $page_rewrite); 
    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)); 
    740748                $this->rules = apply_filters('rewrite_rules_array', $this->rules); 
     
    889897        } 
    890898} 
    891899 
    892 ?> 
    893  No newline at end of file 
     900?> 
  • wp-includes/version.php

     
    33// This holds the version number in a separate file so we can bump it without cluttering the SVN 
    44 
    55$wp_version = '2.1-alpha3'; 
    6 $wp_db_version = 3846; 
     6$wp_db_version = 4350; 
    77 
    8 ?> 
    9  No newline at end of file 
     8?>