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

WordPress Trac noreply at wordpress.org
Fri Aug 5 15:55:05 UTC 2016


#18302: Improve child theme file inheritance by introducing a function to locate a
file URI
----------------------------------------------+--------------------------
 Reporter:  johnbillion                       |       Owner:  johnbillion
     Type:  enhancement                       |      Status:  reviewing
 Priority:  high                              |   Milestone:  4.7
Component:  Themes                            |     Version:
 Severity:  normal                            |  Resolution:
 Keywords:  has-patch needs-unit-tests early  |     Focuses:  template
----------------------------------------------+--------------------------

Comment (by JakePT):

 Couple of things I'd like to see addressed.
 1. Path versions of these functions. I've found including SVG contents
 into a design better this way, since it's the server requesting them, so
 you can run into issues with hosts file shenanigans if you use a URI.
 2. Would having theme_file_uri() and get_theme_file_uri() as functions be
 a good idea? Seems common with other functions, and get_ seems to be the
 standard when a function returns a value.

 I'm imagining something like:
 {{{#!php
 <?php
 get_theme_file_path();
 get_theme_file_uri();
 theme_file_uri();
 }}}
 (I'm not sure you'd ever need to echo the file path?)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/18302#comment:91>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list