[wp-hackers] Plugin dependency checking
Mike Schinkel
mikeschinkel at newclarity.net
Fri Jun 12 00:48:27 GMT 2009
"scribu" <scribu at gmail.com> wrote:
> Yes, I was thinking about auto-installing, but I wasn't thinking
> about plugins not hosted on WP Extend.
>
> A solution might be something like this:
>
> $dependencies = array(
> 'Akismet' => array('version' => '1.0'),
> 'Other plugin not on extend' => array('version' => '1.0', 'url' =>
> 'http://...')
> );
>
> For plugins not hosted on Extend, the child plugin would have to specify a
> URL.
Gotcha.
Just something to consider; it feels fragile to me to use Name.
Let me propose to consider using something a little more exact than plugin name rather than something more exact. For example, consider "All in One SEO Pack" on http://wordpress.org/extend/plugins/all-in-one-seo-pack/ People could more easily mistake it as:
-- All in One SEO Pack
-- All-in-One SEO Pack
-- All-in-1 SEO Pack
And probably several others. While it could still be easily mistyped, at least it could be dereferenced to validate if this was used instead:
-- all-in-one-seo-pack
Of course that made me look to see if there was a header for Extend URL (which I assumed there was but clearly isn't there.) So I ask the community to consider:
-- Add a header "Extend URL" where plugin authors would set the Plugin URL on WordPress.org Extend
-- Allow EITHER the Plugin Name OR the URL Slug to be used for dependencies.
That way those who want their code to be less fragile can make it so.
Thanks for considering.
-Mike Schinkel
Custom Wordpress Plugins
http://mikeschinkel.com/custom-wordpress-plugins
More information about the wp-hackers
mailing list