On this page
apply_filters( 'pre_user_id', int $user_id )
Filters the comment author’s user ID before it is set.
Description
The first time this filter is evaluated, user_ID is checked (for back-compat), followed by the standard user_id value.
Parameters
$user_idint-
The comment author's user ID.
Source
File: wp-includes/comment.php. View all references
$commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_ID'] );
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_user_id