未注册用户的姓名和电子邮件可在Cookie中找到,只要他/她留下评论。Cookie的名称如下:
comment_author_3e6aea64ec43ed661a5dee3433f1e8bc
comment_author_email_3e6aea64ec43ed661a5dee3433f1e8bc
您可以这样检索它们:
sanitize_comment_cookies();
wp_get_current_commenter(); // returns comment_author,
// comment_author_email, comment_author_url
它们是在这里创建的
comment.php
:
/**
* Sets the cookies used to store an unauthenticated commentator\'s identity. Typically used
* to recall previous comments by this commentator that are still held in moderation.
*
* @param object $comment Comment object.
* @param object $user Comment author\'s object.
*
* @since 3.4.0
*/
function wp_set_comment_cookies($comment, $user) {
if ( $user->exists() )
return;
$comment_cookie_lifetime = apply_filters(\'comment_cookie_lifetime\', 30000000);
setcookie(\'comment_author_\' . COOKIEHASH, $comment->comment_author, ...);
setcookie(\'comment_author_email_\' . COOKIEHASH, $comment->comment_author_email, ...);
setcookie(\'comment_author_url_\' . COOKIEHASH, ...);
}
(我通过
wp-comments-post.php
使用调试器。)
((正如上面原始问题下面的评论所提到的,这有时难道不是隐私问题吗,如果有人在公共图书馆发表评论,那么之后使用计算机的人可能会找到那些“等待验证”的评论,并且知道是谁写的,嗯))