[wp-trac] [WordPress Trac] #16457: Issues with DIRECTORY_SEPARATOR

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 4 17:57:05 UTC 2011


#16457: Issues with DIRECTORY_SEPARATOR
---------------------------+---------------------------------
 Reporter:  grandslambert  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  General        |    Version:  3.0.4
 Severity:  normal         |   Keywords:  DIRECTORY_SEPARATOR
---------------------------+---------------------------------
 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?

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


More information about the wp-trac mailing list