pre_comment_author_url filter-hookWP 1.5.0

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

sanitize_comment_cookies()
pre_comment_author_url
wp_filter_comment()
pre_comment_author_url
wp-includes/comment.php 628
$comment_author_url = apply_filters( 'pre_comment_author_url', $_COOKIE[ 'comment_author_url_' . COOKIEHASH ] );
wp-includes/comment.php 2134
$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 74
add_filter( $filter, 'wp_strip_all_tags' );
wp-includes/default-filters.php 75
add_filter( $filter, 'sanitize_url' );
wp-includes/default-filters.php 76
add_filter( $filter, 'wp_filter_kses' );