upgrade_530

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

WordPress Version: 5.4

/**
 * Executes changes made in WordPress 5.3.0.
 *
 * @ignore
 * @since 5.3.0
 */
function upgrade_530()
{
    /*
     * The `admin_email_lifespan` option may have been set by an admin that just logged in,
     * saw the verification screen, clicked on a button there, and is now upgrading the db,
     * or by populate_options() that is called earlier in upgrade_all().
     * In the second case `admin_email_lifespan` should be reset so the verification screen
     * is shown next time an admin logs in.
     */
    if (function_exists('current_user_can') && !current_user_can('manage_options')) {
        update_option('admin_email_lifespan', 0);
    }
}

WordPress Version: 5.3

/**
 * Executes changes made in WordPress 5.3.0.
 *
 * @ignore
 * @since 5.3.0
 */
function upgrade_530()
{
    // The `admin_email_lifespan` option may have been set by an admin that just logged in,
    // saw the verification screen, clicked on a button there, and is now upgrading the db,
    // or by populate_options() that is called earlier in upgrade_all().
    // In the second case `admin_email_lifespan` should be reset so the verification screen
    // is shown next time an admin logs in.
    if (function_exists('current_user_can') && !current_user_can('manage_options')) {
        update_option('admin_email_lifespan', 0);
    }
}