文章代码转载于知更鸟博客: https://zmingcx.com/disable-wordpress-from-sending-email-notifications.html
// 禁止用户注册时发送电子邮件给管理员 add_filter( 'wp_new_user_notification_email_admin', '__return_false' ); // 禁止重置密码时发送电子邮件给管理员 add_filter( 'wp_password_change_notification_email', '__return_false' ); // 禁止用户注册时发送电子邮件给注册者 add_filter( 'wp_new_user_notification_email', '__return_false' ); // 禁止邮箱地址改变时发送禁止给注册者 add_filter( 'send_email_change_email', '__return_false' ); // 禁止更改密码时发送电子邮件给注册者 add_filter( 'send_password_change_email', '__return_false' );