Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




sanitize_comment_cookies [ WordPress Function ]

sanitize_comment_cookies ( No parameters )
Defined at:



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.

Source


<?php
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;
    }
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics