equal
deleted
inserted
replaced
35 */ |
35 */ |
36 function list_core_update( $update ) { |
36 function list_core_update( $update ) { |
37 global $wp_local_package, $wpdb; |
37 global $wp_local_package, $wpdb; |
38 static $first_pass = true; |
38 static $first_pass = true; |
39 |
39 |
40 $wp_version = get_bloginfo( 'version' ); |
40 $wp_version = wp_get_wp_version(); |
41 $version_string = sprintf( '%s–%s', $update->current, get_locale() ); |
41 $version_string = sprintf( '%s–%s', $update->current, get_locale() ); |
42 |
42 |
43 if ( 'en_US' === $update->locale && 'en_US' === get_locale() ) { |
43 if ( 'en_US' === $update->locale && 'en_US' === get_locale() ) { |
44 $version_string = $update->current; |
44 $version_string = $update->current; |
45 } elseif ( 'en_US' === $update->locale && $update->packages->partial && $wp_version === $update->partial_version ) { |
45 } elseif ( 'en_US' === $update->locale && $update->packages->partial && $wp_version === $update->partial_version ) { |
391 'minor' => $upgrade_minor, |
391 'minor' => $upgrade_minor, |
392 'major' => $upgrade_major, |
392 'major' => $upgrade_major, |
393 ); |
393 ); |
394 |
394 |
395 if ( $upgrade_major ) { |
395 if ( $upgrade_major ) { |
396 $wp_version = get_bloginfo( 'version' ); |
396 $wp_version = wp_get_wp_version(); |
397 $updates = get_core_updates(); |
397 $updates = get_core_updates(); |
398 |
398 |
399 if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) { |
399 if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) { |
400 echo '<p>' . wp_get_auto_update_message() . '</p>'; |
400 echo '<p>' . wp_get_auto_update_message() . '</p>'; |
401 } |
401 } |
458 * Display the upgrade plugins form. |
458 * Display the upgrade plugins form. |
459 * |
459 * |
460 * @since 2.9.0 |
460 * @since 2.9.0 |
461 */ |
461 */ |
462 function list_plugin_updates() { |
462 function list_plugin_updates() { |
463 $wp_version = get_bloginfo( 'version' ); |
463 $wp_version = wp_get_wp_version(); |
464 $cur_wp_version = preg_replace( '/-.*$/', '', $wp_version ); |
464 $cur_wp_version = preg_replace( '/-.*$/', '', $wp_version ); |
465 |
465 |
466 require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; |
466 require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; |
467 $plugins = get_plugin_updates(); |
467 $plugins = get_plugin_updates(); |
468 if ( empty( $plugins ) ) { |
468 if ( empty( $plugins ) ) { |
1094 |
1094 |
1095 $last_update_check = false; |
1095 $last_update_check = false; |
1096 $current = get_site_transient( 'update_core' ); |
1096 $current = get_site_transient( 'update_core' ); |
1097 |
1097 |
1098 if ( $current && isset( $current->last_checked ) ) { |
1098 if ( $current && isset( $current->last_checked ) ) { |
1099 $last_update_check = $current->last_checked + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS; |
1099 $last_update_check = $current->last_checked + (int) ( (float) get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); |
1100 } |
1100 } |
1101 |
1101 |
1102 echo '<h2 class="wp-current-version">'; |
1102 echo '<h2 class="wp-current-version">'; |
1103 /* translators: Current version of WordPress. */ |
1103 /* translators: Current version of WordPress. */ |
1104 printf( __( 'Current version: %s' ), get_bloginfo( 'version' ) ); |
1104 printf( __( 'Current version: %s' ), esc_html( wp_get_wp_version() ) ); |
1105 echo '</h2>'; |
1105 echo '</h2>'; |
1106 |
1106 |
1107 echo '<p class="update-last-checked">'; |
1107 echo '<p class="update-last-checked">'; |
1108 |
1108 |
1109 printf( |
1109 printf( |