Download the PHP package pedalcms/wp-cmf without Composer
On this page you can find all versions of the php package pedalcms/wp-cmf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download pedalcms/wp-cmf
More information about pedalcms/wp-cmf
Files in pedalcms/wp-cmf
Download pedalcms/wp-cmf
More information about pedalcms/wp-cmf
Files in pedalcms/wp-cmf
Vendor pedalcms
Package wp-cmf
Short Description WP Content Modeling Framework
License GPL-2.0-or-later
Package wp-cmf
Short Description WP Content Modeling Framework
License GPL-2.0-or-later
Please rate this library. Is it a good library?
Informations about the package wp-cmf
Cassette-CMF (WordPress Content Modeling Framework)
A powerful, flexible Composer library for building WordPress plugins with custom post types, taxonomies, settings pages, and dynamic form fields.
Features
- Custom Post Types - Register CPTs with fields using array or JSON configuration
- Custom Taxonomies - Create taxonomies with custom term meta fields
- Settings Pages - Top-level and submenu pages with automatic form handling
- 18 Field Types - Text, textarea, number, email, url, password, date, color, select, checkbox, radio, wysiwyg, upload, custom_html, tabs, metabox, group, repeater
- Container Fields - Organize fields with tabs, metaboxes, groups, and repeaters
- Extend Existing - Add fields to existing post types, taxonomies, and settings pages
- Array Configuration - Register everything from a single PHP array
- JSON Configuration - Load configurations from JSON files with schema validation
- Before-Save Filters - Modify or validate field values before saving
- Validation & Sanitization - Built-in security with customizable rules
- Asset Management - Context-aware CSS/JS enqueuing
- i18n Ready - Full internationalization support
Requirements
- PHP: 8.2 or higher
- WordPress: 6.0 or higher
- Composer: For autoloading
Installation
Quick Start
Basic Example
Extending Existing Post Types and Taxonomies
JSON Configuration
Field Types
Basic Fields
| Type | Description | Key Options |
|---|---|---|
text |
Single-line text input | placeholder, maxlength, pattern |
textarea |
Multi-line text input | rows, cols, maxlength |
number |
Numeric input | min, max, step |
email |
Email input | Automatic validation |
url |
URL input | Automatic validation |
password |
Password input | Masked input |
date |
Date picker | min, max |
color |
Color picker | WordPress color picker |
Choice Fields
| Type | Description | Key Options |
|---|---|---|
select |
Dropdown select | options, multiple |
checkbox |
Checkbox input | options (for multiple) |
radio |
Radio button group | options |
Rich Content
| Type | Description | Key Options |
|---|---|---|
wysiwyg |
Visual editor | TinyMCE with media buttons |
upload |
Media uploader | button_text, library_type, preview |
custom_html |
Display custom HTML | content, allowed_tags, raw_html |
Container Fields
| Type | Description | Key Options |
|---|---|---|
tabs |
Tabbed container | orientation, tabs[] |
metabox |
Metabox container | context, priority, fields[] |
group |
Field group | label, description, fields[] |
repeater |
Repeatable fields | button_label, min, max, fields[] |
Retrieving Values
Cassette-CMF provides a universal static method to retrieve field values regardless of their storage location:
Method Signature
| Parameter | Type | Description |
|---|---|---|
$field_name |
string | The field name as defined in your config |
$context |
int|string | Post ID, term ID, or settings page ID |
$context_type |
string | 'post' (default), 'term', or 'settings' |
$default |
mixed | Default value if field is empty |
Context-Specific Helper Methods
Legacy Approach (Still Works)
Before-Save Filters
Modify or validate field values before saving:
Examples
| Example | Description |
|---|---|
| 01-simple-array | Book CPT + Genre Taxonomy + Library Settings (PHP) |
| 02-simple-json | Event CPT + Event Taxonomies + Settings (JSON) |
| 03-advanced-array | Full demo: CPTs, taxonomies, settings, containers, filters |
| 04-advanced-json | Full demo with multi-file JSON configuration |
Documentation
- Field API Documentation
- Examples
Testing
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Write tests for your changes
- Ensure all tests pass (
composer test) - Submit a pull request
License
GPL-2.0-or-later. See LICENSE for details.
Support
- GitHub Issues
- Documentation
- Examples
All versions of wp-cmf with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.2
The package pedalcms/wp-cmf contains the following files
Loading the files please wait ...