Pods
New in 3.21.1 (free), and in EMCP Lite 1.0.5 on WordPress.org. Two dispatcher tools work with Pods 3.3.9.2:
| Tool | Default | Purpose |
|---|---|---|
pods-read | On | Supported Pods, their fields and records (6 operations) |
pods-write | Off | Create a Pod, rename it, create draft records and update field values (4 operations) |
Enable the write tool under Tools > Plugins > Pods. Call a tool with no operation to get its operations and argument schemas.
Requirements
Section titled “Requirements”- Pods 3.3.9.2 exactly; another version answers
unsupported_version. - An administrator (
manage_options) who is also a Pods administrator. Pods’ own permission applies to each Pod and field, and WordPress’s read or edit permission to each record.
Supported Pods and fields
Section titled “Supported Pods and fields”- Pods: public post-type Pods with meta storage and ordinary post permissions. Table storage, taxonomy, user, comment and settings Pods answer
unsupported_pod. - Fields:
text,paragraph,number(whole numbers, no decimals) andboolean, not repeatable. Other fields are listed withwritable: falseand their values are not returned.
Read operations
Section titled “Read operations”| Operation | What it does |
|---|---|
status | Pods version, storage (post/meta) and the supported field types |
list-pods | Supported Pods with their version, paged |
get-pod | One Pod by pod name, with its fields and version |
list-fields | A Pod’s fields, paged, each with writable |
list-records | A Pod’s records (title and status), paged, limited to records the user may read |
get-record | One record by id, with its supported field values and version |
list-records covers Pods with up to 5,000 records; a larger Pod answers query_too_large, and records are read with get-record.
Write operations
Section titled “Write operations”Every write needs confirm: true; dry_run: true validates first.
| Operation | What it does |
|---|---|
create-pod | pod name (2 to 20 characters), label and 1 to 20 fields, each { name, label, type } |
update-pod-label | Change the Pod’s label, with the Pod’s version |
create-record | A draft with title and 1 to 20 values, each { name, value }, authored by the connected user |
update-record | Change 1 to 20 values on a record, with the record’s version |
Rules and refusals
Section titled “Rules and refusals”- Pod and field names start with a lowercase letter and use
a-z,0-9and_. Reserved names, existing post types or taxonomies, and the prefixeswp_,emcp_,elementor,acf_and_are refused (protected_slug). Field names cannot beid,name,title,content,status,slug,author,dateor start withpost_(invalid_field). - Values must match the field: an integer for
number,trueorfalseforboolean, plain text without HTML up to 20,000 characters fortextandparagraph(invalid_value). Each field can appear once per call (unsupported_field). - A field stored in more than one meta row cannot be edited (
unsupported_field). - A schema or record changed since your read answers
conflict. - New Pods and records are read back after saving. If a hook changed the result, the answer is
partial_writewith the IDs created, and nothing is deleted automatically.
History
Section titled “History”Label and value edits can be undone from History, with a conflict check. An undo whose Pod fields changed since answers schema_changed, even with force. Creating a Pod or a record is recorded as irreversible with the created IDs: removing them automatically could take later content with it, so remove them in Pods if needed.
