Definition:
function sanitize_comment_cookies() {}
Sanitizes the cookies sent to the user already.
Will only do anything if the cookies have already been created for the user. Mostly used after cookies had been sent to use elsewhere.
Defined filters
- pre_comment_author_name
apply_filters('pre_comment_author_name', $_COOKIE['comment_author_'.COOKIEHASH])
- pre_comment_author_email
apply_filters('pre_comment_author_email', $_COOKIE['comment_author_email_'.COOKIEHASH])
- pre_comment_author_url
apply_filters('pre_comment_author_url', $_COOKIE['comment_author_url_'.COOKIEHASH])
Source code
function sanitize_comment_cookies() { if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) ) { $comment_author = apply_filters('pre_comment_author_name', $_COOKIE['comment_author_'.COOKIEHASH]); $comment_author = stripslashes($comment_author); $comment_author = esc_attr($comment_author); $_COOKIE['comment_author_'.COOKIEHASH] = $comment_author; } if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) ) { $comment_author_email = apply_filters('pre_comment_author_email', $_COOKIE['comment_author_email_'.COOKIEHASH]); $comment_author_email = stripslashes($comment_author_email); $comment_author_email = esc_attr($comment_author_email); $_COOKIE['comment_author_email_'.COOKIEHASH] = $comment_author_email; } if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ) { $comment_author_url = apply_filters('pre_comment_author_url', $_COOKIE['comment_author_url_'.COOKIEHASH]); $comment_author_url = stripslashes($comment_author_url); $_COOKIE['comment_author_url_'.COOKIEHASH] = $comment_author_url; } }
2767
No comments yet... Be the first to leave a reply!