[wp-trac] [WordPress Trac] #43379: Allow themes to know if they are the parent or child theme

WordPress Trac noreply at wordpress.org
Wed Feb 21 17:33:45 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:
-----------------------------+------------------------------

Comment (by swissspidy):

 Ha, totally forgot about `is_child_theme()`.

 > "am I a parent theme? no, ok I won't run x functionality" or "am I a
 parent theme? yes, ok I will use get_template_dir instead of
 get_stylesheet_dir"

 So `$is_parent_theme = ! is_child_theme()`?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43379#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list