WordPress.org

Ready to get started?Download WordPress

Forums

Suggested patch for feed templates (8 posts)

  1. gudlyf
    Member
    Posted 9 years ago #

    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;
    }
    }

  2. NuclearMoose
    Member
    Posted 9 years ago #

    Nice. What's the patch meant to do?

  3. gudlyf
    Member
    Posted 9 years ago #

    It allows you to supply your own versions of wp-rss.php, wp-atom.php, etc. in your theme directory.

  4. mrlarter
    Member
    Posted 8 years ago #

    where would you put this?

  5. Sherwin Techico
    Member
    Posted 8 years ago #

    @mrlarter: Guessing from gudly's post, it would go to "Index: wp-feed.php"

    However, I'm just wondering if this is still true for WP2.0 installs since its been a year since he/she updated the thread. Anyone care to comment on that?

  6. Xander
    Member
    Posted 7 years ago #

    Interesting idea. Anyone using it?

  7. digory
    Member
    Posted 7 years ago #

    I use it.

  8. JackWolfgang
    Member
    Posted 7 years ago #

    I was using it until I upgraded to 2.10, which breaks this hack.

Topic Closed

This topic has been closed to new replies.

About this Topic