new_user_email_admin_notice

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

Description

new_user_email_admin_notice(); 

Usage

  1. if ( !function_exists( 'new_user_email_admin_notice' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/ms.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = new_user_email_admin_notice(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/ms.php  
  1. function new_user_email_admin_notice() { 
  2. global $pagenow; 
  3. if ( 'profile.php' === $pagenow && isset( $_GET['updated'] ) && $email = get_user_meta( get_current_user_id(), '_new_email', true ) ) { 
  4. /** translators: %s: New email address */ 
  5. 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>';