diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index 09473c1a50..5c5afee52a 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -827,8 +827,13 @@ function customize_themes_print_templates() { <# } #> <# } else { #> - - + <# if ( data.compatibleWP && data.compatiblePHP ) { #> + + + <# } else { #> + + + <# } #> <# } #> diff --git a/src/wp-admin/theme-install.php b/src/wp-admin/theme-install.php index 6e890f5da1..b1b1eaf4fc 100644 --- a/src/wp-admin/theme-install.php +++ b/src/wp-admin/theme-install.php @@ -311,12 +311,21 @@ if ( $tab ) { <# } #> <# } #> <# } else { #> - - - + <# if ( data.compatible_wp && data.compatible_php ) { #> + + + + <# } else { #> + + + + <# } #> <# } #> @@ -333,9 +342,17 @@ if ( $tab ) { <# if ( data.installed ) { #> - + <# if ( data.compatible_wp && data.compatible_php ) { #> + + <# } else { #> + + <# } #> <# } else { #> - + <# if ( data.compatible_wp && data.compatible_php ) { #> + + <# } else { #> + + <# } #> <# } #>
diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 2342089302..ce325118f5 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -5853,9 +5853,11 @@ final class WP_Customize_Manager { $theme->active = ( isset( $_POST['customized_theme'] ) && $_POST['customized_theme'] === $theme->slug ); // Map available theme properties to installed theme properties. - $theme->id = $theme->slug; - $theme->screenshot = array( $theme->screenshot_url ); - $theme->authorAndUri = wp_kses( $theme->author['display_name'], $themes_allowedtags ); + $theme->id = $theme->slug; + $theme->screenshot = array( $theme->screenshot_url ); + $theme->authorAndUri = wp_kses( $theme->author['display_name'], $themes_allowedtags ); + $theme->compatibleWP = is_wp_version_compatible( $theme->requires ); + $theme->compatiblePHP = is_php_version_compatible( $theme->requires_php ); if ( isset( $theme->parent ) ) { $theme->parent = $theme->parent['slug']; diff --git a/src/wp-includes/customize/class-wp-customize-theme-control.php b/src/wp-includes/customize/class-wp-customize-theme-control.php index 9c5e7602cf..270547baaf 100644 --- a/src/wp-includes/customize/class-wp-customize-theme-control.php +++ b/src/wp-includes/customize/class-wp-customize-theme-control.php @@ -133,7 +133,11 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {

{{ data.theme.name }}

- + <# if ( data.theme.compatibleWP && data.theme.compatiblePHP ) { #> + + <# } else { #> + + <# } #>
<# } #>