[wp-hackers] Plugin dependency checking

Mike Schinkel mikeschinkel at newclarity.net
Fri Jun 12 00:29:18 GMT 2009


"scribu" <scribu at gmail.com> wrote:
> > That would be super.  Question: what unique identifier would be used in the
> > "Depends On:" header?
> 
> Ideally, it would be the "Plugin Name" of the parent plugin. But given the
> fact that versions would also be required, I think a function like
> set_dependencies(__FILE__, array('Spam Karma' => 1.3, ...)) would be better.

Hmm. I think maybe I was assuming something you were not and that if a plugin depends on another and the plugin on which the other plugin depends would automatically be downloaded and activated (with appropriate admin confirmation, of course.) For that it seems to me you'd need something a bit more exact than Plugin Name, i.e. something that is both guaranteed(?) unique and also something that can generate an appropriate and singular dereference point.

Am I correct that you guys were not thinking about automatic download but instead just error checking to ensure that the depended plugin is currently installed.

-Mike Schinkel
Custom Wordpress Plugins
http://mikeschinkel.com/custom-wordpress-plugins


More information about the wp-hackers mailing list