new_user_email_admin_notice()
Adds an admin notice alerting the user to check for confirmation request email after email address change.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
new_user_email_admin_notice();
Заметки
- Global. Строка. $pagenow The filename of the current screen.
Список изменений
С версии 3.0.0 | Введена. |
С версии 4.9.0 | This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific. |
Код new_user_email_admin_notice() new user email admin notice WP 6.5.2
function new_user_email_admin_notice() { global $pagenow; if ( 'profile.php' === $pagenow && isset( $_GET['updated'] ) ) { $email = get_user_meta( get_current_user_id(), '_new_email', true ); if ( $email ) { $message = sprintf( /* translators: %s: New email address. */ __( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ), '<code>' . esc_html( $email['newemail'] ) . '</code>' ); wp_admin_notice( $message, array( 'type' => 'info' ) ); } } }