What Engine provides
Rather than each Suite module defining its own CPTs and REST routes from scratch, they all register through Engine. The result: consistent naming, consistent capabilities, consistent schema management.
Custom post types
Engine provides a builder for registering CPTs with sensible defaults:
Wigmorean_Engine_CPT::register( 'course', [
'label' => 'Courses',
'public' => true,
'supports' => [ 'title', 'editor', 'thumbnail' ],
'rest_base' => 'courses',
'capability' => 'wigmorean_manage_courses',
] );
CPTs registered this way automatically get: REST endpoints on the Wigmorean namespace, an admin list-table with Wigmorean styling, and capability enforcement.
REST namespace
Every Suite module registers routes under /wp-json/wigmorean/v1/. Engine handles auth, CORS, rate limiting, and error shapes centrally:
Wigmorean_Engine_REST::register_route( 'my-module/stuff', [
'methods' => 'GET',
'callback' => 'my_callback',
'capability'=> 'read_my_stuff',
] );
Tag engine
A universal tagging layer: any Engine-registered post type can have tags from a shared vocabulary. A single tag can attach to a Course (LMS), a Product (Commerce), and a Contact (CRM) — cross-module discovery falls out of this for free.
Capabilities
Engine registers a Wigmorean capability namespace on activation:
wigmorean_manage_*— per-module admin capswigmorean_view_*— read-only caps for frontend gatingwigmorean_super_admin— top-level meta cap
Administrators get everything by default; editors get view-only; custom roles can be composed via Engine → Capabilities.
Schema manager
Modules declare custom database tables via Engine's schema manager. On plugin activation, update, or migration, Engine runs dbDelta with the declared schema. Rollbacks are tracked so re-migration is idempotent.
Wigmorean_Engine_Schema::register( 'wig_my_table', function() {
global $wpdb;
return "CREATE TABLE {$wpdb->prefix}wig_my_table (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(191),
PRIMARY KEY (id)
)";
} );
Why Engine exists
Without Engine, each module would reinvent CPT registration, REST routes, capabilities, and schema migrations. With Engine, modules focus on their domain logic and inherit conventions. It's also the mechanism that lets third-party extensions feel native.