[wp-trac] [WordPress Trac] #12612: Plugins dependancy

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 15 23:17:06 UTC 2010


#12612: Plugins dependancy
--------------------------+-------------------------------------------------
 Reporter:  shidouhikari  |       Owner:  westi
     Type:  enhancement   |      Status:  new  
 Priority:  normal        |   Milestone:  3.1  
Component:  Plugins       |     Version:  3.0  
 Severity:  normal        |    Keywords:       
--------------------------+-------------------------------------------------
 This feature already exists in Drupal and is very helpful.

 When we enqueue a javascript, we can define another file that this script
 depends, and doing so Wordpress assures dependencies are fulfilled and
 dependant file is only linked when those files it depends are already
 present. That works great!

 In the same way, a plugin could inform which plugins it depends from, and
 doing so, Wordpress would load those plugins first, and only then load the
 dependant plugin.

 In plugins list (wp-admin/plugins.php), each plugin would have listed all
 plugins it requires to work, inform if they are available, and only be
 allowed to be activated when all dependances are filled (when all plugins
 it depends are activated). Otherwise, unavailable plugins would be
 highlighted and Activate link not provided.

 Also, each plugin would have listed all plugins that depend on it, and
 while there is an active plugin depending on it, its Deactivate link is
 also not provided.

 The benefit of this feature is that framework plugins could be safely
 developed. Today we have roles and capabilities, custom post types and
 custom taxonomy features, but we don't have UI pages for them, and there
 are plugins that implement UIs to manage these resources. In the same way,
 people would be able to develop plugins only with code to be used by other
 plugins, which would enhance that base plugin and depend on it. Or with
 simple UI that could be enhanced by other plugins.

 Or, when we have a plugin we wanna enhance, instead of hacking it we just
 ask its author to add actions and filters, and we develop our own plugin
 to do what we want over the original one, and set that plugin as a
 dependance of ours.

 Today this can be done, but we can't assure a plugin loads before another,
 which would break dependant plugin. And nothing stops a dependant plugin
 from being activated when its dependance is not available, or the base
 plugin be deactivated while dependant plugin remains activated.

 This feature would solve all these issues and assure more "security" for
 people to develop plugins that relate to each other.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12612>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list