default_password_nag_handler

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

WordPress Version: 6.3

/**
 * @since 2.8.0
 *
 * @global int $user_ID
 *
 * @param false $errors Deprecated.
 */
function default_password_nag_handler($errors = false)
{
    global $user_ID;
    // Short-circuit it.
    if (!get_user_option('default_password_nag')) {
        return;
    }
    // get_user_setting() = JS-saved UI setting. Else no-js-fallback code.
    if ('hide' === get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' === $_GET['default_password_nag']) {
        delete_user_setting('default_password_nag');
        update_user_meta($user_ID, 'default_password_nag', false);
    }
}

WordPress Version: 5.8

/**
 * @since 2.8.0
 *
 * @global int $user_ID
 *
 * @param false $errors Deprecated.
 */
function default_password_nag_handler($errors = false)
{
    global $user_ID;
    // Short-circuit it.
    if (!get_user_option('default_password_nag')) {
        return;
    }
    // get_user_setting() = JS-saved UI setting. Else no-js-fallback code.
    if ('hide' === get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag']) {
        delete_user_setting('default_password_nag');
        update_user_meta($user_ID, 'default_password_nag', false);
    }
}

WordPress Version: 5.5

/**
 * @since 2.8.0
 *
 * @global int $user_ID
 *
 * @param false $errors Deprecated.
 */
function default_password_nag_handler($errors = false)
{
    global $user_ID;
    // Short-circuit it.
    if (!get_user_option('default_password_nag')) {
        return;
    }
    // get_user_setting() = JS-saved UI setting. Else no-js-fallback code.
    if ('hide' === get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag']) {
        delete_user_setting('default_password_nag');
        update_user_option($user_ID, 'default_password_nag', false, true);
    }
}

WordPress Version: 5.4

/**
 * @since 2.8.0
 *
 * @global int $user_ID
 *
 * @param false $errors Deprecated.
 */
function default_password_nag_handler($errors = false)
{
    global $user_ID;
    // Short-circuit it.
    if (!get_user_option('default_password_nag')) {
        return;
    }
    // get_user_setting() = JS-saved UI setting. Else no-js-fallback code.
    if ('hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag']) {
        delete_user_setting('default_password_nag');
        update_user_option($user_ID, 'default_password_nag', false, true);
    }
}

WordPress Version: 4.3

/**
 * @since 2.8.0
 *
 * @global int $user_ID
 *
 * @param false $errors Deprecated.
 */
function default_password_nag_handler($errors = false)
{
    global $user_ID;
    // Short-circuit it.
    if (!get_user_option('default_password_nag')) {
        return;
    }
    // get_user_setting = JS saved UI setting. else no-js-fallback code.
    if ('hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag']) {
        delete_user_setting('default_password_nag');
        update_user_option($user_ID, 'default_password_nag', false, true);
    }
}

WordPress Version: 4.0

/**
 * @since 2.8.0
 */
function default_password_nag_handler($errors = false)
{
    global $user_ID;
    // Short-circuit it.
    if (!get_user_option('default_password_nag')) {
        return;
    }
    // get_user_setting = JS saved UI setting. else no-js-fallback code.
    if ('hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag']) {
        delete_user_setting('default_password_nag');
        update_user_option($user_ID, 'default_password_nag', false, true);
    }
}

WordPress Version: 3.7

/**
 * @since 2.8.0
 */
function default_password_nag_handler($errors = false)
{
    global $user_ID;
    if (!get_user_option('default_password_nag')) {
        //Short circuit it.
        return;
    }
    //get_user_setting = JS saved UI setting. else no-js-fallback code.
    if ('hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag']) {
        delete_user_setting('default_password_nag');
        update_user_option($user_ID, 'default_password_nag', false, true);
    }
}