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 5.5.1

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

From category: Helper Functions

No comments
    Log In . Register