wp_new_user_notification()通知博客管理者有新用户注册

目录

描述

译文

该函数通知博客管理者有新用户注册,通常通过E-mail通知。

该函数可由插件代替。若插件无法重新定义函数,则使用该函数。

原文

Notify the blog admin of a new user, and optionally send an email to the user with an activation link.

This function can be replaced via plugins. If plugins do not redefine these functions, then this will be used instead.

wp_new_user_notification() 描述

用法

<?php wp_new_user_notification$user_id$notify ?>

wp_new_user_notification() 用法

参数

$user_id

(integer) (必填) User ID

默认值: None

$notify

(string) (可选) Whether admin and user should be notified ('both') or only the admin ('admin' or empty)

默认值: ''

Note: If password is not passed to function, the newly registered user will not receive their welcome email.

wp_new_user_notification() 参数

返回值

(void) 

This function does not return a value.

wp_new_user_notification() 返回值

示例

wp_new_user_notification() 示例

注意

  • This function can be replaced via plugins. If plugins do not redefine these functions, then this will be used instead.
  • As of WP 4.3, a plain text password is no longer passed to the function. If you have a plugged version of this function and are assuming that the second function argument is `$plaintext_pass`, the password displayed in your email to the user will be "admin" or "both".

wp_new_user_notification() 注意

历史

  • 添加于 版本: 2.0
  • 添加于 版本: 4.3 The $plaintext_pass parameter was changed to $notify

wp_new_user_notification() 历史

源文件

wp_new_user_notification() 函数的代码位于 wp-includes/pluggable.php.

wp_new_user_notification() 源文件

相关