Ticket #5802: make_rss2_default.diff
File make_rss2_default.diff, 4.2 KB (added by , 17 years ago) |
---|
-
wp-includes/default-filters.php
166 166 if(!defined('DOING_CRON')) 167 167 add_action('init', 'wp_cron'); 168 168 add_action('do_feed_rdf', 'do_feed_rdf', 10, 1); 169 add_action('do_feed_rss092', 'do_feed_rss092', 10, 1); 169 170 add_action('do_feed_rss', 'do_feed_rss', 10, 1); 170 171 add_action('do_feed_rss2', 'do_feed_rss2', 10, 1); 171 172 add_action('do_feed_atom', 'do_feed_atom', 10, 1); -
wp-includes/rewrite.php
239 239 's=' 240 240 ); 241 241 242 var $feeds = array ( 'feed', 'rdf', 'rss', 'rss2', ' atom' );242 var $feeds = array ( 'feed', 'rdf', 'rss', 'rss2', 'rss092', 'atom' ); 243 243 244 244 function using_permalinks() { 245 245 if (empty($this->permalink_structure)) … … 552 552 553 553 //the main WP_Rewrite function. generate the rules from permalink structure 554 554 function generate_rewrite_rules($permalink_structure, $ep_mask = EP_NONE, $paged = true, $feed = true, $forcomments = false, $walk_dirs = true, $endpoints = true) { 555 //build a regex to match the feed section of URLs, something like (feed|atom|rss|rss2 )/?555 //build a regex to match the feed section of URLs, something like (feed|atom|rss|rss2|rss092)/? 556 556 $feedregex2 = ''; 557 557 foreach ($this->feeds as $feed_name) { 558 558 $feedregex2 .= $feed_name . '|'; … … 645 645 $pagematch = $match . $pageregex; 646 646 $pagequery = $index . '?' . $query . '&paged=' . $this->preg_index($num_toks + 1); 647 647 648 //create query for /feed/(feed|atom|rss|rss2|r df)648 //create query for /feed/(feed|atom|rss|rss2|rss092|rdf) 649 649 $feedmatch = $match . $feedregex; 650 650 $feedquery = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1); 651 651 652 //create query for /(feed|atom|rss|rss2|r df) (see comment near creation of $feedregex)652 //create query for /(feed|atom|rss|rss2|rss092|rdf) (see comment near creation of $feedregex) 653 653 $feedmatch2 = $match . $feedregex2; 654 654 $feedquery2 = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1); 655 655 … … 788 788 //Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category% 789 789 $default_feeds = array( 'wp-atom.php$' => $this->index .'?feed=atom', 790 790 'wp-rdf.php$' => $this->index .'?feed=rdf', 791 'wp-rss.php$' => $this->index .'?feed=rss ',791 'wp-rss.php$' => $this->index .'?feed=rss092', 792 792 'wp-rss2.php$' => $this->index .'?feed=rss2', 793 793 'wp-feed.php$' => $this->index .'?feed=feed', 794 794 'wp-commentsrss2.php$' => $this->index . '?feed=rss2&withcomments=1'); -
wp-includes/general-template.php
91 91 case 'rss_url': 92 92 $output = get_feed_link('rss'); 93 93 break; 94 case 'rss092_url': 95 $output = get_feed_link('rss092'); 96 break; 94 97 case 'rss2_url': 95 98 $output = get_feed_link('rss2'); 96 99 break; -
wp-includes/feed.php
110 110 echo $comment_text; 111 111 } 112 112 113 function get_the_category_rss($type = 'rss') { 113 function get_the_category_rss($type = '') { 114 $type = ( empty( $type ) ) ? get_default_feed() : $type; 114 115 $categories = get_the_category(); 115 116 $tags = get_the_tags(); 116 117 $the_list = ''; … … 142 143 return apply_filters('the_category_rss', $the_list, $type); 143 144 } 144 145 145 function the_category_rss($type = ' rss') {146 function the_category_rss($type = '') { 146 147 echo get_the_category_rss($type); 147 148 } 148 149 -
wp-rss.php
2 2 3 3 if (empty($wp)) { 4 4 require_once('./wp-config.php'); 5 wp('feed=rss ');5 wp('feed=rss092'); 6 6 } 7 7 8 8 require (ABSPATH . WPINC . '/feed-rss.php'); 9 9