Issues with DIRECTORY_SEPARATOR
|Reported by:||grandslambert||Owned by:|
I recently switched my Recipe Press plugin to use the DIRECTORY_SEPARATOR instead of a hard coded '/', as suggested in another ticket. However, on a Windows Server this now breaks two parts of my plugin, two important parts.
The plugin registers a menu icon, which uses an object variable for the Plugin URL which is built using DIRECTORY_SEPARATOR. This works OK on *nix based machines, but NOT on Windows.
I also use DIRECTORY_SEPARATOR in wp_register_scripts() function, and on a Windows based machine the scripts do not load due to a missing separator between the plugin name and the folder the script is in.
So, do we continue to use DIRECTORY_SEPARATOR, which works in most instances, or just hard code a '/' and let the core convert it?