Module — 17 operations

Content

Posts, pages, custom post types, blocks, terms and redirects — the operations an editor would otherwise perform by hand.

Nothing extra to install. This module runs on core WordPress alone.

Cue 2 — first light

Before you call anything here

Note 1

A trash is a trash. content-trash moves an item to the bin and declares rollback required; there is no permanent delete anywhere in the surface.

Note 2

content-blocks-get returns an outline first and one addressed block in full, so an agent reads the paragraph it is about to change rather than the whole page.

Note 3

content-links-check resolves this site’s own links against its posts and its redirect table, so a broken internal link is reported as broken rather than as a 200 from somewhere else.

Reads — 6

What it can tell you

A read still asks WordPress for a capability against the object. There is no anonymous read anywhere in the surface.

content-get

content-read

Reads one item with its fields, terms, and metadata

needs edit_posts

Read
content-list

content-read

Lists items with filtering and pagination

needs edit_posts

Read
taxonomy-list

content-read

Lists registered taxonomies and their terms

needs edit_posts

Read
content-blocks-get

content-read

Returns the block outline of one item, or one addressed block in full

needs edit_post

Read
content-links-check

content-read

Reports the links in one item, resolving this site's own against its posts and redirects

needs edit_post

Read
redirect-list

content-read

Lists every redirect this site serves, with the table's size and capacity

needs manage_options

Read
Writes — 11

What it can change

Every one of these is previewed before it runs, snapshotted before it changes anything, and verified afterwards by reading the site back. The chips are the policies the operation itself declares.

content-create

content-write

Creates a post, page, or custom post type item

needs edit_posts

medium risk rollback supported
content-update

content-write

Updates title, content, excerpt, slug

needs edit_post

medium risk rollback supported
content-status-set

content-write

Publishes, drafts, schedules, or privatises

needs edit_post

medium risk rollback supported
content-featured-media-set

content-write

Sets or clears the featured image

needs edit_post

medium risk rollback supported
content-meta-update

content-write

Writes registered post meta

needs edit_post

high risk rollback supported
content-terms-assign

content-write

Assigns categories, tags, or custom terms

needs edit_post

medium risk rollback supported
content-trash

content-write

Moves an item to trash — reversible, never a permanent delete

needs delete_post

medium risk rollback required
content-rollback-apply

content-write

Restores a previous change from its snapshot

needs edit_post

medium risk rollback supported
content-block-update

content-write

Changes the attributes or inner markup of one block

needs edit_post

medium risk rollback supported
redirect-set

content-write

Points one path at a successor URL, or marks it gone

needs manage_options

medium risk rollback supported
redirect-delete

content-write

Removes the redirect stored for one path

needs manage_options

medium risk rollback required
Cue 5 — day

Keep reading