Opened 8 months ago
Allow absolute paths to be passed into content_url()
|Reported by:||westonruter||Owned by:|
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.