Changeset 47218 for trunk/src/wp-admin/update-core.php
- Timestamp:
- 02/09/2020 04:51:22 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/update-core.php
r47198 r47218 43 43 $version_string = sprintf( '%s–<strong>%s</strong>', $update->current, $update->locale ); 44 44 45 if ( 'en_US' == $update->locale && 'en_US'== get_locale() ) {45 if ( 'en_US' === $update->locale && 'en_US' === get_locale() ) { 46 46 $version_string = $update->current; 47 } elseif ( 'en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version ) {47 } elseif ( 'en_US' === $update->locale && $update->packages->partial && $wp_version == $update->partial_version ) { 48 48 $updates = get_core_updates(); 49 49 if ( $updates && 1 == count( $updates ) ) { … … 54 54 55 55 $current = false; 56 if ( ! isset( $update->response ) || 'latest' == $update->response ) {56 if ( ! isset( $update->response ) || 'latest' === $update->response ) { 57 57 $current = true; 58 58 } … … 62 62 $mysql_version = $wpdb->db_version(); 63 63 $show_buttons = true; 64 if ( 'development' == $update->response ) {64 if ( 'development' === $update->response ) { 65 65 $message = __( 'You are using a development version of WordPress. You can update to the latest nightly build automatically:' ); 66 66 } else { … … 154 154 } 155 155 } 156 if ( 'en_US' != $update->locale ) {156 if ( 'en_US' !== $update->locale ) { 157 157 if ( ! isset( $update->dismissed ) || ! $update->dismissed ) { 158 158 submit_button( __( 'Hide this update' ), '', 'dismiss', false ); … … 162 162 } 163 163 echo '</p>'; 164 if ( 'en_US' != $update->locale && ( ! isset( $wp_local_package ) || $wp_local_package != $update->locale ) ) {164 if ( 'en_US' !== $update->locale && ( ! isset( $wp_local_package ) || $wp_local_package != $update->locale ) ) { 165 165 echo '<p class="hint">' . __( 'This localized version contains both the translation and various other localization fixes.' ) . '</p>'; 166 } elseif ( 'en_US' == $update->locale && get_locale() != 'en_US'&& ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) {166 } elseif ( 'en_US' === $update->locale && 'en_US' !== get_locale() && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) { 167 167 // Partial builds don't need language-specific warnings. 168 168 echo '<p class="hint">' . sprintf( 169 169 /* translators: %s: WordPress version. */ 170 170 __( '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.' ), 171 $update->response != 'development'? $update->current : ''171 'development' !== $update->response ? $update->current : '' 172 172 ) . '</p>'; 173 173 } … … 226 226 $updates = get_core_updates(); 227 227 228 if ( ! isset( $updates[0]->response ) || 'latest' == $updates[0]->response ) {228 if ( ! isset( $updates[0]->response ) || 'latest' === $updates[0]->response ) { 229 229 echo '<h2>'; 230 230 _e( 'You have the latest version of WordPress.' ); … … 257 257 } 258 258 259 if ( isset( $updates[0] ) && $updates[0]->response == 'development') {259 if ( isset( $updates[0] ) && 'development' === $updates[0]->response ) { 260 260 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 261 261 $upgrader = new WP_Automatic_Updater; … … 275 275 echo '</ul>'; 276 276 // Don't show the maintenance mode notice when we are only showing a single re-install option. 277 if ( $updates && ( count( $updates ) > 1 || $updates[0]->response != 'latest') ) {277 if ( $updates && ( count( $updates ) > 1 || 'latest' !== $updates[0]->response ) ) { 278 278 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>'; 279 279 } elseif ( ! $updates ) { … … 308 308 309 309 $core_updates = get_core_updates(); 310 if ( ! isset( $core_updates[0]->response ) || 'latest' == $core_updates[0]->response || 'development'== $core_updates[0]->response || version_compare( $core_updates[0]->current, $cur_wp_version, '=' ) ) {310 if ( ! isset( $core_updates[0]->response ) || 'latest' === $core_updates[0]->response || 'development' === $core_updates[0]->response || version_compare( $core_updates[0]->current, $cur_wp_version, '=' ) ) { 311 311 $core_update_version = false; 312 312 } else { … … 530 530 $updates = wp_get_translation_updates(); 531 531 if ( ! $updates ) { 532 if ( 'en_US' != get_locale() ) {532 if ( 'en_US' !== get_locale() ) { 533 533 echo '<h2>' . __( 'Translations' ) . '</h2>'; 534 534 echo '<p>' . __( 'Your translations are all up to date.' ) . '</p>'; … … 693 693 if ( ( 'do-theme-upgrade' == $action || ( 'do-plugin-upgrade' == $action && ! isset( $_GET['plugins'] ) ) ) 694 694 && ! isset( $_POST['checked'] ) ) { 695 $upgrade_error = $action == 'do-theme-upgrade'? 'themes' : 'plugins';695 $upgrade_error = 'do-theme-upgrade' == $action ? 'themes' : 'plugins'; 696 696 $action = 'upgrade-core'; 697 697 } … … 714 714 $updates_howto .= '<p>' . __( '<strong>Themes and Plugins</strong> — To update individual themes or plugins from this screen, use the checkboxes to make your selection, then <strong>click on the appropriate “Update” button</strong>. To update all of your themes or plugins at once, you can check the box at the top of the section to select all before clicking the update button.' ) . '</p>'; 715 715 716 if ( 'en_US' != get_locale() ) {716 if ( 'en_US' !== get_locale() ) { 717 717 $updates_howto .= '<p>' . __( '<strong>Translations</strong> — The files translating WordPress into your language are updated for you whenever any other updates occur. But if these files are out of date, you can <strong>click the “Update Translations”</strong> button.' ) . '</p>'; 718 718 } … … 744 744 if ( $upgrade_error ) { 745 745 echo '<div class="error"><p>'; 746 if ( $upgrade_error == 'themes') {746 if ( 'themes' === $upgrade_error ) { 747 747 _e( 'Please select one or more themes to update.' ); 748 748 } else {
Note: See TracChangeset
for help on using the changeset viewer.