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

git-svn-id: http://svn.automattic.com/wordpress/trunk@4551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-11-30 01:54:05 +00:00
parent 832953ade7
commit f068409a63
2 changed files with 12 additions and 4 deletions

View File

@ -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);
@ -889,4 +897,4 @@ class WP_Rewrite {
}
}
?>
?>

View File

@ -3,6 +3,6 @@
// This holds the version number in a separate file so we can bump it without cluttering the SVN
$wp_version = '2.1-alpha3';
$wp_db_version = 3846;
$wp_db_version = 4350;
?>
?>