diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php
index 570703e5d8..eebac90f11 100644
|
a
|
b
|
function core_upgrade_preamble() { |
| 177 | 177 | $wp_version = get_bloginfo( 'version' ); |
| 178 | 178 | $updates = get_core_updates(); |
| 179 | 179 | |
| 180 | | if ( ! isset( $updates[0]->response ) || 'latest' == $updates[0]->response ) { |
| | 180 | if ( ! isset( $updates[0]->response ) || 'latest' === $updates[0]->response ) { |
| 181 | 181 | echo '<h2>'; |
| 182 | 182 | _e( 'You have the latest version of WordPress.' ); |
| 183 | 183 | |
| 184 | 184 | if ( wp_http_supports( array( 'ssl' ) ) ) { |
| 185 | 185 | require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; |
| 186 | | $upgrader = new WP_Automatic_Updater; |
| | 186 | $upgrader = new WP_Automatic_Updater(); |
| 187 | 187 | $future_minor_update = (object) array( |
| 188 | 188 | 'current' => $wp_version . '.1.next.minor', |
| 189 | 189 | 'version' => $wp_version . '.1.next.minor', |
| … |
… |
function core_upgrade_preamble() { |
| 196 | 196 | } |
| 197 | 197 | } |
| 198 | 198 | echo '</h2>'; |
| 199 | | } else { |
| | 199 | } |
| | 200 | |
| | 201 | if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) { |
| 200 | 202 | echo '<div class="notice notice-warning"><p>'; |
| 201 | 203 | _e( '<strong>Important:</strong> Before updating, please <a href="https://codex.wordpress.org/WordPress_Backups">back up your database and files</a>. For help with updates, visit the <a href="https://codex.wordpress.org/Updating_WordPress">Updating WordPress</a> Codex page.' ); |
| 202 | 204 | echo '</p></div>'; |
| … |
… |
function core_upgrade_preamble() { |
| 206 | 208 | echo '</h2>'; |
| 207 | 209 | } |
| 208 | 210 | |
| 209 | | if ( isset( $updates[0] ) && $updates[0]->response == 'development' ) { |
| | 211 | if ( isset( $updates[0] ) && 'development' === $updates[0]->response ) { |
| 210 | 212 | require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; |
| 211 | | $upgrader = new WP_Automatic_Updater; |
| | 213 | $upgrader = new WP_Automatic_Updater(); |
| 212 | 214 | if ( wp_http_supports( 'ssl' ) && $upgrader->should_update( 'core', $updates[0], ABSPATH ) ) { |
| 213 | 215 | echo '<div class="updated inline"><p>'; |
| 214 | 216 | echo '<strong>' . __( 'BETA TESTERS:' ) . '</strong> ' . __( 'This site is set up to install updates of future beta versions automatically.' ); |
| … |
… |
function core_upgrade_preamble() { |
| 224 | 226 | } |
| 225 | 227 | echo '</ul>'; |
| 226 | 228 | // Don't show the maintenance mode notice when we are only showing a single re-install option. |
| 227 | | if ( $updates && ( count( $updates ) > 1 || $updates[0]->response != 'latest' ) ) { |
| | 229 | if ( $updates && ( count( $updates ) > 1 || 'latest' !== $updates[0]->response ) ) { |
| 228 | 230 | echo '<p>' . __( 'While your site is being updated, it will be in maintenance mode. As soon as your updates are complete, your site will return to normal.' ) . '</p>'; |
| 229 | 231 | } elseif ( ! $updates ) { |
| 230 | 232 | list( $normalized_version ) = explode( '-', $wp_version ); |