MainWP Codex is a great place to learn how to extend the MainWP plugin creating custom extensions or simple customizations.

Actions & Filters

See all available hooks in the MainWP plugin that will allow you to add data or change how MainWP works.

Code Reference

Browse MainWP codebase to learn what’s going on inside the MainWP plugin core files.


Coming Soon!

Check if MainWP is Enabled

To check if the plugin is enabled we work with a two-step mechanism.

First, you have the filter ‘mainwp_activated_check’. This filter will return true if the main plugin is activated. Because sometimes our main plugin is activated after the extension plugin is activated we also have a second step, listening to the ‘mainwp-activated’ action. This action is triggered by MainWP after initialization.

In the example above you can see that the child-plugin calls the function “activate_this_plugin”, this function will include the initialization of your own plugin.