[wp-trac] [WordPress Trac] #46925: Site Health: Should the parent theme be listed in 'Active Theme' on info tab?
WordPress Trac
noreply at wordpress.org
Thu Apr 18 06:07:21 UTC 2019
#46925: Site Health: Should the parent theme be listed in 'Active Theme' on info
tab?
-------------------------------------------------+-------------------------
Reporter: garrett-eclipse | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.3
Component: Administration | Version: trunk
Severity: normal | Resolution:
Keywords: needs-testing has-screenshots site- | Focuses: ui
health has-patch |
-------------------------------------------------+-------------------------
Comment (by xkon):
This is a nice addition thanks @garrett-eclipse !
[attachment:"46925.4.diff"] is based on [attachment:"46925.3.diff"] .
Additions & changes:
1) Fixes some minor CS issues.
2) Changes
{{{
if ( $active_theme->stylesheet === $theme_slug ||
$parent_theme->stylesheet === $theme_slug ) {
}}}
to
{{{
if (
$active_theme->stylesheet === $theme_slug ||
! empty( $parent_theme->stylesheet ) && $parent_theme->stylesheet ===
$theme_slug
) {
}}}
To avoid the `Trying to get property 'stylesheet' of non-object` error if
a parent theme is selected.
3) Converts the **Theme directory location** of the **Active Theme** to
use `get_stylesheet_directory()` instead.
4) Adds the **Theme directory location** to the **Parent Theme** as well
with `get_template_directory()`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46925#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list