On this page
apply_filters( 'pre_comment_user_agent', string $comment_agent )
Filters the comment author’s browser user agent before it is set.
Parameters
$comment_agentstring-
The comment author's browser user agent.
Source
File: wp-includes/comment.php. View all references
$commentdata['comment_agent'] = apply_filters( 'pre_comment_user_agent', ( isset( $commentdata['comment_agent'] ) ? $commentdata['comment_agent'] : '' ) );
Related
Used By
| Used By | Description |
|---|---|
| wp_filter_comment() wp-includes/comment.php | Filters and sanitizes comment data. |
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_comment_user_agent