wfw:commentRSS and E_ALL fix to blog-header.
git-svn-id: https://develop.svn.wordpress.org/trunk@1255 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
372e3293f4
commit
cc29f6be5e
@ -89,8 +89,10 @@ if (!isset($doing_rss) || !$doing_rss) {
|
|||||||
@header ('X-Pingback: ' . get_settings('siteurl') . '/xmlrpc.php');
|
@header ('X-Pingback: ' . get_settings('siteurl') . '/xmlrpc.php');
|
||||||
|
|
||||||
// Support for Conditional GET
|
// Support for Conditional GET
|
||||||
$client_last_modified = $_SERVER['HTTP_IF_MODIFIED_SINCE'];
|
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) $client_last_modified = $_SERVER['HTTP_IF_MODIFIED_SINCE'];
|
||||||
$client_etag = stripslashes($_SERVER['HTTP_IF_NONE_MATCH']);
|
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) ?
|
if ( ($client_last_modified && $client_etag) ?
|
||||||
(($client_last_modified == $wp_last_modified) && ($client_etag == $wp_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') {
|
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 $id;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
|
|
||||||
if ('' != get_settings('permalink_structure')) {
|
if ('' != get_settings('permalink_structure')) {
|
||||||
$url = trailingslashit(get_permalink()) . 'rss2/';
|
$url = trailingslashit(get_permalink()) . 'feed/';
|
||||||
} else {
|
} else {
|
||||||
$url = get_settings('siteurl') . '/' . $commentsrssfilename.$querystring_start.'p'.$querystring_equal.$id;
|
$url = get_settings('siteurl') . '/' . $commentsrssfilename.$querystring_start.'p'.$querystring_equal.$id;
|
||||||
}
|
}
|
||||||
|
return $url;
|
||||||
echo "<a href='$url'>$link_text</a>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function comment_author_rss() {
|
function comment_author_rss() {
|
||||||
|
@ -14,7 +14,9 @@ header('Content-type: text/xml', true);
|
|||||||
|
|
||||||
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
|
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
|
||||||
<rss version="2.0"
|
<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>
|
<channel>
|
||||||
<title><?php bloginfo_rss('name') ?></title>
|
<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>
|
<description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></description>
|
||||||
<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
|
<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
<wfw:commentRSS><?php echo comments_rss(); ?></wfw:commentRSS>
|
||||||
</item>
|
</item>
|
||||||
<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
|
<?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
|
||||||
</channel>
|
</channel>
|
||||||
|
Loading…
Reference in New Issue
Block a user