[wp-trac] [WordPress Trac] #13550: WP_PLUGIN_DIR doesn't detect symlinks

WordPress Trac wp-trac at lists.automattic.com
Fri May 28 10:57:52 UTC 2010


#13550: WP_PLUGIN_DIR doesn't detect symlinks
---------------------------+------------------------------------------------
 Reporter:  acumensystems  |        Owner:  westi  
     Type:  enhancement    |       Status:  closed 
 Priority:  normal         |    Milestone:         
Component:  Plugins        |      Version:  3.0    
 Severity:  minor          |   Resolution:  wontfix
 Keywords:                 |  
---------------------------+------------------------------------------------
Changes (by dd32):

  * keywords:  symlink plugin basename paths =>
  * status:  new => closed
  * resolution:  => wontfix
  * milestone:  Future Release =>


Comment:

 Using simlinks is not a good idea here, as you've found out.

 Instead, You should be adding a define to your wp-config.php to direct
 WordPress to the true folder:

 {{{
 define('WP_PLUGIN_DIR', ABSPATH . '/wp-content/themes/my-theme/plugins');
 define('WP_PLUGIN_URL', 'http://.....');
 }}}

 I'm closing this as wontfix due to the availability of the above constants
 to define locations such as these. I think you'll find the reason plugins
 hard-code paths is due to either lack of developer knowledge, or simply
 old un-updated plugins which were around before the new API was introduced
 for such functionalities.

 (As an aside, That patch will probably not work.. ending up as {{{/home
 /..../wp-content//home/..../wp-content/themes..../}}} readlink() returns
 an absolute path i believe.)

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


More information about the wp-trac mailing list