Make WordPress Core


Ignore:
Timestamp:
10/03/2024 12:23:53 AM (19 months ago)
Author:
peterwilsoncc
Message:

General: Expand use of wp_get_wp_version().

Expands the use of wp_get_wp_version() to get an unmodified value of the current WordPress version in various locations in which it would be unhelpful if a plugin has modified the global $wp_version.

This includes:

  • Theme and plugin compatibility tests
  • During the upgrade process of WP Core
  • Debug and site health data reports of the current version
  • Version number display in the dashboard
  • Block theme export and caching utilities
  • The WPDB class

Props peterwilsoncc, hellofromtonya.
See #61627.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r59120 r59159  
    20572057 */
    20582058function wp_welcome_panel() {
    2059     list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
     2059    list( $display_version ) = explode( '-', wp_get_wp_version() );
    20602060    $can_customize           = current_user_can( 'customize' );
    20612061    $is_block_theme          = wp_is_block_theme();
     
    20712071            <?php
    20722072                /* 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 ) );
    20742074            ?>
    20752075            </a>
Note: See TracChangeset for help on using the changeset viewer.