GenerateBlocks ability reference
Reference for the GoBuildWP Pro 1.12.4 source. Installed schemas and policy remain authoritative.
This GenerateBlocks ability reference covers a module that reads the GenerateBlocks block library as it is registered on the site and returns exact attributes for each block. It never reads or writes a post's blocks; that is the job of the block-editor abilities in GoBuildWP Free.
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 GenerateBlocks needs before these load
GenerateBlocks itself must be active, and the module has no version floor of its own. GenerateBlocks Pro is optional: the setup call reports it separately, because Pro registers its blocks under a second namespace, generateblocks-pro/*, next to the free generateblocks/* one. Pro also ships an agent skill, generateblocks-build-page, that walks an agent through composing a page with these blocks.
- GenerateBlocks editions
- free, pro
- Agent skills shipped
generateblocks-build-page
Free blocks, Pro blocks and how to tell
Because the two plugins use separate namespaces, the family of every block is known from its name alone. GenerateBlocks Pro adds tabs, accordion, carousel, navigation and site-header blocks, and dynamic-data attributes on the free blocks. generateblocks-check-setup returns both plugins' versions and the count of blocks in each namespace; if the free plugin is inactive it tells the agent to stop, since none of the other calls would return anything useful.
generateblocks-list-blocks is deliberately lean: name, title, family, category, whether the block is dynamic, how many attributes it has, and its parent and ancestor hints. Filter it with family="pro" to see only Pro blocks, or name_contains to narrow to one family such as tabs.
Schemas and nesting
generateblocks-get-block-schema takes a full block name such as generateblocks/element and returns the attributes straight from the registered block type, with types, defaults and enum values, plus parent and ancestor constraints and the context keys the block reads. A name that is not registered, or sits outside the two GenerateBlocks namespaces, returns generateblocks_not_found. Nesting matters more than it looks: an accordion toggle outside an accordion item still renders, but its interactive behaviour breaks.
Before accepting the result
Keep the logged-in finalizer tab open, enable the batch and poll gutenberg-get-pending-batch to a terminal state. Inspect the native editor and public accordion interaction. GenerateBlocks per-post stylesheet regeneration is separate from browser serialization.
Example GenerateBlocks input: wppilot/generateblocks-get-block-schema
This one operation declares the 1 top-level input parameters below in wppilot-pro/includes/wppilot-abilities/wppilot-generateblocks/wppilot-get-block-schema.php; name is required. Other calls in this module take different arguments. Nested schemas and constraints are not expanded here; the complete live schema a connected client discovers is authoritative.
| Parameter | Type and meaning |
|---|---|
namerequired | string. Full block name, e.g. "generateblocks/element" or "generateblocks-pro/accordion-toggle". Must be in the `generateblocks/*` or `generateblocks-pro/*` namespace. |
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.
Build a Pro accordion into an existing post.
- 01
wppilot/generateblocks-check-setupConfirms pro_active is true before any Pro block is planned. - 02
wppilot/generateblocks-list-blocksFiltered to the accordion family, to see which blocks must nest inside which. - 03
wppilot/generateblocks-get-block-schemaCalled once per block in the accordion, so every attribute in the block spec exists. - 04
wppilot/gutenberg-add-pending-changeQueues the accordion in a pending batch through GoBuildWP Free's block pipeline, which finalises it in the block editor.
GenerateBlocks reads
| Ability | What it does |
|---|---|
wppilot/generateblocks-check-setupCheck GenerateBlocks Setup | Reports the presence + version of GenerateBlocks (free) and GenerateBlocks Pro, plus the count of blocks registered under each namespace. This integration is an introspection layer ONLY - it does NOT read or write post_content. To read or write block trees on a post, use the wppilot/gutenberg-* abilities exposed by the base GoBuildWP plugin (gutenberg-get-content, gutenberg-add-pending-change, gutenberg-enable-batch-finalization, …). Use this check-setup at the start of any session that will compose GenerateBlocks block_spec payloads before submitting them via gutenberg-add-pending-change. |
wppilot/generateblocks-get-block-schemaGet GenerateBlocks Block Schema | Returns the full attribute schema, nesting constraints, and supports map for a single GenerateBlocks-family block. Attributes come straight from WP_Block_Type::$attributes - each key carries type, default, enum when relevant, and any other JSON Schema fields the block author declared. parent / ancestor are nesting constraints (the block can only live inside one of these). uses_context lists the block-context keys this block reads from its ancestors (e.g. a loop-item reads the query context). Pair this with generateblocks-list-blocks (catalogue lookup) and wppilot/gutenberg-add-pending-change (write path). |
wppilot/generateblocks-list-blocksList GenerateBlocks Blocks | Lists every block currently registered in the generateblocks/* (free) or generateblocks-pro/* (Pro) namespace as a compact catalogue: name, title, family, category, is_dynamic, attribute count, and parent/ancestor nesting hints. Use this to browse the available blocks before calling generateblocks-get-block-schema for the full attribute schema of a specific block. Output is deliberately lean (no attribute schemas) - call get-block-schema only on the block you intend to author. |
For the task-level view of GenerateBlocks, with worked requests and what to check afterwards, see GenerateBlocks integration page.