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.


The MainWP API uses REST conventions and returns all data in JSON format. Requests may be made using the HTTPS protocol and must be authenticated using a Consumer Key and Consumer Secret. The API supports 3 primary resources, each with a related set of endpoints: Response bodies from the MainWP API are in JSON format, with a Content-Type: of application/json and UTF-8 character encoding.


The MainWP Codex documents the API (Application Programming Interface) hooks available to MainWP developers, and how to use them to create your own MainWP Extension.

This article assumes you have already read WordPress Plugin API, which gives an overview (and many details) of how to develop a plugin. This article is specifically about the API of “Hooks”, also known as “Filters” and “Actions”, that MainWP uses to set your plugin in.

What are the hooks?

Hooks in WordPress allow you to change or add code without editing source files. They are used extensively throughout WordPress and MainWP and are very useful for 3rd party developers.

There are two types of hook: actions and filters.

  • Action Hooks allow you to insert your custom code at various points.
  • Filter Hooks allow you to manipulate and return a variable which it passes.