From 0da8c2265fda5857dbf91fb955c0d8dadf15d4e3 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Tue, 23 Apr 2019 21:37:53 +0000 Subject: [PATCH] Site Health: Fix count of inactive themes and the recommendation to remove them when the default theme is active or is a parent of the active child theme. Props sudhiryadav, ianbelanger, mukesh27, azaozz. Fixes #46900. Built from https://develop.svn.wordpress.org/trunk@45260 git-svn-id: http://core.svn.wordpress.org/trunk@45069 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-site-health.php | 8 ++++++-- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index 47f645c351..f777514617 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -464,10 +464,14 @@ class WP_Site_Health { // If this is a child theme, increase the allowed theme count by one, to account for the parent. if ( $active_theme->parent() ) { $allowed_theme_count++; + + if ( $active_theme->get_template() === WP_DEFAULT_THEME ) { + $using_default_theme = true; + } } - // If there's a default theme installed, we count that as allowed as well. - if ( $has_default_theme ) { + // If there's a default theme installed and not in use, we count that as allowed as well. + if ( $has_default_theme && ! $using_default_theme ) { $allowed_theme_count++; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 92f9bd7145..cd5fb15587 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-beta3-45259'; +$wp_version = '5.2-beta3-45260'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.