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.
Built from https://develop.svn.wordpress.org/trunk@47815


git-svn-id: http://core.svn.wordpress.org/trunk@47591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-05-18 04:38:10 +00:00
parent 91936df3d1
commit d528d7a044
2 changed files with 2 additions and 2 deletions

View File

@ -596,7 +596,7 @@ class WP_Site_Health {
if ( $has_unused_themes && $show_unused_themes && ! is_multisite() ) { 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. // 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. // Recommend removing inactive themes, except a default theme, your current one, and the parent theme.
$result['status'] = 'recommended'; $result['status'] = 'recommended';

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.5-alpha-47814'; $wp_version = '5.5-alpha-47815';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.