General: Removing static from `wp_get_wp_version()`.

Removes the static storing the version number in `wp_get_wp_version()` to ensure the version number is reported correctly after a WordPress upgrade is completed.

Reverts [58827].

Props costdev, SergeyBiryukov, Cybr.
See #61782.

Built from https://develop.svn.wordpress.org/trunk@58848


git-svn-id: http://core.svn.wordpress.org/trunk@58244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson 2024-08-04 22:09:18 +00:00
parent f2569d2e2d
commit 066d83f670
2 changed files with 2 additions and 6 deletions

View File

@ -8819,11 +8819,7 @@ function clean_dirsize_cache( $path ) {
* @return string The current WordPress version.
*/
function wp_get_wp_version() {
static $wp_version;
if ( ! isset( $wp_version ) ) {
require ABSPATH . WPINC . '/version.php';
}
require ABSPATH . WPINC . '/version.php';
return $wp_version;
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-58847';
$wp_version = '6.7-alpha-58848';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.