Skip to content

Instantly share code, notes, and snippets.

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