pre_user_id WordPress Filter Hook

The pre_user_id hook is called before the user ID is retrieved. It can be used to modify the user ID before it is retrieved from the database.

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.


Top ↑

Parameters

$user_ID

(int)The comment author's user ID.


Top ↑

Source

File: wp-includes/comment.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More