Tutorials

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.

REST API

Coming Soon!

Initialising your own plugin

The function “activate_this_plugin” is called when the main is initialized. Since extensions may be enabled and disabled in our extension section we have to check if this particular plugin is enabled.

This is done with the ‘mainwp_extension_enabled_check’ hook. If the plugin is not enabled this will return false, if the plugin is enabled, an array will be returned containing a key. This key is used for some data requests to our main. (You will find more about this in the filters using this key)