[wp-trac] [WordPress Trac] #24068: Allow absolute paths to be passed into content_url()

WordPress Trac noreply at wordpress.org
Fri Apr 12 20:13:59 UTC 2013


#24068: Allow absolute paths to be passed into content_url()
-----------------------------+-------------------------
 Reporter:  westonruter      |       Type:  enhancement
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  General
  Version:                   |   Severity:  trivial
 Keywords:  has-patch        |
-----------------------------+-------------------------
 It would be very useful if `content_url()` allowed an absolute path to be
 supplied just like `plugin_dir_url()` does. This would allow a script
 within a theme subdirectory to easily obtain the URL to that subdirectory,
 for example via `content_url(__DIR__)`, instead of having to add relative
 paths after `get_stylesheet_directory_uri()`. This would also allow code
 living somewhere else under `wp-content/` (not in plugins or themes) to
 likewise obtain its full URL.

 http://codex.wordpress.org/Function_Reference/content_url
 http://codex.wordpress.org/Function_Reference/plugin_dir_url
 http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24068>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list