pre_comment_author_url
Filters the comment author's URL cookie before it is set.
When this filter hook is evaluated in wp_filter_comment(), the comment author's URL string is passed.
Usage
add_filter( 'pre_comment_author_url', 'wp_kama_pre_comment_author_url_filter' ); /** * Function for `pre_comment_author_url` filter-hook. * * @param string $author_url_cookie The comment author URL cookie. * * @return string */ function wp_kama_pre_comment_author_url_filter( $author_url_cookie ){ // filter... return $author_url_cookie; }
- $author_url_cookie(string)
- The comment author URL cookie.
Changelog
Since 1.5.0 | Introduced. |
Where the hook is called
pre_comment_author_url
wp-includes/comment.php 661
$comment_author_url = apply_filters( 'pre_comment_author_url', $_COOKIE[ 'comment_author_url_' . COOKIEHASH ] );
wp-includes/comment.php 2185
$commentdata['comment_author_url'] = apply_filters( 'pre_comment_author_url', $commentdata['comment_author_url'] );
Where the hook is used in WordPress
wp-includes/default-filters.php 85
add_filter( $filter, 'wp_strip_all_tags' );
wp-includes/default-filters.php 86
add_filter( $filter, 'sanitize_url' );
wp-includes/default-filters.php 87
add_filter( $filter, 'wp_filter_kses' );