WordPress at a glance

is_wp_version_compatible() WP 1.0

Checks compatibility with the current WordPress version.

✈ 1 time = 0.000001s = speed of light | 50000 times = 0.03s = speed of light | PHP 7.2.16, WP 5.2

No Hooks.

Return

true/false. True if required version is compatible or empty, false if not.

Usage

is_wp_version_compatible( $required );
$required(string) (required)
Minimum required WordPress version.

Changelog

Since 5.2.0 Introduced.

Code of is wp version compatible: wp-includes/functions.php WP 5.2.4

<?php
function is_wp_version_compatible( $required ) {
	return empty( $required ) || version_compare( get_bloginfo( 'version' ), $required, '>=' );
}

Related Functions

From category: Helper Functions

No comments
    Hello, !     Log In . Register