Post Single Page

Disable new user registration emails sent to the site admin

admin

In Wordpress Posted

/**
* Disable new user registration emails sent to the site admin
*/
function disable_registration_email_filter($result = '') {
extract($result);
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
if (strstr(sprintf(__('[%s] New User Registration'), $blogname), $subject)) {
$to = '';
$subject = '';
$message = '';
$headers = '';
$attachments = array ();
return compact('to', 'subject', 'message', 'headers', 'attachments');
}
return $result;
}
add_filter('wp_mail', 'disable_registration_email_filter');

0 Comments

Leave a Comment