[wp-trac] [WordPress Trac] #30499: define WP_VERSION, to prevent having to code around plugins which change $wp_version
WordPress Trac
noreply at wordpress.org
Wed Feb 4 20:53:29 UTC 2026
#30499: define WP_VERSION, to prevent having to code around plugins which change
$wp_version
-------------------------------------------------+-------------------------
Reporter: DavidAnderson | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: General | Version:
Severity: normal | Resolution: wontfix
Keywords: has-patch reporter-feedback dev- | Focuses:
feedback |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):
* status: new => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
Replying to [comment:8 huzaifaalmesbah]:
> Given this is an old enhancement (~10+ years) and there hasn’t been
recent activity, it may be worth confirming whether introducing a
WP_VERSION constant is still desired. As previously noted, core would also
need to replace direct version.php includes for consistency.
In WordPress 6.7 `wp_get_wp_version()` was introduced to ensure the
correct version of WordPress was returned even if developers modified the
`$wp_version` global. See ticket #61627.
As the new function serves the same purpose as adding a constant, I think
this can be closed as unplanned (wontfix).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30499#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list