Support » Fixing WordPress » Suggested patch for feed templates

  • I submitted this to mosquito alread, but here it is anyway:

    Index: wp-feed.php
    ===================================================================
    — wp-feed.php (revision 2403)
    +++ wp-feed.php (working copy)
    @@ -13,23 +13,41 @@
    }

    if ( is_single() || ($withcomments == 1) ) {
    – require(‘wp-commentsrss2.php’);
    + if ( file_exists(TEMPLATEPATH . “/commentsrss2.php”) )
    + require(TEMPLATEPATH . “/commentsrss2.php”);
    + else
    + require(‘wp-commentsrss2.php’);
    } else {
    switch ($feed) {
    case ‘atom’:
    – require(‘wp-atom.php’);
    + if ( file_exists(TEMPLATEPATH . “/atom.php”) )
    + require(TEMPLATEPATH . “/atom.php”);
    + else
    + require(‘wp-atom.php’);
    break;
    case ‘rdf’:
    – require(‘wp-rdf.php’);
    + if ( file_exists(TEMPLATEPATH . “/rdf.php”) )
    + require(TEMPLATEPATH . “/rdf.php”);
    + else
    + require(‘wp-rdf.php’);
    break;
    case ‘rss’:
    – require(‘wp-rss.php’);
    + if ( file_exists(TEMPLATEPATH . “/rss.php”) )
    + require(TEMPLATEPATH . “/rss.php”);
    + else
    + require(‘wp-rss.php’);
    break;
    case ‘rss2’:
    – require(‘wp-rss2.php’);
    + if ( file_exists(TEMPLATEPATH . “/rss2.php”) )
    + require(TEMPLATEPATH . “/rss2.php”);
    + else
    + require(‘wp-rss2.php’);
    break;
    case ‘comments-rss2’:
    – require(‘wp-commentsrss2.php’);
    + if ( file_exists(TEMPLATEPATH . “/commentsrss2.php”) )
    + require(TEMPLATEPATH . “/commentsrss2.php”);
    + else
    + require(‘wp-commentsrss2.php’);
    break;
    }
    }

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Suggested patch for feed templates’ is closed to new replies.