Block themes ability reference
Reference for the GoBuildWP Free 1.18.6 source. Installed schemas and policy remain authoritative.
This block themes ability reference covers the Site Editor's objects: global styles, templates, template parts, patterns and block navigation. Calls use WordPress REST controllers in-process, so WordPress still validates input and enforces the connected user's permissions.
Read-only, write and destructive groups describe the source annotations. They do not establish a minimum safety profile, human approval or undo support. Those controls are separate: check the installed ability, the connected user and the active site policy before calling it. A read can still return sensitive data. These pages are not evidence that every operation passed an end-to-end runtime test.
What Block themes needs before these load
Included in GoBuildWP Free; no GoBuildWP Pro licence is needed. Template operations need an active block theme and WordPress's Site Editor controllers. Templates, navigation and global styles require edit_theme_options; pattern operations require edit_posts.
Read the complete object before replacing markup
Read a template before updating it: content is the complete block markup, not an incremental patch. The first edit to a theme-file template creates a database customization and leaves the theme file unchanged. Markup must parse into blocks and remain within the operation's size limit.
Shared objects affect multiple pages
A synced pattern changes every page that uses it. A navigation menu or global style can have similarly broad effects. Preview the affected pages at multiple widths and inspect the actual WordPress editor after writing.
Reverting a template deletes its customization and requires confirmation; it is refused when there is no theme file to restore. Recorded undo uses the appropriate strategy for an existing object or a newly created customization. Verify the restored result rather than assuming every external effect is reversible.
Representative call sequence
This sequence describes the documented calls and checks to perform. It is not a recorded result from an installed WordPress site. Inspect returned errors and partial results, then verify the saved values and affected output before proceeding.
Adjust a block theme's archive layout.
- 01
wppilot/list-templatesFind the active template and whether it already has a customization. - 02
wppilot/get-templateRead and preserve its current complete block markup. - 03
wppilot/update-templateSave the edited markup, then inspect the archive and its editor representation.
Block themes reads
| Ability | What it does |
|---|---|
wppilot/get-global-stylesGet Global Styles | Reads the site's Global Styles (Appearance → Editor → Styles) for the active theme: the user layer the site editor saves - settings (colour palettes, font families, sizes, spacing) and styles (colours, typography, spacing for the site, elements and blocks) - plus the theme's own palette and font families for reference. Change them with wppilot/update-global-styles. Works with block themes and classic themes that support theme.json. |
wppilot/get-templateGet Template | Reads one template or template part: its block markup, title, and whether it is customised or still the theme file's. |
wppilot/list-navigation-menusList Navigation Menus | Lists the block theme navigation menus (the Navigation block's menus, Appearance → Editor → Navigation) with their block markup: navigation-link and navigation-submenu blocks. Classic menus (Appearance → Menus) are a different thing; use the menu abilities for those. |
wppilot/list-patternsList Patterns | Lists the site's own patterns (Appearance → Editor → Patterns; synced patterns update everywhere they are used, unsynced ones are copied in) with their content when include_content is true, and the names of the patterns the theme and plugins register, which can be inserted with <!-- wp:pattern {"slug":"..."} /-->. |
wppilot/list-templatesList Templates | Lists the active block theme's templates (type wp_template: home, single, page, archive, 404...) or template parts (type wp_template_part: header, footer...), with whether each has been customised in the site editor (source "custom") or still comes from the theme file. Read one with wppilot/get-template. |
Block themes writes
| Ability | What it does |
|---|---|
wppilot/create-patternCreate Pattern | Saves block markup as a pattern of the site's own. synced (default true) makes a synced pattern: inserting it places a reference, and editing it later updates every place it is used. synced false makes a plain pattern that is copied in. Undo removes the pattern. |
wppilot/update-global-stylesUpdate Global Styles | Changes the site's Global Styles, the way the site editor's Styles panel does. settings and styles are theme.json objects (version 3), for example styles: {color: {background: "#fff"}, elements: {link: {color: {text: "var(--wp--preset--color--accent)"}}}} or settings: {color: {palette: [{slug, name, color}]}}. By default they are merged into what is saved now: keys you send replace or add, null removes a key, lists such as palettes are replaced whole. merge: false replaces the user layer outright. WordPress validates and sanitises the result; keys it does not accept are dropped and reported. Can be undone from the change log. |
wppilot/update-navigation-menuUpdate Navigation Menu | Saves new block markup for a block navigation menu, for example adding <!-- wp:navigation-link {"label":"Contact","url":"/contact/","kind":"custom"} /-->. content is the menu's complete markup: read it first with wppilot/list-navigation-menus. Every Navigation block that uses this menu changes. Can be undone from the change log. |
wppilot/update-patternUpdate Pattern | Changes one of the site's own patterns: its title, its block markup, or both. For a synced pattern this changes every page that uses it. Can be undone from the change log. |
wppilot/update-templateUpdate Template | Saves new block markup for a template or template part, as the site editor does. A theme-file template gets its customised copy on the first save; the theme file itself is never changed, and wppilot/revert-template goes back to it. content is the complete markup of the template (read it first with wppilot/get-template and change what is needed). WordPress filters the HTML for users who may not post unfiltered HTML. Can be undone from the change log. |
Destructive Block themes calls
| Ability | What it does |
|---|---|
wppilot/revert-templateRevert Template | Throws away the site editor customisation of a template or template part and goes back to the theme file's version, like "Reset" in the site editor. Only for templates that have a theme file (has_theme_file). Destructive: needs confirm. The customised version is kept in the change log, so it can be put back. |
For the task-level view of Block themes, with worked requests and what to check afterwards, see WordPress Block Themes integration page.