Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #30693


Ignore:
Timestamp:
12/12/2014 05:56:29 PM (11 years ago)
Author:
TobiasBg
Comment:

Thanks for your report and for contributing to WordPress core!

There's actually another if/else-block coming after the the else that you mention (six lines of code, down to the line <?php endif; ?>). Thus, the if and else actions are in fact different here.

Now, there is a redundancy with the <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description> line, which technically could be moved out of this if/else check. I don't really think that this brings advantages here though. It might just make the code harder to comprehend.

Of course, if you want, create a patch for this and I'm sure a core committer will take a second look! :-)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30693

    • Property Keywords needs-patch good-first-bug 2nd-opinion added
    • Property Focuses template added
    • Property Component changed from General to Feeds
  • Ticket #30693 – Description

    initial v1  
    11In feed-rss2.php there is the following code segment starting on line 90:
    2 
     2{{{
    33<?php if (get_option('rss_use_excerpt')) : ?>
    44                <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
    55<?php else : ?>
    66                <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
    7 
     7}}}
    88The if and else actions are the same. The statement after the else should be something else, or if unnecessary, should be removed.