[wp-trac] [WordPress Trac] #18302: Improve child theme file inheritance by introducing `theme_url()` to locate a file URI
WordPress Trac
wp-trac at lists.automattic.com
Mon Jul 9 19:26:38 UTC 2012
#18302: Improve child theme file inheritance by introducing `theme_url()` to locate
a file URI
-----------------------------------+------------------------
Reporter: johnbillion | Owner: westi
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 3.5
Component: Template | Version:
Severity: normal | Resolution:
Keywords: has-patch westi-likes |
-----------------------------------+------------------------
Comment (by nacin):
This looks great in theory. Digging into how it works, here are my
thoughts:
This function is designed to allow child themes to override parent themes,
without the parent theme needing to jump through hoops to prevent the
requirement that a child theme override a random file such as an image. To
me, it sounds like it should always return a URI. It's a simple check: If
the file exists in the child theme, use it. Otherwise, return the URL as
if it exists in the parent theme. And if we're not dealing with a child
theme, we can even avoid any file_exists() checks this way.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18302#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list