[wp-trac] [WordPress Trac] #14720: get_bloginfo code, with get_template_* and get_stylesheet_*

WordPress Trac wp-trac at lists.automattic.com
Sat Aug 28 10:24:24 UTC 2010


#14720: get_bloginfo code, with get_template_* and get_stylesheet_*
--------------------------+-------------------------------------------------
 Reporter:  Frumph        |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:                 
 Severity:  normal        |    Keywords:  close          
--------------------------+-------------------------------------------------

Comment(by Frumph):

 You're missing this:

 get_template_directory() - goes to the "path"
 get_template_directory_uri() - goes to the "url"

 get_stylesheet_directory() goes to the "path"
 get_stylesheet_directory_uri() goes to the "url"

 All of the above goes to the 'url' only.

 When you look at it, and look at how people try to understand it's
 function including chip bennett's addition to the codex for the theme
 review: http://codex.wordpress.org/Theme_Review#Template_Tags_and_Hooks

 People are expecting bloginfo( 'stylesheet_directory' ) and bloginfo(
 'template_directory' ) to be the path.

 While the codex here:
 http://codex.wordpress.org/Function_Reference/bloginfo
 denotes they're exactly the same, the functionality (imo) should be that
 one is the path and the other the URL.

 If you can notice that stylesheet_directory and stylesheet_url are both
 referencing the same url it is pretty much meaning you could use either,
 however logically you would think that URL means the URL and the directory
 would be the path.

 Just trying to keep a semblance of standard of thinking that they should
 in fact mean two separate things.

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


More information about the wp-trac mailing list