Download the PHP package camalote-wp/models without Composer
On this page you can find all versions of the php package camalote-wp/models. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download camalote-wp/models
More information about camalote-wp/models
Files in camalote-wp/models
Download camalote-wp/models
More information about camalote-wp/models
Files in camalote-wp/models
Vendor camalote-wp
Package models
Short Description CamaloteWP Models provides abstract base classes for registering WordPress content models (post types, taxonomies, metadata, blocks).
License GPL-2.0-or-later
Package models
Short Description CamaloteWP Models provides abstract base classes for registering WordPress content models (post types, taxonomies, metadata, blocks).
License GPL-2.0-or-later
Please rate this library. Is it a good library?
Informations about the package models
CamaloteWP Models
Abstract base classes for registering WordPress content models (post types, meta, blocks, REST hooks, admin pages). Reduces boilerplate when spinning up the same registration logic across multiple plugins.
Usage
- Extend the abstracts for your content model
- Implement the abstract methods
- List your components in a Bootstrap class
- Run the BootstrapRunner
Complete Example
Reference
AbstractPostType
| What to extend | AbstractPostType |
|---|---|
| Implements | Registerable |
| Must implement | args(): array |
| Can override | (none) |
| You get | register() — calls \register_post_type() with $model_name and args() |
AbstractMeta
| What to extend | AbstractMeta |
|---|---|
| Implements | Registerable |
| Must implement | schema(): array |
| Can override | get_meta_prefix(): string (default: empty string) |
| You get | register() — loops schema and calls \register_post_meta() per entry, prefixing keys with get_meta_prefix() |
AbstractBlocks
| What to extend | AbstractBlocks |
|---|---|
| Implements | Registerable, Hookable |
| Must implement | get_block_paths(): array |
| Can override | get_hooks(): array (default: empty) |
| You get | register() — scans each path for block.json files and calls \register_block_type() |
AbstractRest
| What to extend | AbstractRest |
|---|---|
| Implements | Hookable |
| Must implement | (none) |
| Can override | get_hooks(): array (default: empty) |
| You get | A Hookable base for adding REST filters/actions via get_hooks() |
AbstractModelAdminPage
| What to extend | AbstractModelAdminPage |
|---|---|
| Implements | Hookable, AdminPage |
| Must implement | get_page_config(): array, get_asset_config(): array, render_page(): void |
| Can override | get_hooks(): array (default: empty) |
| You get | register_submenu_page(), register_menu_page(), enqueue_assets() |
AbstractBootstrap
| What to extend | AbstractBootstrap |
|---|---|
| Must implement | get_components(): array |
| Can override | register() (default: empty) |
| You get | get_model_name() |
BootstrapRunner
Orchestrates registration. Instantiate, pass Bootstrap class names to register(), then call run(). Accepts an optional Loader instance for dependency injection.
Installation
Development
All versions of models with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
The package camalote-wp/models contains the following files
Loading the files please wait ...