Skip to content
AddHunt
WordPress plugins

Cassette CMF

Composer library for content models in WordPress plugins

Open source

  • Open source
  • Licence: GPL-2.0

In short

Cassette CMF is an open-source content modeling framework that WordPress plugin developers install with Composer to register custom post types, taxonomies, settings pages and custom fields from a single config. It is for developers who want fields in their plugins without asking users to install another plugin.

What you get

  • Installed with Composer and bundled in a plugin
  • One config for post types, taxonomies and fields
  • Config as PHP arrays or JSON
  • 18 core field types including repeaters and tabs
  • Own field types through a Field API
  • Settings pages from the same config

The details

Cassette CMF is a PHP library rather than a plugin: it is added to a WordPress plugin with composer require and ships inside it, so the plugin's users never need to install anything extra. The authors deliberately do not support running it as a standalone plugin.

One config for the whole content model

A single call on the init hook takes an array, or JSON, that describes custom post types, the taxonomies attached to them, their fields and any settings pages. The result is a registered post type with its taxonomy and fields placed in a meta box, all kept under version control instead of being set up in an admin screen.

Field types

The core includes 18 field types:

  • Text, textarea, number, email, URL and password inputs
  • Date, color with the WordPress color picker, select, checkbox and radio
  • A WYSIWYG editor and an upload field tied to the media library
  • Custom HTML for display-only content
  • Repeater, group, metabox and tabs for arranging fields

More fields are planned as separate Composer packages, so projects only pull in what they use, and developers can write their own with the Field API.

Why it exists

The authors wanted a tool that installs through Composer, is configured in code, is complete without a premium licence and stays small, and found that ACF and Carbon Fields each missed part of that list. Cassette CMF is released under GPL-2.0.

Alternatives to Cassette CMF

Questions

Is Cassette CMF a WordPress plugin?

No. It is a Composer library meant to be bundled inside plugins, and using it as a standalone plugin is not supported.

How does it compare with ACF?

Like ACF it registers custom fields, but it is configured in code, installed with Composer and complete without a premium licence.

Can developers add their own field types?

Yes. The Field API lets developers build their own fields, and more fields are planned as separate packages.

More like this