Registry / web-framework / cmb2-cmb2

cmb2-cmb2

JSON →
library2.12.0phppackagistunverified

CMB2 is a metabox, custom fields, and forms library for WordPress that will blow your mind.

composer require cmb2/cmb2
INSTALL
IMPORT
SIG · CMB2-CMB2
C
cmb2-cmb2
web-frameworkphpv2.12.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CMB2
use CMB2;

Create a WordPress metabox with a text field.

<?php require 'vendor/autoload.php'; use CMB2; $cmb = new CMB2([ 'id' => 'test_metabox', 'title' => 'Test Metabox', 'object_types' => ['post'], ]); $cmb->add_field([ 'name' => 'Test Text', 'id' => 'test_text', 'type' => 'text', ]);
Debug
Known issues
gotchaRequires WordPress; not a standalone library.
fix
Use only within a WordPress plugin or theme context.
affects: *
Upgrade
Version history
2.12.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
cmb2-cmb2 — pip install cmb2-cmb2 · libregistry