Make WordPress Core


Ignore:
Timestamp:
06/22/2006 08:52:12 PM (20 years ago)
Author:
ryan
Message:

wp_get_current_commenter()

File:
1 edited

Legend:

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

    r3874 r3902  
    274274    global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity;
    275275
    276     if ( is_single() || is_page() || $withcomments ) :
    277         $req = get_settings('require_name_email');
    278         $comment_author = '';
    279         if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) ) {
    280             $comment_author = apply_filters('pre_comment_author_name', $_COOKIE['comment_author_'.COOKIEHASH]);
    281             $comment_author = stripslashes($comment_author);
    282             $comment_author = wp_specialchars($comment_author, true);
    283         }
    284         $comment_author_email = '';
    285         if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) ) {
    286             $comment_author_email = apply_filters('pre_comment_author_email', $_COOKIE['comment_author_email_'.COOKIEHASH]);
    287             $comment_author_email = stripslashes($comment_author_email);
    288             $comment_author_email = wp_specialchars($comment_author_email, true);       
    289         }
    290         $comment_author_url = '';
    291         if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ) {
    292             $comment_author_url = apply_filters('pre_comment_author_url', $_COOKIE['comment_author_url_'.COOKIEHASH]);
    293             $comment_author_url = stripslashes($comment_author_url);
    294             $comment_author_url = wp_specialchars($comment_author_url, true);       
    295         }
     276    if ( ! (is_single() || is_page() || $withcomments) )
     277        return;
     278
     279    $req = get_settings('require_name_email');
     280    $commenter = wp_get_current_commenter();
     281    extract($commenter);
    296282
    297283    // TODO: Use API instead of SELECTs.
     
    310296    else
    311297        require( ABSPATH . 'wp-content/themes/default/comments.php');
    312 
    313     endif;
    314298}
    315299
Note: See TracChangeset for help on using the changeset viewer.