[wp-trac] [WordPress Trac] #16953: Allow symlinked plugins

WordPress Trac noreply at wordpress.org
Sat Sep 21 16:00:55 UTC 2013

#16953: Allow symlinked plugins
 Reporter:  scribu                               |       Owner:  rmccue
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
Component:  Plugins                              |  Release
 Severity:  normal                               |     Version:
 Keywords:  has-patch dev-feedback needs-        |  Resolution:
  testing                                        |
Changes (by rmccue):

 * keywords:  has-patch dev-feedback => has-patch dev-feedback needs-testing
 * owner:   => rmccue


 Attached patch creates a realpath cache of sorts to match real directories
 up with their original version. Also introduces a `wp_normalize_path()`
 function, since there's a lot of duplicate code in core doing exactly that
 (I only converted `plugin_basename` while I was there, but there's plenty
 more places ripe for patching that in a separate ticket).

 Tested locally (Windows system with junction points) and it works. I'd
 like to have a few more people test it though to make sure.

 The only concern I have here is performance, which is why it only stores
 differing paths (plugins are loaded once, but `plugin_basename` is called
 many times). Calling `realpath` shouldn't be a concern, since it's called
 on the filename itself which should push it into the stat cache, and is
 just repeating the `realpath` call that happens in `include` anyway.

Ticket URL: <http://core.trac.wordpress.org/ticket/16953#comment:74>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list