This page redirects to an external site: https://developer.wordpress.org/reference/functions/update_option_new_admin_email/
This function intercepts changes to the administrator's email address. It keeps the address from being updated and instead sends the user a confirmation email, with a link to confirm the change.
<?php update_option_new_admin_email( $old_value, $value ); ?>
Note: This function is not intended to be called directly! See below.
This function does not return a value.
This function is hooked to the 'update_option_new_admin_email' and 'add_option_new_admin_email' actions by default. If for some reason you would like to disable it and allow administrators to change their email address without confirmation, you can do this:
<?php
remove_action( 'add_option_new_admin_email', 'update_option_new_admin_email' );
remove_action( 'update_option_new_admin_email', 'update_option_new_admin_email' );
/**
* Disable the confirmation notices when an administrator
* changes their email address.
*
* @see http://codex.wordpress.com/Function_Reference/update_option_new_admin_email
*/
function wpdocs_update_option_new_admin_email( $old_value, $value ) {
update_option( 'admin_email', $value );
}
add_action( 'add_option_new_admin_email', 'wpdocs_update_option_new_admin_email', 10, 2 );
add_action( 'update_option_new_admin_email', 'wpdocs_update_option_new_admin_email', 10, 2 );
?>
Since: 3.0.0
update_option_new_admin_email() is located in wp-admin/includes/ms.php.