Changeset 44981
- Timestamp:
- 03/22/2019 12:59:02 PM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/plugin.php
r44979 r44981 1091 1091 } 1092 1092 1093 $plugin_data['wp_compatible'] = wp_is_wp_compatible( $plugin_data['requires']);1094 $plugin_data['php_compatible'] = wp_is_php_compatible( $plugin_data['requires_php']);1093 $plugin_data['wp_compatible'] = version_compare( get_bloginfo( 'version' ), $plugin_data['requires'], '>=' ); 1094 $plugin_data['php_compatible'] = version_compare( phpversion(), $plugin_data['requires_php'], '>=' ); 1095 1095 1096 1096 $plugin_data = array_merge( $plugin_data, get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ) ); -
trunk/src/wp-includes/functions.php
r44978 r44981 6898 6898 echo '</p>'; 6899 6899 } 6900 6901 /**6902 * Checks compatibility with the current WordPress version.6903 *6904 * @since 5.2.06905 *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.06919 *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.