Fix to handle no (matching) posts found.
http://sourceforge.net/tracker/index.php?func=detail&aid=809176&group_id=51422&atid=463233 git-svn-id: https://develop.svn.wordpress.org/trunk@375 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
15f2dc914f
commit
73bf223871
13
b2rdf.php
13
b2rdf.php
@ -51,9 +51,7 @@ if (!isset($rss_language)) { $rss_language = 'en'; }
|
||||
xmlns:admin="http://webns.net/mvcb/"
|
||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||
>
|
||||
|
||||
<channel rdf:about="<?php bloginfo_rss("url") ?>">
|
||||
|
||||
<title><?php bloginfo_rss('name') ?></title>
|
||||
<link><?php bloginfo_rss('url') ?></link>
|
||||
<description><?php bloginfo_rss('description') ?></description>
|
||||
@ -65,17 +63,15 @@ if (!isset($rss_language)) { $rss_language = 'en'; }
|
||||
<sy:updatePeriod>hourly</sy:updatePeriod>
|
||||
<sy:updateFrequency>1</sy:updateFrequency>
|
||||
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
|
||||
|
||||
<items>
|
||||
<rdf:Seq>
|
||||
<?php $items_count = 0; foreach ($posts as $post) { start_b2(); ?>
|
||||
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_b2(); ?>
|
||||
<rdf:li rdf:resource="<?php permalink_single_rss() ?>"/>
|
||||
<?php $b2_items[] = $row; $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } ?>
|
||||
<?php $b2_items[] = $row; $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?>
|
||||
</rdf:Seq>
|
||||
</items>
|
||||
</channel>
|
||||
|
||||
<?php foreach ($posts as $post) { start_b2(); ?>
|
||||
<?php if ($posts) { foreach ($posts as $post) { start_b2(); ?>
|
||||
<item rdf:about="<?php permalink_single_rss() ?>">
|
||||
<title><?php the_title_rss() ?></title>
|
||||
<link><?php permalink_single_rss() ?></link>
|
||||
@ -94,6 +90,5 @@ if (!isset($rss_language)) { $rss_language = 'en'; }
|
||||
?>
|
||||
<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
|
||||
</item>
|
||||
<?php } ?>
|
||||
|
||||
<?php } } ?>
|
||||
</rdf:RDF>
|
@ -55,7 +55,7 @@ if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_leng
|
||||
<webMaster><?php echo $admin_email ?></webMaster>
|
||||
<language><?php echo $rss_language ?></language>
|
||||
|
||||
<?php $items_count = 0; foreach ($posts as $post) { start_b2(); ?>
|
||||
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_b2(); ?>
|
||||
<item>
|
||||
<title><?php the_title_rss() ?></title>
|
||||
<?php
|
||||
@ -74,6 +74,6 @@ if ($rss_use_excerpt) {
|
||||
?>
|
||||
<link><?php permalink_single_rss() ?></link>
|
||||
</item>
|
||||
<?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } ?>
|
||||
<?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?>
|
||||
</channel>
|
||||
</rss>
|
@ -66,7 +66,7 @@ if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_leng
|
||||
<sy:updateFrequency>1</sy:updateFrequency>
|
||||
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
|
||||
|
||||
<?php $items_count = 0; foreach ($posts as $post) { start_b2(); ?>
|
||||
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_b2(); ?>
|
||||
<item rdf:about="<?php permalink_single_rss() ?>">
|
||||
<title><?php the_title_rss() ?></title>
|
||||
<link><?php permalink_single_rss() ?></link>
|
||||
@ -86,6 +86,6 @@ if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_leng
|
||||
?>
|
||||
<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
|
||||
</item>
|
||||
<?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } ?>
|
||||
<?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?>
|
||||
</channel>
|
||||
</rss>
|
Loading…
Reference in New Issue
Block a user