register_new_user
云策文档标注
概述
register_new_user 是一个 WordPress 动作钩子,在新用户注册记录完成后触发,允许开发者执行自定义操作。
关键要点
- 触发时机:新用户注册记录完成后立即触发
- 参数:$user_id(整数),表示新注册用户的 ID
- 源调用:do_action( 'register_new_user', $user_id )
- 相关函数:register_new_user() 用于处理新用户注册
- 版本引入:WordPress 4.4.0
- 用户贡献说明:wp_send_new_user_notifications() 函数通过此钩子调用
原文内容
Fires after a new user registration has been recorded.
Parameters
$user_idint-
ID of the newly registered user.
Source
do_action( 'register_new_user', $user_id );
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
Skip to note 2 content
Chengmin
wp_send_new_user_notifications()function is called bydo_action( 'register_new_user' )