Last active
July 19, 2018 10:30
-
-
Save WebiSamurai/4535af4ab1a12aa8493f35e45ad261cf to your computer and use it in GitHub Desktop.
Изменение e-mail в настройках администрирования wordpress, добавляется в файл functions.php
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
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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment