is_wp_version_compatible() WordPress Function
The is_wp_version_compatible() function is used to check if a specific WordPress version is compatible with the current WordPress installation.
is_wp_version_compatible( string $required ) #
Checks compatibility with the current WordPress version.
Parameters
- $required
(string)(Required)Minimum required WordPress version.
Return
(bool) True if required version is compatible or empty, false if not.
Source
File: wp-includes/functions.php
function is_wp_version_compatible( $required ) { global $wp_version; // Strip off any -alpha, -RC, -beta, -src suffixes. list( $version ) = explode( '-', $wp_version ); return empty( $required ) || version_compare( $version, $required, '>=' ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.2.0 | Introduced. |