Changeset 25784
- Timestamp:
- 10/15/2013 05:07:55 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/update-core.php
r25783 r25784 23 23 24 24 function list_core_update( $update ) { 25 global $wp_local_package, $wpdb; 26 static $first_pass = true; 27 28 $version_string = ('en_US' == $update->locale && 'en_US' == get_locale() ) ? 29 $update->current : sprintf("%s–<strong>%s</strong>", $update->current, $update->locale); 25 global $wp_local_package, $wpdb, $wp_version; 26 static $first_pass = true; 27 28 if ( 'en_US' == $update->locale && 'en_US' == get_locale() ) 29 $version_string = $update->current; 30 // If the only available update is a partial builds, it doesn't need a language-specific version string. 31 elseif ( 'en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ( $updates = get_core_updates() ) && 1 == count( $updates ) ) 32 $version_string = $update->current; 33 else 34 $version_string = sprintf( "%s–<strong>%s</strong>", $update->current, $update->locale ); 35 30 36 $current = false; 31 37 if ( !isset($update->response) || 'latest' == $update->response ) … … 90 96 if ( 'en_US' != $update->locale && ( !isset($wp_local_package) || $wp_local_package != $update->locale ) ) 91 97 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>'; 92 else if ( 'en_US' == $update->locale && get_locale() != 'en_US' ) { 98 // Partial builds don't need language-specific warnings. 99 elseif ( 'en_US' == $update->locale && get_locale() != 'en_US' && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) { 93 100 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>'; 94 101 }
Note: See TracChangeset
for help on using the changeset viewer.