Tutorial: A plugin building adventure

This tutorial walks through building a plugin the “WPPF way.” It is opinionated and assumes you are comfortable with Composer and WordPress development basics.

What you’ll build

  • A plugin entry file that extends WPPF\v1_2_2\WordPress\Plugin.
  • A custom post type with supporting meta and admin screens.
  • An admin module, meta box, and a few framework utilities.

How to follow along

Run all CLI commands from your plugin root directory (the folder whose name matches your plugin slug). Most commands use the current working directory to decide file paths and class names.

Sections

  • Build a plugin: step-by-step scaffolding with the CLI.
  • Framework Tools: guides for common functionality.

Build a plugin map

Step Page
Getting started Getting started (installation)
Main plugin file Create a plugin file
Post type Create a post type
Post type meta Create a post type meta
Admin module Create a plugin admin module
Post screens Create a post screen
Meta boxes Create a meta box

Framework tools map

Tool Page
Action Scheduler Action Scheduler
Admin notices Admin Notice
Templates Calling a template
Assets Enqueueing JS/CSS
Staging Staging Detection
Upgrades Upgrade Schema
Utilities Utility class and debugging