[wp-hackers] Plugin dependency checking

scribu scribu at gmail.com
Fri Jun 12 15:12:41 GMT 2009

Regarding the identifier:

I think it's best to use the plugin basename (i.e: 'bb-press/bb-loader.php')
- it doesn't require any work on the master plugin side
- doesn't require loading the master plugin first

Considering "sub-plugins" and providing a nice plugin name, I think this is
what a call to register_dependecy() would look like:

// my_dependent_plugin.php:

register_dependency(__FILE__, array(
  'bb-press/bb-loader.php' => array('name' => 'BuddyPress', 'min-ver' =>
'1.0', 'master' => 'true'),
  'plugin-framework.php' => array('name' => 'WP Plugin Framework', 'min-ver'
=> '2.1')

As for plugin versions, I think we should store them in the active plugin
list. Then when we check dependencies, we would have them handy.


More information about the wp-hackers mailing list