[wp-trac] [WordPress Trac] #43379: Allow themes to know if they are the parent or child theme (was: Allow themese to know if they are the parent or child theme)
WordPress Trac
noreply at wordpress.org
Wed Feb 21 16:11:13 UTC 2018
#43379: Allow themes to know if they are the parent or child theme
-----------------------------+------------------------------
Reporter: denvercoder9 | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+------------------------------
Changes (by swissspidy):
* component: Customize => Themes
Comment:
I'm not exactly sure what you want to achieve but you should be able to
use something like this:
{{{#!php
<?php
$active_theme = wp_get_theme();
$is_child_theme = (bool) $active_theme->parent()
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43379#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list