apply_filters( ‘pre_user_id’, int $user_id )

In this article

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

$commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_ID'] );

Changelog

VersionDescription
1.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.