﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
13550,WP_PLUGIN_DIR doesn't detect symlinks,acumensystems,westi,"Hi

I've noticed a number of plugins hardcoding their plugin directories, and I think I see why. If you develop a theme, and that theme depends on plugins, it's tempting to bundle the plugins along with the theme files (i.e. all in wp-content/themes/mytheme).

Then, to allow Wordpress to use these plugins, it's common to symlink wp-content/plugins to wp-content/themes/mytheme/plugins, or somesuch.

That means that plugins using plugin_basename(__FILE__) will break, as the WP_PLUGIN_DIR path will not be removed from the full  returned path.

I've written a patch for wp-includes/default-constants.php that will detect if the plugins directory is a symlink, and if so will use the appropriate correct path as part of the constant, thereby ensuring all paths calculated by plugins are correct based on this constant.",enhancement,closed,normal,,Plugins,3.0,minor,wontfix,has-patch 3.2-early,acumensystems tom@… contact@… wptrac@… jltallon
