[wp-hackers] Plugin dependency checking

Austin Matzko if.website at gmail.com
Fri Jun 12 15:35:11 GMT 2009


On Fri, Jun 12, 2009 at 10:16 AM, scribu<scribu at gmail.com> wrote:
> On Fri, Jun 12, 2009 at 6:12 PM, Austin Matzko <if.website at gmail.com> wrote:
>
>> Instead of using "plugins_loaded" (or some new action hook or
>> function), why not attach a callback to a custom action hook of the
>> parent?
>>
>
> That would be very nice, but what about register_activation_hook() and the
> rest?

Here's what you could do in the child plugin:

On the standard activation hook: Set the child plugin's object
property $is_being_activated to true.

On the "my_parent_plugin_initialized" hook: If $is_being_activated is
true, do the activation stuff.


More information about the wp-hackers mailing list