diff --git a/cpcompatibility.php b/cpcompatibility.php index 43e1e3e..d63453e 100644 --- a/cpcompatibility.php +++ b/cpcompatibility.php @@ -3,7 +3,7 @@ * Plugin Name: CPcompatibility * Plugin URI: https://software.gieffeedizioni.it * Description: Tweaks for working with CP: wpcli compatibility, plugin checks. - * Version: 1.1.3 + * Version: 1.1.4 * Requires PHP: 5.6 * Requires CP: 1.0 * License: GPL2 diff --git a/inc/popular-menu.php b/inc/popular-menu.php index 6c35c0c..e0f3138 100644 --- a/inc/popular-menu.php +++ b/inc/popular-menu.php @@ -131,7 +131,7 @@ function load_data() { $data = []; foreach ($list as $plugin) { $data[] = [ - 'compatible' => (preg_match('/^5/', $plugin->requires) === 1) ? 'not' : 'is', + 'compatible' => (version_compare($plugin->requires, '5', '<')) ? 'is' : 'not', 'name' => $plugin->name, 'version' => $plugin->version, 'link' => $plugin->homepage,