[wp-hackers] Plugin dependency checking
scribu
scribu at gmail.com
Mon Jun 15 09:30:54 GMT 2009
On Mon, Jun 15, 2009 at 7:28 AM, Mike Schinkel
<mikeschinkel at newclarity.net>wrote:
> I'm thinking plugins are more like functions that can be called by other
> functions, or like URLs that can be linked from pages located at other URLs.
> In both of those cases that called/linked function/URL doesn't have to
> define it's caller/referrer.
Just as with regular plugins, you have to call add_action() and
add_filter(), the same happens with child-parent plugins. They can't be
completely separated.
So are you suggesting a model that requires all child plugins identify their
> parents? IOW, a model were no child plugins could be used by more than one
> parent plugin?
>
One or more child plugins can use functionality provided by one parent
plugin. Parent plugins are not aware of the additional functionality that
each child plugin provides. That's the basic model.
In my activation hook example, the parent plugin simply fires one of it's
own functions with the parameters provided by the child plugin. (I could
have created a second child plugin that called the same parent plugin, but
with different params.)
--
http://scribu.net
More information about the wp-hackers
mailing list