mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Plugins: Remove wp_is_wp_compatible() and wp_is_php_compatible() functions added in [44978] for now, to discuss use cases and better naming.
See #46599, #43992. git-svn-id: https://develop.svn.wordpress.org/trunk@44981 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -6897,29 +6897,3 @@ function wp_direct_php_update_button() {
|
||||
);
|
||||
echo '</p>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks compatibility with the current WordPress version.
|
||||
*
|
||||
* @since 5.2.0
|
||||
*
|
||||
* @param string $required Minimum required WordPress version.
|
||||
* @return bool True if required version is compatible or empty, false if not.
|
||||
*/
|
||||
function wp_is_wp_compatible( $required ) {
|
||||
$wp_version = get_bloginfo( 'version' );
|
||||
|
||||
return empty( $required ) || version_compare( $wp_version, $required, '>=' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks compatibility with the current PHP version.
|
||||
*
|
||||
* @since 5.2.0
|
||||
*
|
||||
* @param string $required Minimum required PHP version.
|
||||
* @return bool True if required version is compatible or empty, false if not.
|
||||
*/
|
||||
function wp_is_php_compatible( $required ) {
|
||||
return empty( $required ) || version_compare( phpversion(), $required, '>=' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user