[wp-trac] [WordPress Trac] #18302: Improve child theme file inheritance by introducing `theme_url()` to locate a file URI

WordPress Trac noreply at wordpress.org
Thu Mar 7 04:06:29 UTC 2013


#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:  Future
Component:  Template                             |  Release
 Severity:  normal                               |     Version:
 Keywords:  has-patch westi-likes needs-unit-    |  Resolution:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by georgestephanis):

 Yeah, we'd suggested that earlier, but occasionally the parent theme will
 want to include a file that they don't want the child theme to override.

 Because ... reasons.  Or whatever. Scribu put a case for it together in an
 earlier comment (http://core.trac.wordpress.org/ticket/18302#comment:31)

 We were toying with making it one function with a boolean to let you
 choose whether to override or not, but it seemed overly complicated, and
 our core structures should value understandability over cleverness, so
 down at Tybee there was a conversation out on the deck of the Jitterbug to
 do what's currently here, theme_url() -- which lets overrides, but falls
 back to parent, and parent_theme_url() -- which forces the parent.  As
 noone will ever want to force child if the file doesn't exist, as that's
 just silly.

 ANYWAY.

 New patch 18302.13.diff attached incorporating Chip's proposed naming
 schema, and upping the phpdoc @since parameter to 3.6.0

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18302#comment:66>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list