Last active
September 8, 2015 17:33
-
-
Save butlerblog/86ce0ed53003b4a9b10a to your computer and use it in GitHub Desktop.
Plugin to disable the sending of the new user registration email when the user is created in the Users > All Users screen. This file can be saved to the /wp-content/plugins/ then activated from the plugins menu.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: WP-Members Disable New User Notification | |
Plugin URI: http://rocketgeek.com | |
Description: Disables the WP new user notification email when user is created via the Users > Add New screen. | |
Version: 1.0 | |
Author: Chad Butler | |
Author URI: http://butlerblog.com/ | |
License: GPLv2 | |
*/ | |
/* | |
* Copyright (c) 2015 Chad Butler | |
* | |
* @package WordPress | |
* @subpackage WordPass | |
* @author Chad Butler | |
* @copyright 2015 | |
* | |
* Functions Included: | |
* - wp_new_user_notification | |
*/ | |
/** | |
* If user is being added by the Users > Add New screen, disable the notification email. | |
* | |
* @since 1.0 | |
*/ | |
/** | |
* If user is being added by the Users > Add New screen, disable the notification email. | |
* | |
* @since 1.0 | |
*/ | |
if ( ! function_exists( 'wp_new_user_notification' ) | |
&& isset( $_POST['createuser'] ) | |
&& $_POST['createuser'] == __( 'Add New User' ) ) { | |
function wp_new_user_notification( $user_id, $plaintext_pass = '' ) { | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment