wp_send_new_user_notifications

函式
wp_send_new_user_notifications ( $user_id, $notify = 'both' )
引數
  • (int) $user_id ID of the newly created user.
    Required:
  • (string) $notify Optional. Type of notification that should happen. Accepts 'admin' or an empty string (admin only), 'user', or 'both' (admin and user). Default 'both'.
    Required:
    Default: 'both'
定義位置
相關方法
wp_new_user_notificationwpmu_signup_user_notificationwp_new_blog_notificationwpmu_welcome_user_notificationwpmu_new_site_admin_notification
引入
4.4.0
棄用
-

wp_send_new_user_notifications: 這是一個WordPress的動作鉤子,當一個新使用者在WordPress網站上註冊時被觸發。它用於在新使用者註冊時向網站管理員或其他指定使用者傳送電子郵件通知。

啟動與建立新使用者有關的電子郵件通知。

通知會同時傳送給網站管理員和新建立的使用者。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_send_new_user_notifications( $user_id, $notify = 'both' ) {
wp_new_user_notification( $user_id, null, $notify );
}
function wp_send_new_user_notifications( $user_id, $notify = 'both' ) { wp_new_user_notification( $user_id, null, $notify ); }
function wp_send_new_user_notifications( $user_id, $notify = 'both' ) {
	wp_new_user_notification( $user_id, null, $notify );
}

常見問題

FAQs
檢視更多 >