[wp-trac] [WordPress Trac] #29618: Improve `is_child_theme` to check for a valid Template value in child stylesheet comment header
WordPress Trac
noreply at wordpress.org
Wed Sep 10 17:04:12 UTC 2014
#29618: Improve `is_child_theme` to check for a valid Template value in child
stylesheet comment header
--------------------------+-----------------------------
Reporter: lancewillett | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Keywords: has-patch
Focuses: |
--------------------------+-----------------------------
Currently `is_child_theme()` only verifies that template and stylesheet
values don't match.
It'd be more accurate and safer to also verify that the child theme
stylesheet also has a valid `Template: [parentslug]` value in it.
It's possible in situations where something goes wrong with a WP site or
its options for template and stylesheet to not match without a child
active. This extra check would avoid possible errors in cases like that,
as well.
See a bit of history in #12998 and #20546.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29618>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list