Changes between Initial Version and Version 1 of Ticket #13550, comment 21
- Timestamp:
- 03/23/2011 08:31:12 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13550, comment 21
initial v1 7 7 8 8 For plugin-provided downloadable files (such as JS or CSS), the best solution we have come up with so far is to do: 9 $url = plugins_url( basename(dirname(__ FILE __)).'/path/to/file'); 9 10 {{{$url = plugins_url( basename(dirname(__ FILE __)).'/path/to/file');}}} 10 11 11 12 which could be expressed as: 12 $url = WP_PLUGIN_URL.plugin_basename(dirname(__ FILE __).'/path/to/file' 13 14 {{{$url = WP_PLUGIN_URL.plugin_basename(dirname(__ FILE __).'/path/to/file'}}} 13 15 14 16 15 This can an issue when __ FILE __'s path is not precisely WP_CONTENT_DIR .'/'. <plugin_basename> .'/'. <filename>, since plugin_basename is actually a symlink. 16 17 This can an issue when {{{__FILE__}}}'s path is not precisely {{{WP_CONTENT_DIR .'/'. <plugin_basename> .'/'. <filename>}}}, since plugin_basename is actually a symlink. 17 18 18 19 I'm available to provide more input on this.