From 9415bbca12c01c39da58e0ed2c4e6b44ff833e5d Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 30 Nov 2006 18:54:22 +0000 Subject: WP Merge to 4559 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@816 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/rewrite.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'wp-includes/rewrite.php') diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 4b35e3b..2411787 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -700,6 +700,14 @@ class WP_Rewrite { // robots.txt $robots_rewrite = array('robots.txt$' => $this->index . '?robots=1'); + //Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category% + $default_feeds = array( 'wp-atom.php$' => $this->index .'?feed=atom', + 'wp-rdf.php$' => $this->index .'?feed=rdf', + 'wp-rss.php$' => $this->index .'?feed=rss', + 'wp-rss2.php$' => $this->index .'?feed=rss2', + 'wp-feed.php$' => $this->index .'?feed=feed', + 'wp-commentsrss2.php$' => $this->index . '?feed=rss2&withcomments=1'); + // Post $post_rewrite = $this->generate_rewrite_rules($this->permalink_structure, EP_PERMALINK); $post_rewrite = apply_filters('post_rewrite_rules', $post_rewrite); @@ -734,7 +742,7 @@ class WP_Rewrite { $page_rewrite = apply_filters('page_rewrite_rules', $page_rewrite); // Put them together. - $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); + $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); do_action_ref_array('generate_rewrite_rules', array(&$this)); $this->rules = apply_filters('rewrite_rules_array', $this->rules); -- cgit