From 92b7f84b59f9a7ef07453904b5b79b1e59ad3ba0 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 26 Apr 2010 18:20:11 +0000 Subject: [PATCH] Hook update_option_new_admin_email to add_option_new_admin_email so that the confirmation email gets set even when new_admin_email doesn't already exist. see #12192 git-svn-id: https://develop.svn.wordpress.org/trunk@14242 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/ms.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index d87c9fb5c3..32e67b344d 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -273,9 +273,12 @@ function wpmu_get_blog_allowedthemes( $blog_id = 0 ) { } function update_option_new_admin_email( $old_value, $value ) { + error_log(var_export($value, true)); + $email = get_option( 'admin_email' ); + error_log(var_export($email, true)); if ( $value == get_option( 'admin_email' ) || !is_email( $value ) ) return; - +error_log('here'); $hash = md5( $value. time() .mt_rand() ); $new_admin_email = array( 'hash' => $hash, @@ -307,6 +310,7 @@ All at ###SITENAME### wp_mail( $value, sprintf( __( '[%s] New Admin Email Address' ), get_option( 'blogname' ) ), $content ); } add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 ); +add_action( 'add_option_new_admin_email', 'update_option_new_admin_email', 10, 2 ); function send_confirmation_on_profile_email() { global $errors, $wpdb, $current_user;