Feed fixes from MooKitty.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2005-01-04 23:30:10 +00:00
parent 40c697b18f
commit acbdd5c97d
3 changed files with 16 additions and 6 deletions

View File

@ -33,9 +33,15 @@ $more = 1;
<issued><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_date_gmt); ?></issued>
<?php the_category_rss('rdf') ?>
<summary type="text/html" mode="escaped"><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></summary>
<?php if (!get_settings('rss_use_excerpt')) { ?>
<?php if (!get_settings('rss_use_excerpt')) : ?>
<?php if ( strlen( $post->post_content ) ) : ?>
<content type="text/html" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
<?php } ?>
<?php else : ?>
<content type="text/html" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></content>
<?php endif; ?>
<?php else : ?>
<content type="text/html" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_excerpt_rss('', 2) ?>]]></content>
<?php endif; ?>
</entry>
<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
</feed>

View File

@ -142,7 +142,7 @@ function the_excerpt() {
echo apply_filters('the_excerpt', get_the_excerpt());
}
function the_excerpt_rss($cut = 0, $encode_html = 0) {
function the_excerpt_rss($cut = 0, $encode_html = FALSE) {
$output = get_the_excerpt(true);
$output = convert_chars($output);
@ -152,7 +152,7 @@ function the_excerpt_rss($cut = 0, $encode_html = 0) {
if ($encode_html == 1) {
$output = wp_specialchars($output);
$cut = 0;
} elseif ($encode_html == 0) {
} elseif ($encode_html === 0) {
$output = make_url_footnote($output);
} elseif ($encode_html == 2) {
$output = strip_tags($output);

View File

@ -38,7 +38,11 @@ $more = 1;
<description><?php the_excerpt_rss('', 2) ?></description>
<?php else : ?>
<description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></description>
<?php if ( strlen( $post->post_content ) ) : ?>
<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
<?php else : ?>
<content:encoded><![CDATA[<?php the_excerpt_rss(); ?>]]></content:encoded>
<?php endif; ?>
<?php endif; ?>
<wfw:commentRSS><?php echo comments_rss(); ?></wfw:commentRSS>
<?php