Make WordPress Core


Ignore:
Timestamp:
03/22/2019 12:59:02 PM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r44978 r44981  
    68986898    echo '</p>';
    68996899}
    6900 
    6901 /**
    6902  * Checks compatibility with the current WordPress version.
    6903  *
    6904  * @since 5.2.0
    6905  *
    6906  * @param string $required Minimum required WordPress version.
    6907  * @return bool True if required version is compatible or empty, false if not.
    6908  */
    6909 function wp_is_wp_compatible( $required ) {
    6910     $wp_version = get_bloginfo( 'version' );
    6911 
    6912     return empty( $required ) || version_compare( $wp_version, $required, '>=' );
    6913 }
    6914 
    6915 /**
    6916  * Checks compatibility with the current PHP version.
    6917  *
    6918  * @since 5.2.0
    6919  *
    6920  * @param string $required Minimum required PHP version.
    6921  * @return bool True if required version is compatible or empty, false if not.
    6922  */
    6923 function wp_is_php_compatible( $required ) {
    6924     return empty( $required ) || version_compare( phpversion(), $required, '>=' );
    6925 }
Note: See TracChangeset for help on using the changeset viewer.