如何在不使用插件的情况下,通过使用functions.php文件来禁用WordPress默认电子邮件通知?
'wp_new_user_notification_to_user'
'wp_new_user_notification_to_admin'
'wp_notify_postauthor'
'wp_notify_moderator'
'wp_password_change_notification'
'send_password_change_email'
'send_email_change_email'
答案 0 :(得分:0)
将此代码添加到functions.php文件中。
add_filter( 'send_password_change_email', '__return_false' );
add_filter( 'send_email_change_email', '__return_false' );
// DISABLE BOTH default WordPress new user notification emails
if ( ! function_exists( 'wp_new_user_notification' ) ) :
function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) {
return;
}
endif;