Changeset 59159
- Timestamp:
- 10/03/2024 12:23:53 AM (7 months ago)
- Location:
- trunk/src
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-core-upgrader.php
r58319 r59159 392 392 * @since 3.7.0 393 393 * 394 * @global string $wp_version The WordPress version string.395 394 * @global string $wp_local_package Locale code of the package. 396 395 * … … 398 397 */ 399 398 public function check_files() { 400 global $wp_version, $wp_local_package; 399 global $wp_local_package; 400 $wp_version = wp_get_wp_version(); 401 401 402 402 $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' ); -
trunk/src/wp-admin/includes/class-plugin-installer-skin.php
r58082 r59159 285 285 /* translators: 1: Current WordPress version, 2: Version required by the uploaded plugin. */ 286 286 __( 'Your WordPress version is %1$s, however the uploaded plugin requires %2$s.' ), 287 get_bloginfo( 'version'),287 esc_html( wp_get_wp_version() ), 288 288 $requires_wp 289 289 ); -
trunk/src/wp-admin/includes/class-plugin-upgrader.php
r57658 r59159 275 275 * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional. 276 276 * 277 * @global string $wp_version The WordPress version string.278 *279 277 * @param string[] $plugins Array of paths to plugin files relative to the plugins directory. 280 278 * @param array $args { … … 286 284 */ 287 285 public function bulk_upgrade( $plugins, $args = array() ) { 288 global $wp_version;286 $wp_version = wp_get_wp_version(); 289 287 290 288 $defaults = array( … … 458 456 * 459 457 * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. 460 * @global string $wp_version The WordPress version string.461 458 * 462 459 * @param string $source The path to the downloaded package source. … … 464 461 */ 465 462 public function check_package( $source ) { 466 global $wp_filesystem, $wp_version; 467 463 global $wp_filesystem; 464 465 $wp_version = wp_get_wp_version(); 468 466 $this->new_plugin_data = array(); 469 467 -
trunk/src/wp-admin/includes/class-theme-installer-skin.php
r58082 r59159 320 320 /* translators: 1: Current WordPress version, 2: Version required by the uploaded theme. */ 321 321 __( 'Your WordPress version is %1$s, however the uploaded theme requires %2$s.' ), 322 get_bloginfo( 'version'),322 esc_html( wp_get_wp_version() ), 323 323 $requires_wp 324 324 ); -
trunk/src/wp-admin/includes/class-theme-upgrader.php
r57252 r59159 372 372 * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional. 373 373 * 374 * @global string $wp_version The WordPress version string.375 *376 374 * @param string[] $themes Array of the theme slugs. 377 375 * @param array $args { … … 384 382 */ 385 383 public function bulk_upgrade( $themes, $args = array() ) { 386 global $wp_version; 387 384 $wp_version = wp_get_wp_version(); 388 385 $defaults = array( 389 386 'clear_update_cache' => true, … … 559 556 * 560 557 * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. 561 * @global string $wp_version The WordPress version string.562 558 * 563 559 * @param string $source The path to the downloaded package source. … … 565 561 */ 566 562 public function check_package( $source ) { 567 global $wp_filesystem, $wp_version; 568 563 global $wp_filesystem; 564 565 $wp_version = wp_get_wp_version(); 569 566 $this->new_theme_data = array(); 570 567 -
trunk/src/wp-admin/includes/class-wp-automatic-updater.php
r58436 r59159 753 753 // Send debugging email to admin for all development installations. 754 754 if ( ! empty( $this->update_results ) ) { 755 $development_version = str_contains( get_bloginfo( 'version'), '-' );755 $development_version = str_contains( wp_get_wp_version(), '-' ); 756 756 757 757 /** … … 796 796 */ 797 797 protected function after_core_update( $update_result ) { 798 $wp_version = get_bloginfo( 'version');798 $wp_version = wp_get_wp_version(); 799 799 800 800 $core_update = $update_result->item; -
trunk/src/wp-admin/includes/class-wp-debug-data.php
r59155 r59159 47 47 $default_comment_status = get_option( 'default_comment_status' ); 48 48 $environment_type = wp_get_environment_type(); 49 $core_version = get_bloginfo( 'version');49 $core_version = wp_get_wp_version(); 50 50 $core_updates = get_core_updates(); 51 51 $core_update_needed = ''; -
trunk/src/wp-admin/includes/class-wp-site-health.php
r59120 r59159 265 265 ); 266 266 267 $core_current_version = get_bloginfo( 'version');267 $core_current_version = wp_get_wp_version(); 268 268 $core_updates = get_core_updates(); 269 269 -
trunk/src/wp-admin/includes/dashboard.php
r59120 r59159 2057 2057 */ 2058 2058 function wp_welcome_panel() { 2059 list( $display_version ) = explode( '-', get_bloginfo( 'version') );2059 list( $display_version ) = explode( '-', wp_get_wp_version() ); 2060 2060 $can_customize = current_user_can( 'customize' ); 2061 2061 $is_block_theme = wp_is_block_theme(); … … 2071 2071 <?php 2072 2072 /* translators: %s: Current WordPress version. */ 2073 printf( __( 'Learn more about the %s version.' ), $display_version);2073 printf( __( 'Learn more about the %s version.' ), esc_html( $display_version ) ); 2074 2074 ?> 2075 2075 </a> -
trunk/src/wp-admin/includes/update-core.php
r59150 r59159 1540 1540 * @global array $_old_requests_files Requests files to be preloaded. 1541 1541 * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. 1542 * @global string $wp_version The WordPress version string.1543 1542 * 1544 1543 * @param string $to Path to old WordPress installation. 1545 1544 */ 1546 1545 function _preload_old_requests_classes_and_interfaces( $to ) { 1547 global $_old_requests_files, $wp_filesystem, $wp_version; 1546 global $_old_requests_files, $wp_filesystem; 1547 $wp_version = wp_get_wp_version(); 1548 1548 1549 1549 /* … … 1588 1588 * @since 3.3.0 1589 1589 * 1590 * @global string $wp_version The WordPress version string. 1591 * @global string $pagenow The filename of the current screen. 1590 * @global string $pagenow The filename of the current screen. 1592 1591 * @global string $action 1593 1592 * … … 1595 1594 */ 1596 1595 function _redirect_to_about_wordpress( $new_version ) { 1597 global $wp_version, $pagenow, $action; 1596 global $pagenow, $action; 1597 $wp_version = wp_get_wp_version(); 1598 1598 1599 1599 if ( version_compare( $wp_version, '3.4-RC1', '>=' ) ) { -
trunk/src/wp-admin/update-core.php
r59064 r59159 38 38 static $first_pass = true; 39 39 40 $wp_version = get_bloginfo( 'version');40 $wp_version = wp_get_wp_version(); 41 41 $version_string = sprintf( '%s–%s', $update->current, get_locale() ); 42 42 … … 394 394 395 395 if ( $upgrade_major ) { 396 $wp_version = get_bloginfo( 'version');396 $wp_version = wp_get_wp_version(); 397 397 $updates = get_core_updates(); 398 398 … … 461 461 */ 462 462 function list_plugin_updates() { 463 $wp_version = get_bloginfo( 'version');463 $wp_version = wp_get_wp_version(); 464 464 $cur_wp_version = preg_replace( '/-.*$/', '', $wp_version ); 465 465 … … 1102 1102 echo '<h2 class="wp-current-version">'; 1103 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 1105 echo '</h2>'; 1106 1106 -
trunk/src/wp-includes/block-template-utils.php
r59101 r59159 1405 1405 * @since 6.0.0 Adds the whole theme to the export archive. 1406 1406 * 1407 * @global string $wp_version The WordPress version string.1408 *1409 1407 * @return WP_Error|string Path of the ZIP file or error on failure. 1410 1408 */ 1411 1409 function wp_generate_block_templates_export_file() { 1412 global $wp_version;1410 $wp_version = wp_get_wp_version(); 1413 1411 1414 1412 if ( ! class_exists( 'ZipArchive' ) ) { -
trunk/src/wp-includes/blocks/index.php
r59132 r59159 26 26 * 27 27 * @since 6.3.0 28 *29 * @global string $wp_version The WordPress version string.30 28 */ 31 29 function register_core_block_style_handles() { 32 global $wp_version;30 $wp_version = wp_get_wp_version(); 33 31 34 32 if ( ! wp_should_load_separate_core_block_assets() ) { -
trunk/src/wp-includes/class-wpdb.php
r59069 r59159 3984 3984 * @since 2.5.0 3985 3985 * 3986 * @global string $wp_version The WordPress version string.3987 3986 * @global string $required_mysql_version The required MySQL version string. 3988 3987 * @return void|WP_Error 3989 3988 */ 3990 3989 public function check_database_version() { 3991 global $wp_version, $required_mysql_version; 3990 global $required_mysql_version; 3991 $wp_version = wp_get_wp_version(); 3992 3992 3993 // Make sure the server has the required MySQL version. 3993 3994 if ( version_compare( $this->db_version(), $required_mysql_version, '<' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.