WordPress.org

Make WordPress Core

Ticket #18819: comment.diff

File comment.diff, 1.3 KB (added by WhiteJV, 7 years ago)

DIFF of wp-includes/wp-comment.php

  • comment.php

     
    11861186        // Cookies should already be sanitized.
    11871187
    11881188        $comment_author = '';
    1189         if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) )
    1190                 $comment_author = $_COOKIE['comment_author_'.COOKIEHASH];
    1191 
    11921189        $comment_author_email = '';
    1193         if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) )
    1194                 $comment_author_email = $_COOKIE['comment_author_email_'.COOKIEHASH];
    1195 
    11961190        $comment_author_url = '';
    1197         if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) )
    1198                 $comment_author_url = $_COOKIE['comment_author_url_'.COOKIEHASH];
    11991191
     1192        if ( (!defined('BLOCK_COMMENTER_COOKIES')) || (!BLOCK_COMMENTER_COOKIES) ) {
     1193                if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) )
     1194                        $comment_author = $_COOKIE['comment_author_'.COOKIEHASH];
     1195                if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) )
     1196                        $comment_author_email = $_COOKIE['comment_author_email_'.COOKIEHASH];
     1197                if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) )
     1198                        $comment_author_url = $_COOKIE['comment_author_url_'.COOKIEHASH];
     1199        }
     1200
    12001201        return apply_filters('wp_get_current_commenter', compact('comment_author', 'comment_author_email', 'comment_author_url'));
    12011202}
    12021203