Skip to content

About

Enterprise-grade WordPress theme starter - OOP, PSR-4, Service Container, REST API, AJAX, Security Layer

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WP Enterprise Theme Starter

WordPress PHP License CI

Enterprise-grade WordPress theme starter demonstrating professional architecture patterns. Built for developers who want to showcase solid WordPress engineering skills.

Author: Midas Moradi

Features

Layer Description
OOP PHP Strict typing, single-responsibility classes, HookableInterface contract
PSR-4 Autoloading Composer autoload + fallback autoloader
Service Container Lightweight DI container with singleton bindings
Theme Options Settings API + Customizer integration
CPT Registration Portfolio post type with taxonomy & meta boxes
REST API Custom wpe/v1 endpoints with validation
AJAX Layer Secure newsletter handler with nonce verification
Security Layer HTTP headers, sanitization, escaping, capability checks

Architecture

src/
├── App.php                 # Bootstrap & service wiring
├── Container/
│   └── Container.php       # DI container
├── Core/
│   └── Setup.php           # Theme supports, menus, sidebars
├── Security/
│   └── SecurityManager.php # Headers, nonces, helpers
├── Options/
│   └── ThemeOptions.php    # Settings API + Customizer
├── Admin/
│   └── ThemeOptionsPage.php
├── PostTypes/
│   └── PortfolioPostType.php
├── Api/
│   └── PortfolioRestController.php
├── Ajax/
│   └── NewsletterHandler.php
└── Assets/
    └── AssetManager.php

Requirements

  • WordPress 6.4+
  • PHP 8.1+
  • Composer (recommended)

Installation

  1. Clone or download this repository
  2. Copy the theme folder to wp-content/themes/wp-enterprise-theme-starter
  3. Install dependencies:
cd wp-content/themes/wp-enterprise-theme-starter
composer install --no-dev
  1. Activate the theme in Appearance → Themes
  2. Go to Appearance → Theme Settings to configure options
  3. Create a static front page and assign it as homepage

Development

composer install
composer phpcs      # Run coding standards
composer phpcbf     # Auto-fix coding standards

REST API

Get portfolio items

GET /wp-json/wpe/v1/portfolio?per_page=6&category=web-design

Get single portfolio item

GET /wp-json/wpe/v1/portfolio/{id}

AJAX

Newsletter subscription via admin-ajax.php:

  • Action: wpe_newsletter_subscribe
  • Params: email, nonce
  • Hook: wpe_newsletter_subscribed — fires on successful subscription

Theme Options

Available via Appearance → Theme Settings:

  • Company name & tagline
  • Contact email & phone
  • Hero title & subtitle
  • Newsletter toggle

Accent color is configurable via Customizer → Enterprise Theme.

Security Notes

  • Security headers sent on front-end requests
  • All forms/AJAX protected with WordPress nonces
  • Input sanitization and output escaping throughout
  • REST API access to core wp/v2 requires authentication (custom wpe/v1 remains public)

Design

Modern 2026 dark theme with:

  • CSS custom properties & design tokens
  • Fluid typography
  • Glassmorphism header
  • Gradient hero with grid overlay
  • Responsive mobile navigation
  • prefers-reduced-motion support
  • Block editor support via theme.json

Author

Midas Moradi — GitHub

License

GPL v2 or later. See LICENSE.

About

Enterprise-grade WordPress theme starter - OOP, PSR-4, Service Container, REST API, AJAX, Security Layer

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages