#30693 closed defect (bug) (wontfix)
feed-rss2.php redundancy
Reported by: | clodromanean | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0.1 |
Component: | Feeds | Keywords: | |
Focuses: | template | Cc: |
Description (last modified by )
In feed-rss2.php there is the following code segment starting on line 90:
<?php if (get_option('rss_use_excerpt')) : ?> <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description> <?php else : ?> <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
The if and else actions are the same. The statement after the else should be something else, or if unnecessary, should be removed.
Change History (4)
Note: See
TracTickets for help on using
tickets.
Thanks for your report and for contributing to WordPress core!
There's actually another
if/else
-block coming after the theelse
that you mention (six lines of code, down to the line<?php endif; ?>
). Thus, theif
andelse
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 thisif/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! :-)