includes/Core/class-wp-version.php
WP version gate boundary — single home for WordPress core version checks.
Class Wp_Version
Class Wp_Version
final class Wp_VersionProperties
| Property | Visibility | Type | Default | Line |
|---|---|---|---|---|
$memo | private static | ?string | null | 65 |
$memo_ready | private static | bool | false | 73 |
publicstatic reset_memo()
public static function reset_memo(): voidReset the memoized version resolution (tests only).
Return: void.
publicstatic current()
public static function current(): stringCurrent WordPress version string.
Return: string — Version string, or \’\’ when unknown.
publicstatic is_at_least()
public static function is_at_least(string $version, bool=false $fallback): boolWhether core is at least the given version (canonical read). Parameter Type Default Description $versionstring— Minimum version (e.g. \’6.3-alpha\’). $fallbackbool=false— Result when the version is unknown.
Return: bool — True when core is at least $version.
publicstatic is_global_at_least()
public static function is_global_at_least(string $version, bool=true $fallback): boolWhether `$GLOBALS[\’wp_version\’]` is at least the given version (global-only read). Parameter Type Default Description $versionstring— Minimum version (e.g. \’6.9-alpha\’). $fallbackbool=true— Result when the global is absent.
Return: bool — True when the global reads at least $version.