On this page
is_wp_version_compatible( string $required ): bool
Checks compatibility with the current WordPress version.
Parameters
$requiredstring Required-
Minimum required WordPress version.
Return
bool True if required version is compatible or empty, false if not.
Source
File: wp-includes/functions.php. View all references
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, '>=' );
}
Related
Used By
| Used By | Description |
|---|---|
| validate_theme_requirements() wp-includes/theme.php | Validates the theme requirements for WordPress version and PHP version. |
| Plugin_Installer_Skin::do_overwrite() wp-admin/includes/class-plugin-installer-skin.php | Check if the plugin can be overwritten and output the HTML for overwriting a plugin on upload. |
| Theme_Installer_Skin::do_overwrite() wp-admin/includes/class-theme-installer-skin.php | Check if the theme can be overwritten and output the HTML for overwriting a theme on upload. |
| validate_plugin_requirements() wp-admin/includes/plugin.php | Validates the plugin requirements for WordPress version and PHP version. |
| WP_Customize_Manager::handle_load_themes_request() wp-includes/class-wp-customize-manager.php | Loads themes into the theme browsing/installation UI. |
| Plugin_Upgrader::check_package() wp-admin/includes/class-plugin-upgrader.php | Checks that the source package contains a valid plugin. |
| Theme_Upgrader::check_package() wp-admin/includes/class-theme-upgrader.php | Checks that the package source contains a valid theme. |
| wp_prepare_themes_for_js() wp-admin/includes/theme.php | Prepares themes for JavaScript. |
| WP_Plugins_List_Table::single_row() wp-admin/includes/class-wp-plugins-list-table.php | |
| wp_theme_update_row() wp-admin/includes/update.php | Displays update information for a theme. |
| install_plugin_information() wp-admin/includes/plugin-install.php | Displays plugin information in dialog box form. |
| WP_Plugin_Install_List_Table::display_rows() wp-admin/includes/class-wp-plugin-install-list-table.php | |
| wp_ajax_query_themes() wp-admin/includes/ajax-actions.php | Ajax handler for getting themes from themes_api() . |
| list_theme_updates() wp-admin/update-core.php | Display the upgrade themes form. |
Changelog
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_wp_version_compatible