[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
Wed Sep 5 21:56:47 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 needs-unit-    |
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by Otto42):

 Replying to [comment:42 scribu]:
 > Parity with plugins_url() doesn't make that much sense, since you can
 run 100 plugins at the same time.
 >
 > Super-generic API like that can go in WP_Theme, not in theme_url(),
 which is basically a template tag.

 Presumably, most themes wouldn't be using that parameter anyway.

 Also, if you limit it to child/parent, then there is no point to having
 that parameter at all, since other functions would exist to take care of
 that for you. In which case the function would be themes_url($path='') and
 no optional second parameter.

 Note that I'm assuming that the guts of this function is essentially going
 to be a call into the WP_Theme API in the first place, like it should be.
 Like all theme template tags should be. All theme related stuff should
 eventually move into there, with suitable wrappers for usage by
 themes/plugins to make life simpler.

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


More information about the wp-trac mailing list