Make WordPress Core


Ignore:
Timestamp:
07/28/2004 02:43:54 AM (20 years ago)
Author:
rboren
Message:

Support timestamp permalinks. Make wider use of is_single(). Bug 0000194.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-comment.php

    r1435 r1491  
    1818
    1919function comments_template() {
    20     global $withcomments, $single, $post, $wpdb, $id, $comment, $cookiehash;
    21 
    22     if ( $single || $withcomments ) :
     20    global $withcomments, $post, $wpdb, $id, $comment, $cookiehash;
     21
     22    if ( is_single() || $withcomments ) :
    2323        $req = get_settings('require_name_email');
    2424        $comment_author = isset($_COOKIE['comment_author_'.$cookiehash]) ? trim(stripslashes($_COOKIE['comment_author_'.$cookiehash])) : '';
     
    7272    global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $cookiehash;
    7373    global $querystring_start, $querystring_equal, $querystring_separator;
    74     global $comment_count_cache, $single;
    75     if (!$single) {
     74    global $comment_count_cache;
     75
     76    if (! is_single()) {
    7677    if ('' == $comment_count_cache["$id"]) {
    7778        $number = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1';");
Note: See TracChangeset for help on using the changeset viewer.