list_core_update

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

WordPress Version: 6.5

/**
 * Lists available core updates.
 *
 * @since 2.7.0
 *
 * @global string $wp_local_package Locale code of the package.
 * @global wpdb   $wpdb             WordPress database abstraction object.
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    $version_string = sprintf('%s–%s', $update->current, get_locale());
    if ('en_US' === $update->locale && 'en_US' === get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' === $update->locale && $update->packages->partial && $wp_version === $update->partial_version) {
        $updates = get_core_updates();
        if ($updates && 1 === count($updates)) {
            // If the only available update is a partial builds, it doesn't need a language-specific version string.
            $version_string = $update->current;
        }
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale()) {
        $version_string = sprintf('%s–%s', $update->current, $update->locale);
    }
    $current = false;
    if (!isset($update->response) || 'latest' === $update->response) {
        $current = true;
    }
    $message = '';
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = PHP_VERSION;
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    // Nightly build versions have two hyphens and a commit number.
    if (preg_match('/-\w+-\d+/', $update->current)) {
        // Retrieve the major version number.
        preg_match('/^\d+.\d+/', $update->current, $update_major);
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Update to latest %s nightly'), $update_major[0]);
    } else {
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Update to version %s'), $version_string);
    }
    if ('development' === $update->response) {
        $message = __('You can update to the latest nightly build manually:');
    } else if ($current) {
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Re-install version %s'), $version_string);
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version. */
            esc_url(__('https://wordpress.org/documentation/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        $php_update_message = '</p><p>' . sprintf(
            /* translators: %s: URL to Update PHP page. */
            __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        $annotation = wp_get_update_php_annotation();
        if ($annotation) {
            $php_update_message .= '</p><p><em>' . $annotation . '</em>';
        }
        if (!$mysql_compat && !$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $update->mysql_version,
                $php_version,
                $mysql_version
            ) . $php_update_message;
        } elseif (!$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $php_version
            ) . $php_update_message;
        } elseif (!$mysql_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->mysql_version,
                $mysql_version
            );
        } else {
            $message = sprintf(
                /* translators: 1: Installed WordPress version number, 2: URL to WordPress release notes, 3: New WordPress version number, including locale if necessary. */
                __('You can update from WordPress %1$s to <a href="%2$s">WordPress %3$s</a> manually:'),
                $wp_version,
                $version_url,
                $version_string
            );
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . esc_url($form_action) . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden" />';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden" />';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' !== $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' !== $update->locale && (!isset($wp_local_package) || $wp_local_package !== $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes.') . '</p>';
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale() && (!$update->packages->partial && $wp_version === $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(
            /* translators: %s: WordPress version. */
            __('You are about to install WordPress %s <strong>in English (US)</strong>. There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'),
            ('development' !== $update->response) ? $update->current : ''
        ) . '</p>';
    }
    echo '</form>';
}

WordPress Version: 6.3

/**
 * Lists available core updates.
 *
 * @since 2.7.0
 *
 * @global string $wp_local_package Locale code of the package.
 * @global wpdb   $wpdb             WordPress database abstraction object.
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    $version_string = sprintf('%s&ndash;%s', $update->current, get_locale());
    if ('en_US' === $update->locale && 'en_US' === get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' === $update->locale && $update->packages->partial && $wp_version == $update->partial_version) {
        $updates = get_core_updates();
        if ($updates && 1 === count($updates)) {
            // If the only available update is a partial builds, it doesn't need a language-specific version string.
            $version_string = $update->current;
        }
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale()) {
        $version_string = sprintf('%s&ndash;%s', $update->current, $update->locale);
    }
    $current = false;
    if (!isset($update->response) || 'latest' === $update->response) {
        $current = true;
    }
    $message = '';
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = PHP_VERSION;
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    // Nightly build versions have two hyphens and a commit number.
    if (preg_match('/-\w+-\d+/', $update->current)) {
        // Retrieve the major version number.
        preg_match('/^\d+.\d+/', $update->current, $update_major);
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Update to latest %s nightly'), $update_major[0]);
    } else {
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Update to version %s'), $version_string);
    }
    if ('development' === $update->response) {
        $message = __('You can update to the latest nightly build manually:');
    } else if ($current) {
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Re-install version %s'), $version_string);
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version. */
            esc_url(__('https://wordpress.org/documentation/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        $php_update_message = '</p><p>' . sprintf(
            /* translators: %s: URL to Update PHP page. */
            __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        $annotation = wp_get_update_php_annotation();
        if ($annotation) {
            $php_update_message .= '</p><p><em>' . $annotation . '</em>';
        }
        if (!$mysql_compat && !$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $update->mysql_version,
                $php_version,
                $mysql_version
            ) . $php_update_message;
        } elseif (!$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $php_version
            ) . $php_update_message;
        } elseif (!$mysql_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->mysql_version,
                $mysql_version
            );
        } else {
            $message = sprintf(
                /* translators: 1: Installed WordPress version number, 2: URL to WordPress release notes, 3: New WordPress version number, including locale if necessary. */
                __('You can update from WordPress %1$s to <a href="%2$s">WordPress %3$s</a> manually:'),
                $wp_version,
                $version_url,
                $version_string
            );
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . esc_url($form_action) . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden" />';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden" />';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' !== $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' !== $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes.') . '</p>';
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale() && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(
            /* translators: %s: WordPress version. */
            __('You are about to install WordPress %s <strong>in English (US)</strong>. There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'),
            ('development' !== $update->response) ? $update->current : ''
        ) . '</p>';
    }
    echo '</form>';
}

WordPress Version: 6.1

/**
 * Lists available core updates.
 *
 * @since 2.7.0
 *
 * @global string $wp_local_package Locale code of the package.
 * @global wpdb   $wpdb             WordPress database abstraction object.
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    $version_string = sprintf('%s&ndash;%s', $update->current, get_locale());
    if ('en_US' === $update->locale && 'en_US' === get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' === $update->locale && $update->packages->partial && $wp_version == $update->partial_version) {
        $updates = get_core_updates();
        if ($updates && 1 === count($updates)) {
            // If the only available update is a partial builds, it doesn't need a language-specific version string.
            $version_string = $update->current;
        }
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale()) {
        $version_string = sprintf('%s&ndash;%s', $update->current, $update->locale);
    }
    $current = false;
    if (!isset($update->response) || 'latest' === $update->response) {
        $current = true;
    }
    $message = '';
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = PHP_VERSION;
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    // Nightly build versions have two hyphens and a commit number.
    if (preg_match('/-\w+-\d+/', $update->current)) {
        // Retrieve the major version number.
        preg_match('/^\d+.\d+/', $update->current, $update_major);
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Update to latest %s nightly'), $update_major[0]);
    } else {
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Update to version %s'), $version_string);
    }
    if ('development' === $update->response) {
        $message = __('You can update to the latest nightly build manually:');
    } else if ($current) {
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Re-install version %s'), $version_string);
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version. */
            esc_url(__('https://wordpress.org/support/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        $php_update_message = '</p><p>' . sprintf(
            /* translators: %s: URL to Update PHP page. */
            __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        $annotation = wp_get_update_php_annotation();
        if ($annotation) {
            $php_update_message .= '</p><p><em>' . $annotation . '</em>';
        }
        if (!$mysql_compat && !$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $update->mysql_version,
                $php_version,
                $mysql_version
            ) . $php_update_message;
        } elseif (!$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $php_version
            ) . $php_update_message;
        } elseif (!$mysql_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->mysql_version,
                $mysql_version
            );
        } else {
            $message = sprintf(
                /* translators: 1: Installed WordPress version number, 2: URL to WordPress release notes, 3: New WordPress version number, including locale if necessary. */
                __('You can update from WordPress %1$s to <a href="%2$s">WordPress %3$s</a> manually:'),
                $wp_version,
                $version_url,
                $version_string
            );
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . esc_url($form_action) . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden" />';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden" />';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' !== $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' !== $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes.') . '</p>';
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale() && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(
            /* translators: %s: WordPress version. */
            __('You are about to install WordPress %s <strong>in English (US)</strong>. There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'),
            ('development' !== $update->response) ? $update->current : ''
        ) . '</p>';
    }
    echo '</form>';
}

WordPress Version: 5.9

/**
 * Lists available core updates.
 *
 * @since 2.7.0
 *
 * @global string $wp_local_package Locale code of the package.
 * @global wpdb   $wpdb             WordPress database abstraction object.
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    $version_string = sprintf('%s&ndash;%s', $update->current, get_locale());
    if ('en_US' === $update->locale && 'en_US' === get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' === $update->locale && $update->packages->partial && $wp_version == $update->partial_version) {
        $updates = get_core_updates();
        if ($updates && 1 === count($updates)) {
            // If the only available update is a partial builds, it doesn't need a language-specific version string.
            $version_string = $update->current;
        }
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale()) {
        $version_string = sprintf('%s&ndash;%s', $update->current, $update->locale);
    }
    $current = false;
    if (!isset($update->response) || 'latest' === $update->response) {
        $current = true;
    }
    $message = '';
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    // Nightly build versions have two hyphens and a commit number.
    if (preg_match('/-\w+-\d+/', $update->current)) {
        // Retrieve the major version number.
        preg_match('/^\d+.\d+/', $update->current, $update_major);
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Update to latest %s nightly'), $update_major[0]);
    } else {
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Update to version %s'), $version_string);
    }
    if ('development' === $update->response) {
        $message = __('You can update to the latest nightly build manually:');
    } else if ($current) {
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Re-install version %s'), $version_string);
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version. */
            esc_url(__('https://wordpress.org/support/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        $php_update_message = '</p><p>' . sprintf(
            /* translators: %s: URL to Update PHP page. */
            __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        $annotation = wp_get_update_php_annotation();
        if ($annotation) {
            $php_update_message .= '</p><p><em>' . $annotation . '</em>';
        }
        if (!$mysql_compat && !$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $update->mysql_version,
                $php_version,
                $mysql_version
            ) . $php_update_message;
        } elseif (!$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $php_version
            ) . $php_update_message;
        } elseif (!$mysql_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->mysql_version,
                $mysql_version
            );
        } else {
            $message = sprintf(
                /* translators: 1: Installed WordPress version number, 2: URL to WordPress release notes, 3: New WordPress version number, including locale if necessary. */
                __('You can update from WordPress %1$s to <a href="%2$s">WordPress %3$s</a> manually:'),
                $wp_version,
                $version_url,
                $version_string
            );
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . esc_url($form_action) . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden" />';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden" />';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' !== $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' !== $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes.') . '</p>';
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale() && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(
            /* translators: %s: WordPress version. */
            __('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'),
            ('development' !== $update->response) ? $update->current : ''
        ) . '</p>';
    }
    echo '</form>';
}

WordPress Version: 5.8

/**
 * Lists available core updates.
 *
 * @since 2.7.0
 *
 * @global string $wp_local_package Locale code of the package.
 * @global wpdb   $wpdb             WordPress database abstraction object.
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    $version_string = sprintf('%s&ndash;%s', $update->current, get_locale());
    if ('en_US' === $update->locale && 'en_US' === get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' === $update->locale && $update->packages->partial && $wp_version == $update->partial_version) {
        $updates = get_core_updates();
        if ($updates && 1 === count($updates)) {
            // If the only available update is a partial builds, it doesn't need a language-specific version string.
            $version_string = $update->current;
        }
    }
    $current = false;
    if (!isset($update->response) || 'latest' === $update->response) {
        $current = true;
    }
    $message = '';
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    // Nightly build versions have two hyphens and a commit number.
    if (preg_match('/-\w+-\d+/', $update->current)) {
        // Retrieve the major version number.
        preg_match('/^\d+.\d+/', $update->current, $update_major);
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Update to latest %s nightly'), $update_major[0]);
    } else {
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Update to version %s'), $version_string);
    }
    if ('development' === $update->response) {
        $message = __('You can update to the latest nightly build manually:');
    } else if ($current) {
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Re-install version %s'), $version_string);
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version. */
            esc_url(__('https://wordpress.org/support/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        $php_update_message = '</p><p>' . sprintf(
            /* translators: %s: URL to Update PHP page. */
            __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        $annotation = wp_get_update_php_annotation();
        if ($annotation) {
            $php_update_message .= '</p><p><em>' . $annotation . '</em>';
        }
        if (!$mysql_compat && !$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $update->mysql_version,
                $php_version,
                $mysql_version
            ) . $php_update_message;
        } elseif (!$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $php_version
            ) . $php_update_message;
        } elseif (!$mysql_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->mysql_version,
                $mysql_version
            );
        } else {
            $message = sprintf(
                /* translators: 1: Installed WordPress version number, 2: URL to WordPress release notes, 3: New WordPress version number, including locale if necessary. */
                __('You can update from WordPress %1$s to <a href="%2$s">WordPress %3$s</a> manually:'),
                $wp_version,
                $version_url,
                $version_string
            );
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden" />';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden" />';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' !== $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' !== $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes.') . '</p>';
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale() && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(
            /* translators: %s: WordPress version. */
            __('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'),
            ('development' !== $update->response) ? $update->current : ''
        ) . '</p>';
    }
    echo '</form>';
}

WordPress Version: 5.7

/**
 * Lists available core updates.
 *
 * @since 2.7.0
 *
 * @global string $wp_local_package Locale code of the package.
 * @global wpdb   $wpdb             WordPress database abstraction object.
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    $version_string = sprintf('%s&ndash;%s', $update->current, get_locale());
    if ('en_US' === $update->locale && 'en_US' === get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' === $update->locale && $update->packages->partial && $wp_version == $update->partial_version) {
        $updates = get_core_updates();
        if ($updates && 1 === count($updates)) {
            // If the only available update is a partial builds, it doesn't need a language-specific version string.
            $version_string = $update->current;
        }
    }
    $current = false;
    if (!isset($update->response) || 'latest' === $update->response) {
        $current = true;
    }
    $is_development_version = preg_match('/alpha|beta|RC/', $version_string);
    $message = '';
    $submit = $is_development_version ? __('Update to latest nightly') : __('Update now');
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    if ('development' === $update->response) {
        $message = __('You can update to the latest nightly build manually:');
    } else if ($current) {
        /* translators: %s: WordPress version. */
        $submit = sprintf(__('Re-install version %s'), $version_string);
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version. */
            esc_url(__('https://wordpress.org/support/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        $php_update_message = '</p><p>' . sprintf(
            /* translators: %s: URL to Update PHP page. */
            __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        $annotation = wp_get_update_php_annotation();
        if ($annotation) {
            $php_update_message .= '</p><p><em>' . $annotation . '</em>';
        }
        if (!$mysql_compat && !$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $update->mysql_version,
                $php_version,
                $mysql_version
            ) . $php_update_message;
        } elseif (!$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $php_version
            ) . $php_update_message;
        } elseif (!$mysql_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->mysql_version,
                $mysql_version
            );
        } else {
            $message = sprintf(
                /* translators: 1: Installed WordPress version number, 2: URL to WordPress release notes, 3: New WordPress version number, including locale if necessary. */
                __('You can update from WordPress %1$s to <a href="%2$s">WordPress %3$s</a> manually:'),
                $wp_version,
                $version_url,
                $version_string
            );
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden"/>';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden"/>';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' !== $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' !== $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes.') . '</p>';
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale() && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(
            /* translators: %s: WordPress version. */
            __('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'),
            ('development' !== $update->response) ? $update->current : ''
        ) . '</p>';
    }
    echo '</form>';
}

WordPress Version: 5.6

/**
 * Lists available core updates.
 *
 * @since 2.7.0
 *
 * @global string $wp_local_package Locale code of the package.
 * @global wpdb   $wpdb             WordPress database abstraction object.
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    $version_string = sprintf('%s&ndash;<strong>%s</strong>', $update->current, $update->locale);
    if ('en_US' === $update->locale && 'en_US' === get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' === $update->locale && $update->packages->partial && $wp_version == $update->partial_version) {
        $updates = get_core_updates();
        if ($updates && 1 === count($updates)) {
            // If the only available update is a partial builds, it doesn't need a language-specific version string.
            $version_string = $update->current;
        }
    }
    $current = false;
    if (!isset($update->response) || 'latest' === $update->response) {
        $current = true;
    }
    $submit = __('Update Now');
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    if ('development' === $update->response) {
        $message = __('You can update to the latest nightly build manually:');
    } else if ($current) {
        /* translators: %s: WordPress version. */
        $message = sprintf(__('If you need to re-install version %s, you can do so here:'), $version_string);
        $submit = __('Re-install Now');
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version. */
            esc_url(__('https://wordpress.org/support/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        $php_update_message = '</p><p>' . sprintf(
            /* translators: %s: URL to Update PHP page. */
            __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        $annotation = wp_get_update_php_annotation();
        if ($annotation) {
            $php_update_message .= '</p><p><em>' . $annotation . '</em>';
        }
        if (!$mysql_compat && !$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $update->mysql_version,
                $php_version,
                $mysql_version
            ) . $php_update_message;
        } elseif (!$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $php_version
            ) . $php_update_message;
        } elseif (!$mysql_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->mysql_version,
                $mysql_version
            );
        } else {
            $message = sprintf(
                /* translators: 1: Installed WordPress version number, 2: URL to WordPress release notes, 3: New WordPress version number, including locale if necessary. */
                __('You can update from WordPress %1$s to <a href="%2$s">WordPress %3$s</a> manually:'),
                $wp_version,
                $version_url,
                $version_string
            );
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden"/>';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden"/>';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' !== $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' !== $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes.') . '</p>';
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale() && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(
            /* translators: %s: WordPress version. */
            __('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'),
            ('development' !== $update->response) ? $update->current : ''
        ) . '</p>';
    }
    echo '</form>';
}

WordPress Version: 5.5

/**
 * Lists available core updates.
 *
 * @since 2.7.0
 *
 * @global string $wp_local_package Locale code of the package.
 * @global wpdb   $wpdb             WordPress database abstraction object.
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    $version_string = sprintf('%s&ndash;<strong>%s</strong>', $update->current, $update->locale);
    if ('en_US' === $update->locale && 'en_US' === get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' === $update->locale && $update->packages->partial && $wp_version == $update->partial_version) {
        $updates = get_core_updates();
        if ($updates && 1 === count($updates)) {
            // If the only available update is a partial builds, it doesn't need a language-specific version string.
            $version_string = $update->current;
        }
    }
    $current = false;
    if (!isset($update->response) || 'latest' === $update->response) {
        $current = true;
    }
    $submit = __('Update Now');
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    if ('development' === $update->response) {
        $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically:');
    } else if ($current) {
        /* translators: %s: WordPress version. */
        $message = sprintf(__('If you need to re-install version %s, you can do so here:'), $version_string);
        $submit = __('Re-install Now');
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version. */
            esc_url(__('https://wordpress.org/support/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        $php_update_message = '</p><p>' . sprintf(
            /* translators: %s: URL to Update PHP page. */
            __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        $annotation = wp_get_update_php_annotation();
        if ($annotation) {
            $php_update_message .= '</p><p><em>' . $annotation . '</em>';
        }
        if (!$mysql_compat && !$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $update->mysql_version,
                $php_version,
                $mysql_version
            ) . $php_update_message;
        } elseif (!$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $php_version
            ) . $php_update_message;
        } elseif (!$mysql_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->mysql_version,
                $mysql_version
            );
        } else {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number including locale if necessary. */
                __('You can update to <a href="%1$s">WordPress %2$s</a> automatically:'),
                $version_url,
                $version_string
            );
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden"/>';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden"/>';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' !== $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' !== $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes.') . '</p>';
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale() && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(
            /* translators: %s: WordPress version. */
            __('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'),
            ('development' !== $update->response) ? $update->current : ''
        ) . '</p>';
    }
    echo '</form>';
}

WordPress Version: 5.4

/**
 * Lists available core updates.
 *
 * @since 2.7.0
 *
 * @global string $wp_local_package Locale code of the package.
 * @global wpdb   $wpdb             WordPress database abstraction object.
 *
 * @staticvar bool $first_pass
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    $version_string = sprintf('%s&ndash;<strong>%s</strong>', $update->current, $update->locale);
    if ('en_US' === $update->locale && 'en_US' === get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' === $update->locale && $update->packages->partial && $wp_version == $update->partial_version) {
        $updates = get_core_updates();
        if ($updates && 1 == count($updates)) {
            // If the only available update is a partial builds, it doesn't need a language-specific version string.
            $version_string = $update->current;
        }
    }
    $current = false;
    if (!isset($update->response) || 'latest' === $update->response) {
        $current = true;
    }
    $submit = __('Update Now');
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    if ('development' === $update->response) {
        $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically:');
    } else if ($current) {
        /* translators: %s: WordPress version. */
        $message = sprintf(__('If you need to re-install version %s, you can do so here:'), $version_string);
        $submit = __('Re-install Now');
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version. */
            esc_url(__('https://wordpress.org/support/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        $php_update_message = '</p><p>' . sprintf(
            /* translators: %s: URL to Update PHP page. */
            __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        $annotation = wp_get_update_php_annotation();
        if ($annotation) {
            $php_update_message .= '</p><p><em>' . $annotation . '</em>';
        }
        if (!$mysql_compat && !$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $update->mysql_version,
                $php_version,
                $mysql_version
            ) . $php_update_message;
        } elseif (!$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $php_version
            ) . $php_update_message;
        } elseif (!$mysql_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->mysql_version,
                $mysql_version
            );
        } else {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number including locale if necessary. */
                __('You can update to <a href="%1$s">WordPress %2$s</a> automatically:'),
                $version_url,
                $version_string
            );
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden"/>';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden"/>';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' !== $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' !== $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes.') . '</p>';
    } elseif ('en_US' === $update->locale && 'en_US' !== get_locale() && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(
            /* translators: %s: WordPress version. */
            __('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'),
            ('development' !== $update->response) ? $update->current : ''
        ) . '</p>';
    }
    echo '</form>';
}

WordPress Version: 5.3

/**
 * @global string $wp_local_package
 * @global wpdb   $wpdb             WordPress database abstraction object.
 *
 * @staticvar bool $first_pass
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    $version_string = sprintf('%s&ndash;<strong>%s</strong>', $update->current, $update->locale);
    if ('en_US' == $update->locale && 'en_US' == get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version) {
        $updates = get_core_updates();
        if ($updates && 1 == count($updates)) {
            // If the only available update is a partial builds, it doesn't need a language-specific version string.
            $version_string = $update->current;
        }
    }
    $current = false;
    if (!isset($update->response) || 'latest' == $update->response) {
        $current = true;
    }
    $submit = __('Update Now');
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    if ('development' == $update->response) {
        $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically:');
    } else if ($current) {
        /* translators: %s: WordPress version. */
        $message = sprintf(__('If you need to re-install version %s, you can do so here:'), $version_string);
        $submit = __('Re-install Now');
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version. */
            esc_url(__('https://wordpress.org/support/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        $php_update_message = '</p><p>' . sprintf(
            /* translators: %s: URL to Update PHP page. */
            __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        $annotation = wp_get_update_php_annotation();
        if ($annotation) {
            $php_update_message .= '</p><p><em>' . $annotation . '</em>';
        }
        if (!$mysql_compat && !$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $update->mysql_version,
                $php_version,
                $mysql_version
            ) . $php_update_message;
        } elseif (!$php_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->php_version,
                $php_version
            ) . $php_update_message;
        } elseif (!$mysql_compat) {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
                __('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'),
                $version_url,
                $update->current,
                $update->mysql_version,
                $mysql_version
            );
        } else {
            $message = sprintf(
                /* translators: 1: URL to WordPress release notes, 2: WordPress version number including locale if necessary. */
                __('You can update to <a href="%1$s">WordPress %2$s</a> automatically:'),
                $version_url,
                $version_string
            );
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden"/>';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden"/>';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' != $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' != $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.') . '</p>';
    } elseif ('en_US' == $update->locale && get_locale() != 'en_US' && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(
            /* translators: %s: WordPress version. */
            __('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'),
            ($update->response != 'development') ? $update->current : ''
        ) . '</p>';
    }
    echo '</form>';
}

WordPress Version: 2.1

/**
 * @global string $wp_local_package
 * @global wpdb   $wpdb
 *
 * @staticvar bool $first_pass
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    if ('en_US' == $update->locale && 'en_US' == get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ($updates = get_core_updates()) && 1 == count($updates)) {
        // If the only available update is a partial builds, it doesn't need a language-specific version string.
        $version_string = $update->current;
    } else {
        $version_string = sprintf('%s&ndash;<strong>%s</strong>', $update->current, $update->locale);
    }
    $current = false;
    if (!isset($update->response) || 'latest' == $update->response) {
        $current = true;
    }
    $submit = __('Update Now');
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    if ('development' == $update->response) {
        $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically:');
    } else if ($current) {
        $message = sprintf(__('If you need to re-install version %s, you can do so here:'), $version_string);
        $submit = __('Re-install Now');
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version */
            esc_url(__('https://wordpress.org/support/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        /* translators: %s: Update PHP page URL */
        $php_update_message = '</p><p>' . sprintf(__('<a href="%s">Learn more about updating PHP</a>.'), esc_url(wp_get_update_php_url()));
        $annotation = wp_get_update_php_annotation();
        if ($annotation) {
            $php_update_message .= '</p><p><em>' . $annotation . '</em>';
        }
        if (!$mysql_compat && !$php_compat) {
            /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number */
            $message = sprintf(__('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'), $version_url, $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version) . $php_update_message;
        } elseif (!$php_compat) {
            /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number */
            $message = sprintf(__('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'), $version_url, $update->current, $update->php_version, $php_version) . $php_update_message;
        } elseif (!$mysql_compat) {
            /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number */
            $message = sprintf(__('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'), $version_url, $update->current, $update->mysql_version, $mysql_version);
        } else {
            /* translators: 1: URL to WordPress release notes, 2: WordPress version number including locale if necessary */
            $message = sprintf(__('You can update to <a href="%1$s">WordPress %2$s</a> automatically:'), $version_url, $version_string);
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden"/>';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden"/>';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' != $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' != $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.') . '</p>';
    } elseif ('en_US' == $update->locale && get_locale() != 'en_US' && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(__('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'), ($update->response != 'development') ? $update->current : '') . '</p>';
    }
    echo '</form>';
}

WordPress Version: 5.1

/**
 * @global string $wp_local_package
 * @global wpdb   $wpdb
 *
 * @staticvar bool $first_pass
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    if ('en_US' == $update->locale && 'en_US' == get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ($updates = get_core_updates()) && 1 == count($updates)) {
        // If the only available update is a partial builds, it doesn't need a language-specific version string.
        $version_string = $update->current;
    } else {
        $version_string = sprintf('%s&ndash;<strong>%s</strong>', $update->current, $update->locale);
    }
    $current = false;
    if (!isset($update->response) || 'latest' == $update->response) {
        $current = true;
    }
    $submit = __('Update Now');
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    if ('development' == $update->response) {
        $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically:');
    } else if ($current) {
        $message = sprintf(__('If you need to re-install version %s, you can do so here:'), $version_string);
        $submit = __('Re-install Now');
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        $version_url = sprintf(
            /* translators: %s: WordPress version */
            esc_url(__('https://wordpress.org/support/wordpress-version/version-%s/')),
            sanitize_title($update->current)
        );
        if (!$mysql_compat && !$php_compat) {
            /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number */
            $message = sprintf(__('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.'), $version_url, $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version);
        } elseif (!$php_compat) {
            /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number */
            $message = sprintf(__('You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.'), $version_url, $update->current, $update->php_version, $php_version);
        } elseif (!$mysql_compat) {
            /* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number */
            $message = sprintf(__('You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.'), $version_url, $update->current, $update->mysql_version, $mysql_version);
        } else {
            /* translators: 1: URL to WordPress release notes, 2: WordPress version number including locale if necessary */
            $message = sprintf(__('You can update to <a href="%1$s">WordPress %2$s</a> automatically:'), $version_url, $version_string);
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden"/>';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden"/>';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' != $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' != $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.') . '</p>';
    } elseif ('en_US' == $update->locale && get_locale() != 'en_US' && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        // Partial builds don't need language-specific warnings.
        echo '<p class="hint">' . sprintf(__('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'), ($update->response != 'development') ? $update->current : '') . '</p>';
    }
    echo '</form>';
}

WordPress Version: 4.7

/**
 *
 * @global string $wp_local_package
 * @global wpdb   $wpdb
 *
 * @staticvar bool $first_pass
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb;
    static $first_pass = true;
    $wp_version = get_bloginfo('version');
    if ('en_US' == $update->locale && 'en_US' == get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ($updates = get_core_updates()) && 1 == count($updates)) {
        $version_string = $update->current;
    } else {
        $version_string = sprintf("%s&ndash;<strong>%s</strong>", $update->current, $update->locale);
    }
    $current = false;
    if (!isset($update->response) || 'latest' == $update->response) {
        $current = true;
    }
    $submit = __('Update Now');
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    if ('development' == $update->response) {
        $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically:');
    } else if ($current) {
        $message = sprintf(__('If you need to re-install version %s, you can do so here:'), $version_string);
        $submit = __('Re-install Now');
        $form_action = 'update-core.php?action=do-core-reinstall';
    } else {
        $php_compat = version_compare($php_version, $update->php_version, '>=');
        if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
            $mysql_compat = true;
        } else {
            $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
        }
        if (!$mysql_compat && !$php_compat) {
            /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number */
            $message = sprintf(__('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version);
        } elseif (!$php_compat) {
            /* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number */
            $message = sprintf(__('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version);
        } elseif (!$mysql_compat) {
            /* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number */
            $message = sprintf(__('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version);
        } else {
            /* translators: 1: WordPress version number, 2: WordPress version number including locale if necessary */
            $message = sprintf(__('You can update to <a href="https://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically:'), $update->current, $version_string);
        }
        if (!$mysql_compat || !$php_compat) {
            $show_buttons = false;
        }
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden"/>';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden"/>';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? '' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, '', 'upgrade', false);
        }
    }
    if ('en_US' != $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), '', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), '', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' != $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.') . '</p>';
    } elseif ('en_US' == $update->locale && get_locale() != 'en_US' && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        echo '<p class="hint">' . sprintf(__('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'), ($update->response != 'development') ? $update->current : '') . '</p>';
    }
    echo '</form>';
}

WordPress Version: 4.3

/**
 *
 * @global string $wp_local_package
 * @global wpdb   $wpdb
 * @global string $wp_version
 *
 * @staticvar bool $first_pass
 *
 * @param object $update
 */
function list_core_update($update)
{
    global $wp_local_package, $wpdb, $wp_version;
    static $first_pass = true;
    if ('en_US' == $update->locale && 'en_US' == get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ($updates = get_core_updates()) && 1 == count($updates)) {
        $version_string = $update->current;
    } else {
        $version_string = sprintf("%s&ndash;<strong>%s</strong>", $update->current, $update->locale);
    }
    $current = false;
    if (!isset($update->response) || 'latest' == $update->response) {
        $current = true;
    }
    $submit = __('Update Now');
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    if ('development' == $update->response) {
        $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically or download the nightly build and install it manually:');
        $download = __('Download nightly build');
    } else {
        if ($current) {
            $message = sprintf(__('If you need to re-install version %s, you can do so here or download the package and re-install manually:'), $version_string);
            $submit = __('Re-install Now');
            $form_action = 'update-core.php?action=do-core-reinstall';
        } else {
            $php_compat = version_compare($php_version, $update->php_version, '>=');
            if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
                $mysql_compat = true;
            } else {
                $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
            }
            if (!$mysql_compat && !$php_compat) {
                $message = sprintf(__('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version);
            } elseif (!$php_compat) {
                $message = sprintf(__('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version);
            } elseif (!$mysql_compat) {
                $message = sprintf(__('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version);
            } else {
                $message = sprintf(__('You can update to <a href="https://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically or download the package and install it manually:'), $update->current, $version_string);
            }
            if (!$mysql_compat || !$php_compat) {
                $show_buttons = false;
            }
        }
        $download = sprintf(__('Download %s'), $version_string);
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden"/>';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden"/>';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? 'button' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, 'button', 'upgrade', false);
        }
        echo '&nbsp;<a href="' . esc_url($update->download) . '" class="button">' . $download . '</a>&nbsp;';
    }
    if ('en_US' != $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), 'button', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), 'button', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' != $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.') . '</p>';
    } elseif ('en_US' == $update->locale && get_locale() != 'en_US' && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        echo '<p class="hint">' . sprintf(__('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'), ($update->response != 'development') ? $update->current : '') . '</p>';
    }
    echo '</form>';
}

WordPress Version: 4.2

function list_core_update($update)
{
    global $wp_local_package, $wpdb, $wp_version;
    static $first_pass = true;
    if ('en_US' == $update->locale && 'en_US' == get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ($updates = get_core_updates()) && 1 == count($updates)) {
        $version_string = $update->current;
    } else {
        $version_string = sprintf("%s&ndash;<strong>%s</strong>", $update->current, $update->locale);
    }
    $current = false;
    if (!isset($update->response) || 'latest' == $update->response) {
        $current = true;
    }
    $submit = __('Update Now');
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    if ('development' == $update->response) {
        $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically or download the nightly build and install it manually:');
        $download = __('Download nightly build');
    } else {
        if ($current) {
            $message = sprintf(__('If you need to re-install version %s, you can do so here or download the package and re-install manually:'), $version_string);
            $submit = __('Re-install Now');
            $form_action = 'update-core.php?action=do-core-reinstall';
        } else {
            $php_compat = version_compare($php_version, $update->php_version, '>=');
            if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
                $mysql_compat = true;
            } else {
                $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
            }
            if (!$mysql_compat && !$php_compat) {
                $message = sprintf(__('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version);
            } elseif (!$php_compat) {
                $message = sprintf(__('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version);
            } elseif (!$mysql_compat) {
                $message = sprintf(__('You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version);
            } else {
                $message = sprintf(__('You can update to <a href="https://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically or download the package and install it manually:'), $update->current, $version_string);
            }
            if (!$mysql_compat || !$php_compat) {
                $show_buttons = false;
            }
        }
        $download = sprintf(__('Download %s'), $version_string);
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden"/>';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden"/>';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? 'button' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, 'button', 'upgrade', false);
        }
        echo '&nbsp;<a href="' . esc_url($update->download) . '" class="button">' . $download . '</a>&nbsp;';
    }
    if ('en_US' != $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), 'button', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), 'button', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' != $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.') . '</p>';
    } elseif ('en_US' == $update->locale && get_locale() != 'en_US' && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        echo '<p class="hint">' . sprintf(__('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'), ($update->response != 'development') ? $update->current : '') . '</p>';
    }
    echo '</form>';
}

WordPress Version: 3.7

function list_core_update($update)
{
    global $wp_local_package, $wpdb, $wp_version;
    static $first_pass = true;
    if ('en_US' == $update->locale && 'en_US' == get_locale()) {
        $version_string = $update->current;
    } elseif ('en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ($updates = get_core_updates()) && 1 == count($updates)) {
        $version_string = $update->current;
    } else {
        $version_string = sprintf("%s&ndash;<strong>%s</strong>", $update->current, $update->locale);
    }
    $current = false;
    if (!isset($update->response) || 'latest' == $update->response) {
        $current = true;
    }
    $submit = __('Update Now');
    $form_action = 'update-core.php?action=do-core-upgrade';
    $php_version = phpversion();
    $mysql_version = $wpdb->db_version();
    $show_buttons = true;
    if ('development' == $update->response) {
        $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically or download the nightly build and install it manually:');
        $download = __('Download nightly build');
    } else {
        if ($current) {
            $message = sprintf(__('If you need to re-install version %s, you can do so here or download the package and re-install manually:'), $version_string);
            $submit = __('Re-install Now');
            $form_action = 'update-core.php?action=do-core-reinstall';
        } else {
            $php_compat = version_compare($php_version, $update->php_version, '>=');
            if (file_exists(WP_CONTENT_DIR . '/db.php') && empty($wpdb->is_mysql)) {
                $mysql_compat = true;
            } else {
                $mysql_compat = version_compare($mysql_version, $update->mysql_version, '>=');
            }
            if (!$mysql_compat && !$php_compat) {
                $message = sprintf(__('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version);
            } elseif (!$php_compat) {
                $message = sprintf(__('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version);
            } elseif (!$mysql_compat) {
                $message = sprintf(__('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version);
            } else {
                $message = sprintf(__('You can update to <a href="http://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically or download the package and install it manually:'), $update->current, $version_string);
            }
            if (!$mysql_compat || !$php_compat) {
                $show_buttons = false;
            }
        }
        $download = sprintf(__('Download %s'), $version_string);
    }
    echo '<p>';
    echo $message;
    echo '</p>';
    echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
    wp_nonce_field('upgrade-core');
    echo '<p>';
    echo '<input name="version" value="' . esc_attr($update->current) . '" type="hidden"/>';
    echo '<input name="locale" value="' . esc_attr($update->locale) . '" type="hidden"/>';
    if ($show_buttons) {
        if ($first_pass) {
            submit_button($submit, $current ? 'button' : 'primary regular', 'upgrade', false);
            $first_pass = false;
        } else {
            submit_button($submit, 'button', 'upgrade', false);
        }
        echo '&nbsp;<a href="' . esc_url($update->download) . '" class="button">' . $download . '</a>&nbsp;';
    }
    if ('en_US' != $update->locale) {
        if (!isset($update->dismissed) || !$update->dismissed) {
            submit_button(__('Hide this update'), 'button', 'dismiss', false);
        } else {
            submit_button(__('Bring back this update'), 'button', 'undismiss', false);
        }
    }
    echo '</p>';
    if ('en_US' != $update->locale && (!isset($wp_local_package) || $wp_local_package != $update->locale)) {
        echo '<p class="hint">' . __('This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation.') . '</p>';
    } elseif ('en_US' == $update->locale && get_locale() != 'en_US' && (!$update->packages->partial && $wp_version == $update->partial_version)) {
        echo '<p class="hint">' . sprintf(__('You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.'), ($update->response != 'development') ? $update->current : '') . '</p>';
    }
    echo '</form>';
}