Make WordPress Core


Ignore:
Timestamp:
06/10/2004 08:40:58 AM (22 years ago)
Author:
saxmatt
Message:

More comments and comment template improvements. TODO: popup comment template

File:
1 edited

Legend:

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

    r1398 r1400  
    1818
    1919function comments_template() {
    20     global $withcomments, $single, $post, $wpdb, $id, $comment;
     20    global $withcomments, $single, $post, $wpdb, $id, $comment, $cookiehash;
     21
     22    $req = get_settings('require_name_email');
     23    $comment_author = isset($_COOKIE['comment_author_'.$cookiehash]) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
     24    $comment_author_email = isset($_COOKIE['comment_author_email_'.$cookiehash]) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
     25    $comment_author_url = isset($_COOKIE['comment_author_url_'.$cookiehash]) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
     26
     27    $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date");
     28
    2129    if ( $single || $withcomments )
    2230        include(ABSPATH . 'wp-comments.php');
     
    302310}
    303311
     312function comments_open() {
     313    global $post;
     314    if ('open' == $post->comment_status) return true;
     315    else return false;
     316}
     317
     318function pings_open() {
     319    global $post;
     320    if ('open' == $post->ping_status) return true;
     321    else return false;
     322}
     323
    304324?>
Note: See TracChangeset for help on using the changeset viewer.