mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-01 00:10:36 +01:00
wfw:commentRSS and E_ALL fix to blog-header.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d30904708e
commit
ee19b6c490
@ -89,8 +89,10 @@ if (!isset($doing_rss) || !$doing_rss) {
|
||||
@header ('X-Pingback: ' . get_settings('siteurl') . '/xmlrpc.php');
|
||||
|
||||
// Support for Conditional GET
|
||||
$client_last_modified = $_SERVER['HTTP_IF_MODIFIED_SINCE'];
|
||||
$client_etag = stripslashes($_SERVER['HTTP_IF_NONE_MATCH']);
|
||||
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) $client_last_modified = $_SERVER['HTTP_IF_MODIFIED_SINCE'];
|
||||
else $client_last_modified = false;
|
||||
if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) $client_etag = stripslashes($_SERVER['HTTP_IF_NONE_MATCH']);
|
||||
else $client_etag = false;
|
||||
|
||||
if ( ($client_last_modified && $client_etag) ?
|
||||
(($client_last_modified == $wp_last_modified) && ($client_etag == $wp_etag)) :
|
||||
|
@ -216,16 +216,20 @@ function comment_time($d='') {
|
||||
}
|
||||
|
||||
function comments_rss_link($link_text='Comments RSS', $commentsrssfilename = 'wp-commentsrss2.php') {
|
||||
$url = comments_rss($commentsrssfilename);
|
||||
echo "<a href='$url'>$link_text</a>";
|
||||
}
|
||||
|
||||
function comments_rss($commentsrssfilename = 'wp-commentsrss2.php') {
|
||||
global $id;
|
||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||
|
||||
if ('' != get_settings('permalink_structure')) {
|
||||
$url = trailingslashit(get_permalink()) . 'rss2/';
|
||||
$url = trailingslashit(get_permalink()) . 'feed/';
|
||||
} else {
|
||||
$url = get_settings('siteurl') . '/' . $commentsrssfilename.$querystring_start.'p'.$querystring_equal.$id;
|
||||
}
|
||||
|
||||
echo "<a href='$url'>$link_text</a>";
|
||||
return $url;
|
||||
}
|
||||
|
||||
function comment_author_rss() {
|
||||
|
@ -14,7 +14,9 @@ header('Content-type: text/xml', true);
|
||||
|
||||
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
|
||||
<rss version="2.0"
|
||||
xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
||||
>
|
||||
|
||||
<channel>
|
||||
<title><?php bloginfo_rss('name') ?></title>
|
||||
@ -38,7 +40,7 @@ header('Content-type: text/xml', true);
|
||||
<description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></description>
|
||||
<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
|
||||
<?php endif; ?>
|
||||
|
||||
<wfw:commentRSS><?php echo comments_rss(); ?></wfw:commentRSS>
|
||||
</item>
|
||||
<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
|
||||
</channel>
|
||||
|
Loading…
Reference in New Issue
Block a user