new_user_email_admin_notice

The timeline below displays how wordpress function new_user_email_admin_notice has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.4

/**
 * Adds an admin notice alerting the user to check for confirmation request email
 * after email address change.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @global string $pagenow The filename of the current screen.
 */
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'));
        }
    }
}

WordPress Version: 6.1

/**
 * Adds an admin notice alerting the user to check for confirmation request email
 * after email address change.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @global string $pagenow The filename of the current screen.
 */
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) {
            /* 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>';
        }
    }
}

WordPress Version: 5.3

/**
 * Adds an admin notice alerting the user to check for confirmation request email
 * after email address change.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @global string $pagenow
 */
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) {
            /* 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>';
        }
    }
}

WordPress Version: 5.1

/**
 * Adds an admin notice alerting the user to check for confirmation request email
 * after email address change.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @global string $pagenow
 */
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) {
            /* 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>';
        }
    }
}

WordPress Version: 4.9

/**
 * Adds an admin notice alerting the user to check for confirmation request email
 * after email address change.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @global string $pagenow
 */
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>';
    }
}

WordPress Version: 4.5

/**
 * Adds an admin notice alerting the user to check for confirmation email
 * after email address change.
 *
 * @since 3.0.0
 *
 * @global string $pagenow
 */
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>';
    }
}

WordPress Version: 4.1

/**
 * Adds an admin notice alerting the user to check for confirmation email
 * after email address change.
 *
 * @since 3.0.0
 */
function new_user_email_admin_notice()
{
    if (strpos($_SERVER['PHP_SELF'], 'profile.php') && isset($_GET['updated']) && $email = get_option(get_current_user_id() . '_new_email')) {
        echo "<div class='update-nag'>" . sprintf(__("Your email address has not been updated yet. Please check your inbox at %s for a confirmation email."), $email['newemail']) . "</div>";
    }
}

WordPress Version: 3.7

function new_user_email_admin_notice()
{
    if (strpos($_SERVER['PHP_SELF'], 'profile.php') && isset($_GET['updated']) && $email = get_option(get_current_user_id() . '_new_email')) {
        echo "<div class='update-nag'>" . sprintf(__("Your email address has not been updated yet. Please check your inbox at %s for a confirmation email."), $email['newemail']) . "</div>";
    }
}