[wp-trac] [WordPress Trac] #34666: New function: `template_directory_uri()`

WordPress Trac noreply at wordpress.org
Thu Nov 12 10:06:11 UTC 2015


#34666: New function: `template_directory_uri()`
------------------------------+------------------------------
 Reporter:  sebastian.pisula  |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Themes            |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+------------------------------
Changes (by swissspidy):

 * component:  General => Themes


Comment:

 First, you should always escape such output, e.g. by using `echo esc_url(
 get_template_directory_uri() . '/images/separator.png' )`. With your
 proposed patch, that would not work and I'd highly discourage to use that.

 Second, why limit this to `get_template_directory_uri()` and not also add
 a similar function for `get_stylesheet_directory_uri()`?

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


More information about the wp-trac mailing list