Pro module9 abilities

Dynamic Shortcodes ability reference

Reference for the GoBuildWP Pro 1.12.4 source. Installed schemas and policy remain authoritative.

The Dynamic Shortcodes module lets an agent compose, lint and test shortcodes for the Dynamic Shortcodes plugin, look up the fields each shortcode type can read on this site, and manage Power Shortcodes. This Dynamic Shortcodes ability reference covers the syntax tools, live evaluation and the Power Shortcode store.

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 Dynamic Shortcodes needs before these load

Dynamic Shortcodes 1.9.0 or newer must be active; the gate needs DYNAMIC_SHORTCODES_VERSION and the DynamicShortcodes\Plugin class. Calls need manage_options. dynamic-shortcodes-check-setup reports the version, min_satisfied, the accepted shortcode types, which of ACF, WooCommerce, JetEngine, Meta Box, Pods, Toolset and ACPT the plugin detects, and which content areas resolve shortcodes. Pro ships ten agent skills for this plugin, covering syntax foundations through loops, logic and custom fields.

Minimum (base)
1.9.0 WPPILOT_PRO_DYNAMIC_SHORTCODES_MIN_VERSION
Dynamic Shortcodes editions
free, pro
Agent skills shipped
dynamic-shortcodes-integration, dynamic-shortcodes-foundations, dynamic-shortcodes-data, dynamic-shortcodes-logic, dynamic-shortcodes-loops, dynamic-shortcodes-custom, dynamic-shortcodes-custom-fields, dynamic-shortcodes-post-data, dynamic-shortcodes-request, dynamic-shortcodes-wordpress

Why evaluation counts as running code

A shortcode can do more than print a value: {set:} writes to the local environment, {call:fn} invokes a PHP function, and a Power Shortcode can do anything its author wrote. GoBuildWP Free places the dynamic-shortcodes category among its critical risks, so evaluate-shortcode and the Power Shortcode writes are withheld under the Production Safe profile and need Developer Full Access plus an explicit confirmation. Validate, compose, get-context and list stay available on Production Safe.

Evaluating with a post_id sets that post as context and then restores whatever post the caller had. A shortcode that demands the Power Shortcode context returns requires_power true with a null result instead of running.

Shortcodes that show up as literal text

Every area setting in Dynamic Shortcodes starts switched off, so a fresh install resolves shortcodes nowhere. check-setup's enabled_areas covers post title, content and excerpt, blocks, the text widget, Elementor, Bricks, Oxygen, Breakdance and WPBakery, and adds an issue when none is on. dynamic-shortcodes-get-context answers unsupported_type for a type the site does not accept.

Power Shortcodes and their undo

A name must start with a letter and use letters, digits, underscores or hyphens. Code is linted before saving and a failure returns invalid_shortcode_syntax with the lint errors, so a broken definition is never stored. Creating an existing name returns exists with the current code rather than overwriting. The plugin's storage is not public, so the ledger records these writes as irreversible; delete returns the deleted code and description, which is how an agent puts one back.

Before accepting the result

Use a bounded staging input with reviewed purpose for live evaluation. Linting does not execute the shortcode; evaluation and Power Shortcode persistence need separate authorization and privilege review.

Safety profiles and human confirmation

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.

Show an ACF field with a fallback on single posts, as a reusable Power Shortcode.

  1. 01 wppilot/dynamic-shortcodes-get-context Called with type acf, returning the real field names and result types on this site.
  2. 02 wppilot/dynamic-shortcodes-compose-shortcode Builds the shortcode with its fallback and returns it with a lint result.
  3. 03 wppilot/dynamic-shortcodes-evaluate-shortcode Runs it against one post_id after confirmation, returning the value a visitor would see.
  4. 04 wppilot/dynamic-shortcodes-create-power-shortcode Saves it under a name once the output is right.

Dynamic Shortcodes in practice

Building a Dynamic Shortcode from parts instead of by hand

wppilot/dynamic-shortcodes-compose-shortcode takes the shortcode apart into fields so the agent cannot misplace a separator. type is the shortcode type (post, acf, query and so on); args are the positional arguments, as flat strings only, so a shortcode nested inside another cannot be composed here; keyargs become the key-value arguments after the @ sign, and a key with a null value is written as a bare flag. filters are applied in the order given, each with its separator (|, |- or ||), a name and optional arguments. fallback is written after the question mark.

Two edge cases are worth knowing. A fallback of 0 or an empty string is treated as no fallback at all, so a shortcode that should fall back to the number zero has to be written by hand and checked with wppilot/dynamic-shortcodes-validate-shortcode. And a composed string that fails the lint still comes back, with valid: false and the errors, so read the flag before using it.

Elementor appears twice in enabled_areas, once for dynamic tags and once for widget text, because Dynamic Shortcodes keeps a separate switch for each. A shortcode that resolves in an Elementor dynamic tag can still print as literal text in a text widget on the same page.

Discovering real field names for a shortcode type

wppilot/dynamic-shortcodes-get-context returns 100 fields per page by default and up to 500 when asked, with total and has_more so the agent knows whether to page on. name_pattern narrows the list by a case-insensitive substring, which is the quickest way to find one ACF or WooCommerce field on a large site. A type that check-setup does not list under accepted_types returns unsupported_type; compare it with the dependency plugins check-setup detected before assuming the type exists on this site.

What an evaluated shortcode hands back to the agent

wppilot/dynamic-shortcodes-evaluate-shortcode returns the value together with a detected result_type. When the shortcode yields a WordPress object (a post, term or user) the object's full public properties come back, not just the field that was wanted. Evaluating a shortcode that returns a whole user record therefore brings far more of that account into the conversation than a page would ever print, so compose shortcodes that end in the specific field, and evaluate against test accounts on staging.

Any exception raised while evaluating is returned as evaluation_error with the plugin's own message, and the post context set by post_id is put back first. A shortcode that needs the privileged context returns requires_power: true; wrap it in a Power Shortcode and use it on the page as {power:name}.

Keeping a copy of a Power Shortcode before changing it

Power Shortcode writes cannot be rolled back through the change ledger, so the module returns what it replaced instead. wppilot/dynamic-shortcodes-edit-power-shortcode answers with the previous code and description, and the delete answers with the deleted ones; to undo either, send those values back through the edit or create call. Keep the response in the conversation until the change has been checked on the site. Both the edit and the delete answer not_found when no Power Shortcode has that name; check the exact name with wppilot/dynamic-shortcodes-list-power-shortcodes.

Questions about Dynamic Shortcodes

The shortcode evaluates correctly but prints as text on the page. Why?

The area it sits in is probably switched off in the Dynamic Shortcodes settings. Check enabled_areas in dynamic-shortcodes-check-setup and turn on the matching area, such as blocks or Elementor widgets.

Why can't my agent see evaluate-shortcode?

The site is on the Production Safe profile, which withholds critical calls. Switching to Developer Full Access makes it available, and each call still needs confirmation.

Dynamic Shortcodes reads

AbilityWhat it does
wppilot/dynamic-shortcodes-check-setupCheck Dynamic Shortcodes SetupReports the Dynamic Shortcodes environment: whether the plugin is active, the version, whether the minimum version is satisfied, the accepted shortcode types on this site, the detected dependency plugins (acf, woocommerce, jet-engine, metabox, pods, toolset, acpt), a count of saved Power Shortcodes, and enabled_areas - which content surfaces DSH actually resolves shortcodes in (post content, blocks, Elementor, Bricks, …; ALL default OFF, so a shortcode renders as literal text where its surface is off). Call BEFORE any other dynamic-shortcodes ability - the other abilities require min_satisfied=true to register.
wppilot/dynamic-shortcodes-compose-shortcodeCompose ShortcodeBuilds a syntactically correct Dynamic Shortcode string from a structured input (type, positional args, keyargs, filters, fallback) and lints it automatically. Returns {shortcode, valid, errors[]}. Use this when you want a guaranteed-shape output instead of hand-writing the string.
wppilot/dynamic-shortcodes-get-contextGet Shortcode ContextReturns the list of fields available on this site for a given Dynamic Shortcode type (e.g. "post", "acf", "user", "term", "query", "woo"). Each field carries a name and its possible result types. Use this to discover real fields instead of guessing from documentation. Paginated - pass limit/offset for paging and name_pattern for a case-insensitive substring filter; the response includes total and has_more.
wppilot/dynamic-shortcodes-list-power-shortcodesList Power ShortcodesLists every Power Shortcode defined on this site (name, code, description).
wppilot/dynamic-shortcodes-validate-shortcodeValidate ShortcodeValidates the syntax of a Dynamic Shortcode string without evaluating it. Returns {valid, errors[], shortcode}. Use this after generating or editing a shortcode and before calling evaluate-shortcode.

Dynamic Shortcodes writes

AbilityWhat it does
wppilot/dynamic-shortcodes-create-power-shortcodeCreate Power ShortcodeCreates a new Power Shortcode. The code is syntax-checked (linted) before saving: invalid Dynamic Shortcode syntax is rejected with invalid_shortcode_syntax and the specific lint errors, so a broken definition is never stored. Fails when a Power Shortcode with the same name already exists - returns {exists: true, name, current_code, current_description} so the agent can decide whether to edit it via edit-power-shortcode.
wppilot/dynamic-shortcodes-edit-power-shortcodeEdit Power ShortcodeEdits an existing Power Shortcode by name. When a new code is provided it is syntax-checked (linted) before saving: invalid Dynamic Shortcode syntax is rejected with invalid_shortcode_syntax and the specific lint errors, leaving the stored definition untouched. Returns the previous code and description so the agent can diff. Fails with not_found when no Power Shortcode matches the name.
wppilot/dynamic-shortcodes-evaluate-shortcodeEvaluate ShortcodeEvaluates a Dynamic Shortcode against the live WordPress environment and returns the real result. Optional post_id sets postdata before evaluation. If the shortcode demands the Power Shortcode privileged context, returns {requires_power: true, result: null} - the agent must then call create-power-shortcode to wrap it.

Destructive Dynamic Shortcodes calls

AbilityWhat it does
wppilot/dynamic-shortcodes-delete-power-shortcodeDelete Power ShortcodeDeletes a Power Shortcode by name. Returns the deleted code and description so the action is reversible by the agent. Returns not_found if no Power Shortcode matches.

For the task-level view of Dynamic Shortcodes, with worked requests and what to check afterwards, see Dynamic Shortcodes integration page.