Show more relevant titles (current category, date, etc.) in feed titles. fixes #1790

git-svn-id: http://svn.automattic.com/wordpress/trunk@5132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n 2007-03-29 01:29:09 +00:00
parent 5248f2a89b
commit 5b446f7cf7
6 changed files with 9 additions and 4 deletions

View File

@ -11,7 +11,7 @@ $more = 1;
xml:base="<?php bloginfo_rss('home') ?>/wp-atom.php" xml:base="<?php bloginfo_rss('home') ?>/wp-atom.php"
<?php do_action('atom_ns'); ?> <?php do_action('atom_ns'); ?>
> >
<title type="text"><?php bloginfo_rss('name') ?></title> <title type="text"><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
<subtitle type="text"><?php bloginfo_rss("description") ?></subtitle> <subtitle type="text"><?php bloginfo_rss("description") ?></subtitle>
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></updated> <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></updated>

View File

@ -15,7 +15,7 @@ $more = 1;
<?php do_action('rdf_ns'); ?> <?php do_action('rdf_ns'); ?>
> >
<channel rdf:about="<?php bloginfo_rss("url") ?>"> <channel rdf:about="<?php bloginfo_rss("url") ?>">
<title><?php bloginfo_rss('name') ?></title> <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
<link><?php bloginfo_rss('url') ?></link> <link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss('description') ?></description> <description><?php bloginfo_rss('description') ?></description>
<dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date> <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></dc:date>

View File

@ -7,7 +7,7 @@ $more = 1;
<!-- generator="wordpress/<?php echo $wp_version ?>" --> <!-- generator="wordpress/<?php echo $wp_version ?>" -->
<rss version="0.92"> <rss version="0.92">
<channel> <channel>
<title><?php bloginfo_rss('name') ?></title> <title><?php bloginfo('name'); wp_title_rss(); ?></title>
<link><?php bloginfo_rss('url') ?></link> <link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss('description') ?></description> <description><?php bloginfo_rss('description') ?></description>
<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate> <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>

View File

@ -14,7 +14,7 @@ $more = 1;
> >
<channel> <channel>
<title><?php bloginfo_rss('name'); ?></title> <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
<link><?php bloginfo_rss('url') ?></link> <link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss("description") ?></description> <description><?php bloginfo_rss("description") ?></description>
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate> <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>

View File

@ -16,6 +16,10 @@ function get_wp_title_rss($sep = '&#187;') {
return $title; return $title;
} }
function wp_title_rss($sep = '&#187;') {
echo apply_filters('wp_title_rss', get_wp_title_rss($sep));
}
function get_the_title_rss() { function get_the_title_rss() {
$title = get_the_title(); $title = get_the_title();
$title = apply_filters('the_title', $title); $title = apply_filters('the_title', $title);

View File

@ -165,6 +165,7 @@ function wp_title($sep = '&raquo;', $display = true) {
$author = get_query_var('author'); $author = get_query_var('author');
$author_name = get_query_var('author_name'); $author_name = get_query_var('author_name');
$m = get_query_var('m'); $m = get_query_var('m');
print '<!-- $m = ' . $m . ' -->';
$year = get_query_var('year'); $year = get_query_var('year');
$monthnum = get_query_var('monthnum'); $monthnum = get_query_var('monthnum');
$day = get_query_var('day'); $day = get_query_var('day');