Make WordPress Core

Changeset 45260


Ignore:
Timestamp:
04/23/2019 09:36:02 PM (7 years ago)
Author:
azaozz
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r45234 r45260  
    465465                if ( $active_theme->parent() ) {
    466466                        $allowed_theme_count++;
    467                 }
    468 
    469                 // If there's a default theme installed, we count that as allowed as well.
    470                 if ( $has_default_theme ) {
     467
     468                        if ( $active_theme->get_template() === WP_DEFAULT_THEME ) {
     469                                $using_default_theme = true;
     470                        }
     471                }
     472
     473                // If there's a default theme installed and not in use, we count that as allowed as well.
     474                if ( $has_default_theme && ! $using_default_theme ) {
    471475                        $allowed_theme_count++;
    472476                }
Note: See TracChangeset for help on using the changeset viewer.