mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Fix Atom feeds' categories. fixes #4307
git-svn-id: http://svn.automattic.com/wordpress/trunk@5548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8a3ed389bb
commit
a98bb3abda
@ -151,13 +151,13 @@ function get_the_category_rss($type = 'rss') {
|
||||
$home = get_bloginfo_rss('home');
|
||||
$the_list = '';
|
||||
foreach ( (array) $categories as $category ) {
|
||||
$category->cat_name = convert_chars($category->cat_name);
|
||||
$cat_name = convert_chars($category->cat_name);
|
||||
if ( 'rdf' == $type )
|
||||
$the_list .= "\n\t\t<dc:subject><![CDATA[$category->cat_name]]></dc:subject>\n";
|
||||
$the_list .= "\n\t\t<dc:subject><![CDATA[$cat_name]]></dc:subject>\n";
|
||||
if ( 'atom' == $type )
|
||||
$the_list .= "<category scheme='$home' term='$category->cat_name' />";
|
||||
$the_list .= sprintf( '<category scheme="%1$s" term="%2$s" />', attribute_escape( apply_filters( 'get_bloginfo_rss', get_bloginfo( 'url' ) ) ), attribute_escape( $category->cat_name ) );
|
||||
else
|
||||
$the_list .= "\n\t\t<category><![CDATA[$category->cat_name]]></category>\n";
|
||||
$the_list .= "\n\t\t<category><![CDATA[$cat_name]]></category>\n";
|
||||
}
|
||||
return apply_filters('the_category_rss', $the_list, $type);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user