WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/21/2011 10:57:42 AM (10 years ago)
Author:
westi
Message:

Make it possible for commenter cookies to be disabled if someone wants to by setting them on an action instead of always. Fixes #17976 props SergeyBiryukov and pishmishy .

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-comments-post.php

    r18841 r19622  
    9191
    9292$comment = get_comment($comment_id);
    93 if ( !$user->ID ) {
    94     $comment_cookie_lifetime = apply_filters('comment_cookie_lifetime', 30000000);
    95     setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
    96     setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
    97     setcookie('comment_author_url_' . COOKIEHASH, esc_url($comment->comment_author_url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
    98 }
     93do_action('set_comment_cookies', $comment, $user);
    9994
    10095$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id;
Note: See TracChangeset for help on using the changeset viewer.