pre_comment_user_agent filter-hookWP 1.5.0

Filters the comment author's browser user agent before it is set.

Usage

add_filter( 'pre_comment_user_agent', 'wp_kama_pre_comment_user_agent_filter' );
function wp_kama_pre_comment_user_agent_filter( $comment_agent ){
	// filter...

	return $comment_agent;
}
$comment_agent(string)
The comment author's browser user agent.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

wp_filter_comment()
pre_comment_user_agent
wp-includes/comment.php 2114
$commentdata['comment_agent'] = apply_filters( 'pre_comment_user_agent', ( isset( $commentdata['comment_agent'] ) ? $commentdata['comment_agent'] : '' ) );

Where the hook is used in WordPress

Usage not found.