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.


git-svn-id: https://develop.svn.wordpress.org/trunk@58848 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson 2024-08-04 22:07:06 +00:00
parent 54e2272b95
commit 0a12ad2890

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;
}