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

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 23 21:16:47 UTC 2011


#16953: Allow symlinked plugins
------------------------------+-----------------------
 Reporter:  scribu            |       Owner:  scribu
     Type:  enhancement       |      Status:  accepted
 Priority:  normal            |   Milestone:  3.2
Component:  Plugins           |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+-----------------------
Description changed by scribu:

Old description:

> There are many scenarios where one would like to have a plugin's folder
> symlinked to another location.
>
> A couple of these scenarios are described in #13550.
>
> However, when using symlinks, code such as this fails:
>
> {{{plugins_url( 'script.js', __FILE__ );}}}
>
> This happens because {{{__FILE__}}} resolves to the real path, which
> confuses plugin_basename().
>
> The most simple and most flexible solution is to add a filter to
> plugin_basename(), leaving individual devs to handle symlinks, depending
> on their environment.

New description:

 There are many scenarios where one would like to have a plugin's folder
 symlinked to another location.

 A couple of these scenarios are described in #13550.

 However, when using symlinks, code such as this fails:

 {{{plugins_url( 'script.js', __FILE__ );}}}

 This happens because {{{__FILE__}}} resolves to the real path, which
 confuses plugin_basename().

 The most simple and most flexible solution is to add a filter to
 plugin_basename(), leaving individual devs to handle symlined paths,
 depending on their environment.

--

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


More information about the wp-trac mailing list