[wp-hackers] Plugin dependency checking

Mike Schinkel mikeschinkel at newclarity.net
Sat Jun 13 12:36:06 GMT 2009


scribu:

Looking at your code it appears you are assuming a parent-child inheritance relationship?  Did I follow it correctly?

I hadn't considered dependent plugins having a parent-child inheritance relationship but I guess there are use-cases where that would make sense though I can't immediately think of one.

Still, does your approach *require* a parent-child inheritance relationship?  For my envisioned use-cases with one example being the payment processors plugins for an shopping cart plugin I see a lot more "uses a" relationships than "is a" relationships between a plugin and it's dependents.

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

----- Original Message -----
From: "scribu" <scribu at gmail.com>
To: wp-hackers at lists.automattic.com
Sent: Saturday, June 13, 2009 7:31:28 AM GMT -05:00 US/Canada Eastern
Subject: Re: [wp-hackers] Plugin dependency checking

>
> Ok, thanks for the pointers. I'll see if I can manage to pull off the
> activation hook workaround without modifying the active_plugins list.
>

So I've managed to call a function from the parent plugin when the child
plugin is activated (yes, I actually need that), without interfering with
the loading order:

Parent plugin: http://wp.pastebin.ca/1458835
Child plugin: http://wp.pastebin.ca/1458837

I just wrote it to see if it can be done.

--
http://scribu.net
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list