diff --git wp-admin/includes/theme.php wp-admin/includes/theme.php
index 43cb8cf..8ee8915 100644
--- wp-admin/includes/theme.php
+++ wp-admin/includes/theme.php
@@ -271,6 +271,7 @@ function get_theme_feature_list( $api = true ) {
* @return mixed
*/
function themes_api($action, $args = null) {
+ global $wp_version;
if ( is_array($args) )
$args = (object)$args;
@@ -292,5 +293,9 @@ function themes_api($action, $args = null) {
}
}
+ if ( isset( $res->requires ) && version_compare( $wp_version, $res->requires, '<' ) ) {
+ $res = new WP_Error('themes_api_failed', sprintf( __('The theme %s requires WordPress %s or higher. Please update WordPress.'), '' . $res->name . '', $res->requires, network_admin_url('update-core.php') ) );
+ }
+
return apply_filters('themes_api_result', $res, $action, $args);
}