Meta Box
New in v3.4.2, a community contribution. Meta Box is a developer’s custom-fields toolkit, fast, code-first, and popular for building content models on client sites. EMCP exposes it through two dispatcher tools: read field groups and field values, and update values. Registers only when Meta Box is active.
It’s intentionally conservative, values only. There’s no field authoring and no delete, and unknown fields are skipped rather than created, so an agent can safely fill in and update structured content without risk of scrambling your field definitions.
How it works
Section titled “How it works”Both tools take { operation, arguments }. Omit operation to get back the list of available operations for that tool.
emcp-tools/metabox-read
Section titled “emcp-tools/metabox-read”Three read operations:
| Operation | Arguments | What it does |
|---|---|---|
list-field-groups | search?, object_type? | List registered field groups (id, title, object type, post types, field count). |
get-field-group | id | One field group and its field definitions (label, type, settings). |
get-fields | post_id or object_type + object_id; optional fields, include_field_settings | Read field values from a post or object. |
emcp-tools/metabox-write
Section titled “emcp-tools/metabox-write”One write operation:
| Operation | Arguments | What it does |
|---|---|---|
update-fields | post_id or object_type + object_id, fields: { id: value } | Write field values on a post or object. |
Permissions
Section titled “Permissions”metabox-read is enabled by default. metabox-write ships disabled by default, enable it on EMCP Tools → Tools → Plugins → Meta Box. See Disabling tools.