From 6ec559b2bae959c034bdfe21241ae4a965d4155f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 18 May 2020 04:36:57 +0000 Subject: [PATCH] Site Health: Use `WP_Theme::parent()` in the inactive themes test as a more reliable check that the parent theme exists. This is also more consistent with the other instances of directly referencing `WP_Theme::parent()` properties or methods in core. Props mukesh27, juanlopez4691, davidbaumwald, afragen, SergeyBiryukov. Fixes #49934. git-svn-id: https://develop.svn.wordpress.org/trunk@47815 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-site-health.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index 82ff8e7edb..ebb7937155 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -596,7 +596,7 @@ class WP_Site_Health { if ( $has_unused_themes && $show_unused_themes && ! is_multisite() ) { // This is a child theme, so we want to be a bit more explicit in our messages. - if ( is_child_theme() ) { + if ( $active_theme->parent() ) { // Recommend removing inactive themes, except a default theme, your current one, and the parent theme. $result['status'] = 'recommended';