A WordPress-centric search engine for devs and theme authors



new_user_email_admin_notice ›

Since3.0.0
Deprecatedn/a
new_user_email_admin_notice ( No parameters )
Defined at:
Codex:
Change Log:
  • 4.9.0

Adds an admin notice alerting the user to check for confirmation request email after email address change.



Source

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 ) ) {
		/* translators: %s: New email address */
		echo '<div class="notice notice-info"><p>' . sprintf( __( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ), '<code>' . esc_html( $email['newemail'] ) . '</code>' ) . '</p></div>';
	}
}