pre_user_id filter-hook . WP 1.5.0
Filters the comment author's user id before it is set.
The first time this filter is evaluated, 'user_ID'
is checked (for back-compat), followed by the standard 'user_id'
value.
Usage
add_filter( 'pre_user_id', 'filter_function_name_2814' ); function filter_function_name_2814( $user_ID ){ // filter... return $user_ID; }
- $user_ID(int)
- The comment author's user ID.
Where the hook is called
pre_user_id
wp-includes/comment.php 1828
$commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_ID'] );
wp-includes/comment.php 1831
$commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_id'] );