Changeset 58813 for trunk/src/wp-includes/update.php
- Timestamp:
- 07/27/2024 12:25:44 AM (22 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/update.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/update.php
r58409 r58813 32 32 } 33 33 34 // Include an unmodified $wp_version.35 require ABSPATH . WPINC . '/version.php';36 34 $php_version = PHP_VERSION; 37 35 … … 40 38 41 39 // Invalidate the transient when $wp_version changes. 42 if ( is_object( $current ) && $wp_version!== $current->version_checked ) {40 if ( is_object( $current ) && wp_get_wp_version() !== $current->version_checked ) { 43 41 $current = false; 44 42 } … … 47 45 $current = new stdClass(); 48 46 $current->updates = array(); 49 $current->version_checked = $wp_version;47 $current->version_checked = wp_get_wp_version(); 50 48 } 51 49 … … 96 94 sort( $extensions, SORT_STRING | SORT_FLAG_CASE ); 97 95 $query = array( 98 'version' => $wp_version,96 'version' => wp_get_wp_version(), 99 97 'php' => $php_version, 100 98 'locale' => $locale, … … 192 190 $options = array( 193 191 'timeout' => $doing_cron ? 30 : 3, 194 'user-agent' => 'WordPress/' . $wp_version. '; ' . home_url( '/' ),192 'user-agent' => 'WordPress/' . wp_get_wp_version() . '; ' . home_url( '/' ), 195 193 'headers' => array( 196 194 'wp_install' => $wp_install, … … 267 265 $updates->updates = $offers; 268 266 $updates->last_checked = time(); 269 $updates->version_checked = $wp_version;267 $updates->version_checked = wp_get_wp_version(); 270 268 271 269 if ( isset( $body['translations'] ) ) { … … 315 313 return; 316 314 } 317 318 // Include an unmodified $wp_version.319 require ABSPATH . WPINC . '/version.php';320 315 321 316 // If running blog-side, bail unless we've not checked in the last 12 hours. … … 424 419 'all' => wp_json_encode( true ), 425 420 ), 426 'user-agent' => 'WordPress/' . $wp_version. '; ' . home_url( '/' ),421 'user-agent' => 'WordPress/' . wp_get_wp_version() . '; ' . home_url( '/' ), 427 422 ); 428 423 … … 591 586 } 592 587 593 // Include an unmodified $wp_version.594 require ABSPATH . WPINC . '/version.php';595 596 588 $installed_themes = wp_get_themes(); 597 589 $translations = wp_get_installed_translations( 'themes' ); … … 706 698 'locale' => wp_json_encode( $locales ), 707 699 ), 708 'user-agent' => 'WordPress/' . $wp_version. '; ' . home_url( '/' ),700 'user-agent' => 'WordPress/' . wp_get_wp_version() . '; ' . home_url( '/' ), 709 701 ); 710 702 … … 990 982 */ 991 983 function _maybe_update_core() { 992 // Include an unmodified $wp_version.993 require ABSPATH . WPINC . '/version.php';994 995 984 $current = get_site_transient( 'update_core' ); 996 985 997 986 if ( isset( $current->last_checked, $current->version_checked ) 998 987 && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) 999 && $current->version_checked === $wp_version988 && wp_get_wp_version() === $current->version_checked 1000 989 ) { 1001 990 return;
Note: See TracChangeset
for help on using the changeset viewer.