[wp-hackers] auto-loading plugin deps ( prev: pluggable functions )
lists at lobaugh.net
Mon Oct 29 05:17:51 UTC 2012
I think it would be great to see something similar to the enqueue
scripts that you can pass required dependencies to, probably the slug of
the plugin from the repo. If it does not exist then WP will disable the
plugin and/or prompt you to install the dependency to enable the plugin.
I have written a few library plugins as well and I can sympathize with
the dependency management and load order of plugins. It is tricky with
the current way WP works, but I do not think it would be too difficult
to add something of that sort to the system. Check and see if anything
like that exists on Trac, if not would you be interested in exploring a
solution to patch core to do that with me?
On 10/28/12 8:21 PM, Mike Schinkel wrote:
> On Oct 28, 2012, at 11:04 PM, Daniel Dvorkin <elrabino at gmail.com> wrote:
>> I've been wondering about this for a while. WP_Dependencies (the class
>> extended by WP_Scripts and WP_Styles) seems well suited to handle some sort
>> of library load in the same way we can register, unregister
>> and prioritise scripts and styles.
> Yes, it does look like WP_Dependencies would be a good base for dependency management. That is, however, a large scope and I'd fear a larger scope would be beyond consideration.
> WP_Dependencies helps manage the tree of dependencies; the smaller scoped need would be to collect up a list of latest needed libraries and load the latest one of each or fire an action to notify a plugin that its library load request can't be fulfilled so it can notify the admin user and avoid using the library.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers