Missed a file and an easy mistake.

git-svn-id: http://svn.automattic.com/wordpress/trunk@4804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2007-01-25 08:37:26 +00:00
parent bb65c4f410
commit 4296c78d54
2 changed files with 15 additions and 3 deletions

View File

@ -21,7 +21,7 @@ $more = 1;
<subtitle type="text"><?php bloginfo_rss("description") ?></subtitle>
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></updated>
<generator url="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>
<generator uri="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>
<link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" />
<id><?php bloginfo('atom_url'); ?></id>
@ -40,9 +40,9 @@ $more = 1;
<updated><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></updated>
<published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>
<?php the_category_rss('atom') ?>
<summary type="<?php bloginfo('html_type'); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
<summary type="<?php html_type_rss(); ?>"><![CDATA[<?php the_excerpt_rss(); ?>]]></summary>
<?php if ( !get_option('rss_use_excerpt') ) : ?>
<content type="<?php bloginfo('html_type'); ?>" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
<content type="<?php html_type_rss(); ?>" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
<?php endif; ?>
<?php rss_enclosure(); ?>
<?php do_action('atom_entry'); ?>

View File

@ -146,11 +146,14 @@ function get_category_rss_link($echo = false, $cat_ID, $category_nicename) {
function get_the_category_rss($type = 'rss') {
$categories = get_the_category();
$home = get_bloginfo_rss('home');
$the_list = '';
foreach ( (array) $categories as $category ) {
$category->cat_name = convert_chars($category->cat_name);
if ( 'rdf' == $type )
$the_list .= "\n\t\t<dc:subject><![CDATA[$category->cat_name]]></dc:subject>\n";
if ( 'atom' == $type )
$the_list .= "<category scheme='$home' term='$category->cat_name' />";
else
$the_list .= "\n\t\t<category><![CDATA[$category->cat_name]]></category>\n";
}
@ -162,6 +165,15 @@ function the_category_rss($type = 'rss') {
echo get_the_category_rss($type);
}
function html_type_rss() {
$type = bloginfo('html_type');
if ( strstr( $type, 'xhtml' ) )
$type = 'xhtml';
else
$type = 'html';
echo $type;
}
function rss_enclosure() {
global $id, $post;