Make WordPress Core

Ticket #5802: make_rss2_default.diff

File make_rss2_default.diff, 4.2 KB (added by filosofo, 17 years ago)
  • wp-includes/default-filters.php

     
    166166if(!defined('DOING_CRON'))
    167167        add_action('init', 'wp_cron');
    168168add_action('do_feed_rdf', 'do_feed_rdf', 10, 1);
     169add_action('do_feed_rss092', 'do_feed_rss092', 10, 1);
    169170add_action('do_feed_rss', 'do_feed_rss', 10, 1);
    170171add_action('do_feed_rss2', 'do_feed_rss2', 10, 1);
    171172add_action('do_feed_atom', 'do_feed_atom', 10, 1);
  • wp-includes/rewrite.php

     
    239239                                        's='
    240240                                        );
    241241
    242         var $feeds = array ( 'feed', 'rdf', 'rss', 'rss2', 'atom' );
     242        var $feeds = array ( 'feed', 'rdf', 'rss', 'rss2', 'rss092', 'atom' );
    243243
    244244        function using_permalinks() {
    245245                if (empty($this->permalink_structure))
     
    552552
    553553        //the main WP_Rewrite function. generate the rules from permalink structure
    554554        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)/?
    556556                $feedregex2 = '';
    557557                foreach ($this->feeds as $feed_name) {
    558558                        $feedregex2 .= $feed_name . '|';
     
    645645                        $pagematch = $match . $pageregex;
    646646                        $pagequery = $index . '?' . $query . '&paged=' . $this->preg_index($num_toks + 1);
    647647
    648                         //create query for /feed/(feed|atom|rss|rss2|rdf)
     648                        //create query for /feed/(feed|atom|rss|rss2|rss092|rdf)
    649649                        $feedmatch = $match . $feedregex;
    650650                        $feedquery = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1);
    651651
    652                         //create query for /(feed|atom|rss|rss2|rdf) (see comment near creation of $feedregex)
     652                        //create query for /(feed|atom|rss|rss2|rss092|rdf) (see comment near creation of $feedregex)
    653653                        $feedmatch2 = $match . $feedregex2;
    654654                        $feedquery2 = $feedindex . '?' . $query . '&feed=' . $this->preg_index($num_toks + 1);
    655655
     
    788788                //Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category%
    789789                $default_feeds = array( 'wp-atom.php$'  =>      $this->index .'?feed=atom',
    790790                                                                'wp-rdf.php$'   =>      $this->index .'?feed=rdf',
    791                                                                 'wp-rss.php$'   =>      $this->index .'?feed=rss',
     791                                                                'wp-rss.php$'   =>      $this->index .'?feed=rss092',
    792792                                                                'wp-rss2.php$'  =>      $this->index .'?feed=rss2',
    793793                                                                'wp-feed.php$'  =>      $this->index .'?feed=feed',
    794794                                                                'wp-commentsrss2.php$'  =>      $this->index . '?feed=rss2&withcomments=1');
  • wp-includes/general-template.php

     
    9191                case 'rss_url':
    9292                        $output = get_feed_link('rss');
    9393                        break;
     94                case 'rss092_url':
     95                        $output = get_feed_link('rss092');
     96                        break;
    9497                case 'rss2_url':
    9598                        $output = get_feed_link('rss2');
    9699                        break;
  • wp-includes/feed.php

     
    110110        echo $comment_text;
    111111}
    112112
    113 function get_the_category_rss($type = 'rss') {
     113function get_the_category_rss($type = '') {
     114        $type = ( empty( $type ) ) ? get_default_feed() : $type;
    114115        $categories = get_the_category();
    115116        $tags = get_the_tags();
    116117        $the_list = '';
     
    142143        return apply_filters('the_category_rss', $the_list, $type);
    143144}
    144145
    145 function the_category_rss($type = 'rss') {
     146function the_category_rss($type = '') {
    146147        echo get_the_category_rss($type);
    147148}
    148149
  • wp-rss.php

     
    22
    33if (empty($wp)) {
    44        require_once('./wp-config.php');
    5         wp('feed=rss');
     5        wp('feed=rss092');
    66}
    77
    88require (ABSPATH . WPINC . '/feed-rss.php');
    99