Use the_content_feed() when looking for zero-length post content for RSS2 feeds. Now you can have blank posts with content generated by the_content filters. props SergeyBiryukov. fixes #15604
git-svn-id: https://develop.svn.wordpress.org/trunk@21235 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6ef0b4c765
commit
d3039fdd15
|
@ -41,13 +41,14 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
||||||
|
|
||||||
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
||||||
<?php if (get_option('rss_use_excerpt')) : ?>
|
<?php if (get_option('rss_use_excerpt')) : ?>
|
||||||
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
|
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
|
||||||
<?php if ( strlen( $post->post_content ) > 0 ) : ?>
|
<?php $content = get_the_content_feed('rss2'); ?>
|
||||||
<content:encoded><![CDATA[<?php the_content_feed('rss2') ?>]]></content:encoded>
|
<?php if ( strlen( $content ) > 0 ) : ?>
|
||||||
|
<content:encoded><![CDATA[<?php echo $content; ?>]]></content:encoded>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
|
<content:encoded><![CDATA[<?php the_excerpt_rss(); ?>]]></content:encoded>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss>
|
<wfw:commentRss><?php echo esc_url( get_post_comments_feed_link(null, 'rss2') ); ?></wfw:commentRss>
|
||||||
|
|
Loading…
Reference in New Issue