[wp-trac] [WordPress Trac] #61782: Memoize wp_get_wp_version
WordPress Trac
noreply at wordpress.org
Tue Jul 30 00:26:08 UTC 2024
#61782: Memoize wp_get_wp_version
------------------------------------+-----------------------------
Reporter: Cybr | Owner: SergeyBiryukov
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.7
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* status: closed => reopened
* resolution: fixed =>
Comment:
Replying to [comment:7 costdev]:
> This new helper function may be used during the upgrade routines (or by
plugins with post-upgrade hooks, for example), where
[https://github.com/WordPress/wordpress-
develop/blob/9ed3553da6a61a38a1d4c5585e5ac3c9d13d351a/src/wp-
admin/includes/update-core.php#L1243 wp-includes/version.php will have
been replaced], and [https://github.com/WordPress/wordpress-
develop/blob/9ed3553da6a61a38a1d4c5585e5ac3c9d13d351a/src/wp-
admin/includes/update-core.php#L1259 OPcache will have been invalidated].
However, the return value of `wp_get_wp_version()` won't match the actual
current version until the next request. This may need some further thought
and testing.
Good catch, thanks!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61782#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list