diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index b7847d5e310a8..8ea3c1f098a35 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -509,6 +509,7 @@ public function get_test_theme_version() { $theme_updates = get_theme_updates(); $themes_total = 0; + $child_themes_total = 0; $themes_need_updates = 0; $themes_inactive = 0; @@ -543,6 +544,12 @@ public function get_test_theme_version() { } foreach ( $all_themes as $theme_slug => $theme ) { + + if ( $theme->get( 'Template' ) && $theme->get( 'Template' ) !== $theme_slug ) { + ++$child_themes_total; + continue; + } + ++$themes_total; if ( array_key_exists( $theme_slug, $theme_updates ) ) { @@ -609,6 +616,21 @@ public function get_test_theme_version() { __( 'Your site does not have any installed themes.' ) ); } + + if ( $child_themes_total > 0 ) { + $result['description'] .= sprintf( + '

%s

', + sprintf( + /* translators: %d: The number of child themes. */ + _n( + 'Additionally, your site has %d installed child theme.', + 'Additionally, your site has %d installed child themes.', + $child_themes_total + ), + $child_themes_total + ) + ); + } } if ( $has_unused_themes && $show_unused_themes && ! is_multisite() ) {