[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:34:01 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 greenshady):

 For the purposes of the ticket as outlined, I'd just go with the one
 function to locate a theme file.  The ticket description actually covers a
 real need, and that's to allow child themes to overwrite parent theme
 files.  That's not something that's currently possible without a custom
 theme function, which is something both others and I have done in our
 themes.

 Outside of that, I wouldn't mind seeing a few functions like these:

 {{{
 function parent_theme_path( $file ) {}

 function parent_theme_uri( $file ) {}

 function child_theme_path( $file ) {}

 function child_theme_uri( $file ) {}
 }}}

 I think this is outside the scope (but somewhat related) to this ticket.
 Although, it's something we can already do by just tacking the file name
 onto the end of the appropriate `get_template_*()` and
 `get_stylesheet_*()` functions.  I'd say open a separate ticket for those
 things.

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


More information about the wp-trac mailing list