[wp-trac] [WordPress Trac] #61782: Memoize wp_get_wp_version

WordPress Trac noreply at wordpress.org
Mon Jul 29 22:25:55 UTC 2024


#61782: Memoize wp_get_wp_version
------------------------------------+-----------------------------
 Reporter:  Cybr                    |       Owner:  SergeyBiryukov
     Type:  defect (bug)            |      Status:  closed
 Priority:  normal                  |   Milestone:  6.7
Component:  General                 |     Version:  trunk
 Severity:  normal                  |  Resolution:  fixed
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+-----------------------------
Changes (by costdev):

 * keywords:  has-patch => has-patch dev-feedback


Comment:

 @SergeyBiryukov This new helper function may be used during the upgrade
 routines, where [https://github.com/WordPress/wordpress-
 develop/blob/9ed3553da6a61a38a1d4c5585e5ac3c9d13d351a/src/wp-
 admin/includes/update-core.php#L1243 wp-includes/version.php will be
 replaced], and [https://github.com/WordPress/wordpress-
 develop/blob/9ed3553da6a61a38a1d4c5585e5ac3c9d13d351a/src/wp-
 admin/includes/update-core.php#L1259 OPcache will be 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.

 A `$force` parameter may have been useful to include here, to force a
 fresh file load in such circumstances.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61782#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list