Skip to content

Xe Plugin Documentation

Welcome to the documentation for Xe Plugin — a modern, robust, and extensible starter boilerplate for WordPress plugin developers.

Xe Plugin provides a clean, object-oriented architecture along with a built-in PHP command-line interface (CLI) to accelerate your development workflow. Whether you are creating custom client solutions, complex web applications running inside WordPress, or commercial marketplace plugins, Xe Plugin gives you a structured foundation.


Key Highlights

  • Object-Oriented & PSR-4 Autoloaded: Fully organized into namespaced classes with clean separation of concerns.
  • Built-in PHP CLI (php xe): Pure PHP command-line tooling for project initialization, production builds, translation POT generation, and code scaffolding. No Node.js required.
  • Centralized Service Container: Access core services, file paths, URLs, options, and metadata globally through the _xe_plugin() singleton helper.
  • Scoped Bootstrapping: Efficient execution by separating service registration into Global, Admin, and Frontend/Render lifecycle scopes.
  • Virtual Rewrite Endpoints & Templates: Register custom URL endpoints with subpath routing and auth protection without creating static WordPress pages.
  • Custom Page Templates: Integrated page template support with single-use enforcement and guest/authenticated redirect logic.
  • CRUD Module Engine (BaseModule): Built-in architecture for managing custom entities with advanced metadata search, nonces, trash, restore, and permanent deletion.
  • Database Sequences: Custom auto-incrementing sequential numbers table for invoices, tickets, and order numbers.
  • Elementor Widget Integration: Automatic discovery and registration of custom Elementor widgets.
  • WooCommerce Ready: Built-in hooks and examples for product custom fields, single-product add-ons, cart manipulation, and order meta.
  • Developer Utilities (Utils): Helper methods for asset enqueueing with automatic versioning (filemtime), nonces, color conversions, CSS minification, and post meta handling.

Requirements

To use Xe Plugin for development, ensure your environment meets the following prerequisites:

Requirement Minimum Version Recommended
PHP 8.0+ 8.1 / 8.2 / 8.3
WordPress 6.0+ Latest Stable
Composer 2.0+ Latest Stable
WP-CLI (Optional for POT generation) 2.5+ Latest Stable