[wp-trac] [WordPress Trac] #22802: Empower Plugin Developers to make Symlink Compatible Plugins
WordPress Trac
noreply at wordpress.org
Fri Jan 4 21:20:37 UTC 2013
#22802: Empower Plugin Developers to make Symlink Compatible Plugins
------------------------------------------------+--------------------------
Reporter: MikeSchinkel | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: Awaiting
Component: Plugins | Review
Severity: normal | Version: 3.4.2
Keywords: has-patch dev-feedback 2nd-opinion | Resolution:
------------------------------------------------+--------------------------
Comment (by nacin):
I see four approaches:
1. Something fairly convoluted in core to allow a plugin to work in a
symlinked environment.
2. Something fairly straightforward in an environment to allow all
plugins to work.
3. Avoid symlinks, and use VCS tools to check out the same code into
multiple places (git submodules, svn externals, checkouts, etc)
4. Avoid symlinks, and use a shared plugin directory via WP_PLUGIN_DIR
and WP_PLUGIN_URL (it's why these constants are there)
The first approach is particularly painful, and still won't help you for
every other plugin that uses `__FILE__`, and because it will require
plugin authors to do a decent amount of work to leverage it, it probably
won't become a best practice.
The other three are far easier, far more reliable, and require no core
changes. Option 2 even sounds like a great plugin.
Yes, PHP is clearly lacking a tool here. But I don't think we should
return the volley with a weird fix that plugin developers will probably
struggle with. If there's a proposal that is sufficiently straightforward
(both in core's implementation, and in how plugins use it), this could be
considered. Until then, there seem to be a number of ways to do this
inside one's environment, and those ways seem to be more efficient than a
core solution anyway.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22802#comment:20>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list