Skip to main content
PizzaLayerPro is here — full WooCommerce ordering, available now. Get Pro
Developer Reference

Build On Top
of PizzaLayer.

Coding-level documentation for theme and plugin authors. REST endpoints, JS event API, PHP filter hooks, the template architecture, and the constraints that keep contributions PHP 7.4 compatible and WP.org compliant.

Contributing on GitHub

PizzaLayer is GPL-2.0 and open to contributions. Coding standards, PR workflow, and the manual QA checklist are all documented in the repo. Issues, pull requests, and template contributions are welcome.

Developer Articles

API & Architecture Reference

15 coding-level guides. For end-user setup help, see the Support Center.

Api Cpt

Understanding CPT Slugs and Ingredient Types

How PizzaLayer's six Custom Post Types work: pizzalayer_toppings, pizzalayer_crusts, pizzalayer_sauces, pizzalayer_cheeses, pizzalayer_drizzles, and pizzalayer_cuts. Slug constants, register_post_type() arguments, and capability mapping.

Jan 12, 2026 Read more
Api Rest

REST API Endpoint Reference

Full reference for the /wp-json/pizzalayer/v1/render endpoint — parameters, response format, authentication, and usage examples for headless builds.

Jan 22, 2026 Read more
Templates Api Advanced

Creating a Custom Template

Developer guide to building a PizzaLayer template from scratch. Covers the six-file architecture, function namespacing with function_exists guards, CSS isolation, and JS instance pattern.

Feb 1, 2026 Read more
Api Hooks

Using PHP Filter Hooks

Reference guide for all apply_filters() hooks including ingredient data, rendered output, and Pro settings passing between PizzaLayerPro and the base plugin.

Feb 5, 2026 Read more
Api Js

JS Events API Reference

Developer reference for the JavaScript events API — available events, instance methods via NP.createInstance(), and the window.PizzaLayerProBuilder public API exposed by PizzaLayerPro.

Feb 18, 2026 Read more
Api Js Advanced

The window.PizzaLayerAPI Contract

Every template must register window.PizzaLayerAPI exposing getState() that returns a normalized flat layers[] array. Required for PizzaLayerPro cart integration and any custom JS that reads builder state. Includes shape spec and event-vs-polling tradeoffs.

Mar 20, 2026 Read more
Templates Api Advanced

Six-File Template Architecture

Deep dive into the file layout of a PizzaLayer template: render.php, assets.php, settings.php, style.css, script.js, and meta.json. Function prefixing (pzt_yourname_), function_exists() guards, and how the loader discovers templates.

Mar 22, 2026 Read more
Api Rest Advanced

Headless PizzaLayer with the REST Render Endpoint

Server-side rendering and headless integration patterns. POST a state payload to /pizzalayer/v1/render and receive an HTML fragment or JSON. Covers auth, caching headers, and rate limit guidance.

Mar 24, 2026 Read more
Templates Blocks Advanced

Building a Block-Based Template

How to ship a Gutenberg-block-enabled template variant. Block registration, inner-block patterns, and how server-side render() falls back to the same render.php used by the shortcode.

Mar 26, 2026 Read more
Api Hooks Advanced

Hooking the Render Pipeline

Modify what gets rendered without forking a template. apply_filters() entry points covering ingredient lists, the canvas markup, the wrapper, and per-layer image URLs. Includes a worked example replacing the default crust filter.

Mar 28, 2026 Read more
Js Api Advanced

Reading Builder State from External JS

Patterns for reading live builder state from external JavaScript without coupling to a specific template. Polling at 120ms (the Pro approach), the recommended event listeners, and avoiding double-dispatch bugs across multiple instances.

Mar 30, 2026 Read more
Api Advanced

PHP 7.4 Compatibility Constraints

Why the codebase targets PHP 7.4 and what you can't use when contributing or building extensions: no union types, no match expressions, no named arguments, no str_starts_with()/str_ends_with(). Recommended polyfills.

Apr 1, 2026 Read more
Api Advanced Woocommerce

Namespacing Classes That Extend WooCommerce Globals

Why classes extending WC_Product must be declared in the true global namespace using bracketed namespace syntax, not the plugin's PSR-4 namespace. The Pro Pizza product type as a worked example.

Apr 3, 2026 Read more
Api Advanced

Asset Enqueue Timing: wp_add_inline_style()

wp_add_inline_style() requires the target handle to already be enqueued; calling it on a registered-but-not-enqueued handle causes WordPress to flush raw CSS without <style> tags. How to order enqueue calls correctly for inline data.

Apr 5, 2026 Read more
Contributing Advanced

Contributing to PizzaLayer on GitHub

Coding standards, PR workflow, the manual QA checklist, and the lint scripts run on every change. PHP lint + JS brace-balance + a Cypress smoke pass before merge.

Apr 7, 2026 Read more

Working in the Codebase

Constraints to Know Before
You Open a PR.

🐘

PHP 7.4 Target

No union types, no match expressions, no named arguments, no str_starts_with() or str_ends_with(). The codebase ships on shared hosting that pins to 7.4, so newer syntax breaks fatal-on-load.

📦

WP.org Compliance

All <script> and <style> blocks must be extracted to enqueued files. Dynamic PHP data passes via wp_localize_script() or wp_add_inline_script(), never echoed inline.

🧬

Cross-Plugin Contract

Templates must expose window.PizzaLayerAPI with a normalized flat layers[] array from getState(). Pro polls this at 120ms — events alone aren't reliable across the template family.