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!

Introduction

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.