Make WordPress Core


Ignore:
Timestamp:
05/18/2020 04:36:57 AM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

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

    r47762 r47815  
    597597
    598598            // This is a child theme, so we want to be a bit more explicit in our messages.
    599             if ( is_child_theme() ) {
     599            if ( $active_theme->parent() ) {
    600600                // Recommend removing inactive themes, except a default theme, your current one, and the parent theme.
    601601                $result['status'] = 'recommended';
Note: See TracChangeset for help on using the changeset viewer.