mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 09:57:38 +01:00
Multiple category support for RDF.
git-svn-id: http://svn.automattic.com/wordpress/trunk@634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7aa01391d0
commit
c3d03c529d
@ -1272,11 +1272,15 @@ function the_category($seperator = '') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function the_category_rss() {
|
function the_category_rss($type = 'rss') {
|
||||||
$categories = get_the_category();
|
$categories = get_the_category();
|
||||||
foreach ($categories as $category) {
|
foreach ($categories as $category) {
|
||||||
$category->cat_name = stripslashes(convert_chars($category->cat_name));
|
$category->cat_name = stripslashes(convert_chars($category->cat_name));
|
||||||
echo "\n<category>$category->cat_name</category>";
|
if ('rdf' == $type) {
|
||||||
|
echo "\n<dc:subject>$category->cat_name</dc:subject>";
|
||||||
|
} else {
|
||||||
|
echo "\n<category>$category->cat_name</category>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ if (!isset($rss_language)) { $rss_language = 'en'; }
|
|||||||
<link><?php permalink_single_rss() ?></link>
|
<link><?php permalink_single_rss() ?></link>
|
||||||
<dc:date><?php the_time('Y-m-d\TH:i:s'); ?></dc:date>
|
<dc:date><?php the_time('Y-m-d\TH:i:s'); ?></dc:date>
|
||||||
<dc:creator><?php the_author() ?> (mailto:<?php the_author_email() ?>)</dc:creator>
|
<dc:creator><?php the_author() ?> (mailto:<?php the_author_email() ?>)</dc:creator>
|
||||||
<dc:subject><?php the_category_rss() ?></dc:subject>
|
<?php the_category_rss('rdf') ?>
|
||||||
<?php $more = 1; if ($rss_use_excerpt) {
|
<?php $more = 1; if ($rss_use_excerpt) {
|
||||||
?>
|
?>
|
||||||
<description><?php the_excerpt_rss($rss_excerpt_length, 2) ?></description>
|
<description><?php the_excerpt_rss($rss_excerpt_length, 2) ?></description>
|
||||||
|
Loading…
Reference in New Issue
Block a user