Opened 12 years ago
Closed 9 years ago
#24068 closed enhancement (maybelater)
Allow absolute paths to be passed into content_url()
Reported by: | westonruter | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | trivial | Version: | |
Component: | General | Keywords: | has-patch needs-refresh 2nd-opinion |
Focuses: | Cc: |
Description
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
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Patch to content_url() to allow absolute paths to be passed in