Make WordPress Core

Changeset 58848


Ignore:
Timestamp:
08/04/2024 10:07:06 PM (4 months ago)
Author:
peterwilsoncc
Message:

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.

File:
1 edited

Legend:

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

    r58843 r58848  
    88208820 */
    88218821function wp_get_wp_version() {
    8822     static $wp_version;
    8823 
    8824     if ( ! isset( $wp_version ) ) {
    8825         require ABSPATH . WPINC . '/version.php';
    8826     }
     8822    require ABSPATH . WPINC . '/version.php';
    88278823
    88288824    return $wp_version;
Note: See TracChangeset for help on using the changeset viewer.