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/class-wp-automatic-updater.php

    r58436 r59159  
    753753        // Send debugging email to admin for all development installations.
    754754        if ( ! empty( $this->update_results ) ) {
    755             $development_version = str_contains( get_bloginfo( 'version' ), '-' );
     755            $development_version = str_contains( wp_get_wp_version(), '-' );
    756756
    757757            /**
     
    796796     */
    797797    protected function after_core_update( $update_result ) {
    798         $wp_version = get_bloginfo( 'version' );
     798        $wp_version = wp_get_wp_version();
    799799
    800800        $core_update = $update_result->item;
Note: See TracChangeset for help on using the changeset viewer.