[wp-trac] [WordPress Trac] #22802: Empower Plugin Developers to make Symlink Compatible Plugins

WordPress Trac noreply at wordpress.org
Fri Jan 4 21:40:16 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 MikeSchinkel):

 Replying to [comment:20 nacin]:
 > I see four approaches:

 I agree that #1 is not worth doing.  I have no idea what #2 is.  And I've
 already explained that #3 is not practical and #4 doesn't address the need
 either, as I'll explain below.

 But **you left out a 5th option**, which is the option you already
 described in your prior comment.  Record the virtual filename and
 associate it with the `realname()` such as via a keyed array or as a
 variable that is accessible when the plugin is loaded, activated,
 deactivated and uninstalled. That's all, and you already suggested it.
 That's all it would take to empower developers.  There are numerous ways
 to get there too, we only need one.

 Maybe what I need to explain is the problem really arises when using
 shared code across many plugins in the same site so #4 is not a solution.
 If we keep multiple copies of the same shared code it becomes too hard to
 keep track of which one(s) are being modified resulting in lost changes
 and a lot of wasted time.  So we need to symlink the libraries of shared
 code to be able to keep only one copy but that's really difficult if can't
 get access to the virtual filename that WordPress expects vs. the
 `realname()` that PHP uses for `__FILE__` and `__DIR__`.

 All we need is to know the plugin's virtual filename when it loads.
 Somehow.  Is that really too much to ask?

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


More information about the wp-trac mailing list