Make WordPress Core

Changeset 1255


Ignore:
Timestamp:
05/10/2004 07:51:50 AM (21 years ago)
Author:
saxmatt
Message:

wfw:commentRSS and E_ALL fix to blog-header.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r1246 r1255  
    9090
    9191    // Support for Conditional GET
    92     $client_last_modified = $_SERVER['HTTP_IF_MODIFIED_SINCE'];
    93     $client_etag = stripslashes($_SERVER['HTTP_IF_NONE_MATCH']);
     92    if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) $client_last_modified = $_SERVER['HTTP_IF_MODIFIED_SINCE'];
     93    else $client_last_modified = false;
     94    if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) $client_etag = stripslashes($_SERVER['HTTP_IF_NONE_MATCH']);
     95    else $client_etag = false;
    9496
    9597    if ( ($client_last_modified && $client_etag) ?
  • trunk/wp-includes/template-functions-comment.php

    r1245 r1255  
    217217
    218218function comments_rss_link($link_text='Comments RSS', $commentsrssfilename = 'wp-commentsrss2.php') {
     219    $url = comments_rss($commentsrssfilename);
     220    echo "<a href='$url'>$link_text</a>";
     221}
     222
     223function comments_rss($commentsrssfilename = 'wp-commentsrss2.php') {
    219224    global $id;
    220225    global $querystring_start, $querystring_equal, $querystring_separator;
    221226
    222227    if ('' != get_settings('permalink_structure')) {
    223         $url = trailingslashit(get_permalink()) . 'rss2/';
     228        $url = trailingslashit(get_permalink()) . 'feed/';
    224229    } else {
    225230        $url = get_settings('siteurl') . '/' . $commentsrssfilename.$querystring_start.'p'.$querystring_equal.$id;
    226231    }
    227 
    228     echo "<a href='$url'>$link_text</a>";
     232    return $url;
    229233}
    230234
  • trunk/wp-rss2.php

    r1235 r1255  
    1515<!-- generator="wordpress/<?php echo $wp_version ?>" -->
    1616<rss version="2.0"
    17     xmlns:content="http://purl.org/rss/1.0/modules/content/">
     17    xmlns:content="http://purl.org/rss/1.0/modules/content/"
     18    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
     19>
    1820
    1921<channel>
     
    3941        <content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
    4042<?php endif; ?>
    41        
     43        <wfw:commentRSS><?php echo comments_rss(); ?></wfw:commentRSS>
    4244    </item>
    4345    <?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
Note: See TracChangeset for help on using the changeset viewer.