Pro module23 abilities

GeneratePress ability reference

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

This GeneratePress ability reference lists every call GoBuildWP Pro registers for GeneratePress settings, Elements, fonts and Site Library, with the exact slug an agent sends and what the plugin's own contract says it does. Of the 23, 14 read, 0 write and 9 are marked destructive in the source.

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

These 23 abilities come with GoBuildWP Pro 1.12.4. Pro registration requires the Freemius SDK to permit premium code and any companion dependency the module checks to be available. The floors below apply to the named dependencies or features; an optional add-on or newer feature floor does not necessarily disable the base module. wppilot/integration-health and the module's setup call describe the installed availability.

Minimum (theme)
3.0.0 WPPILOT_PRO_GP_THEME_MIN_VERSION
Minimum (premium)
2.0.0 WPPILOT_PRO_GP_PREMIUM_MIN_VERSION
GeneratePress editions
free, premium
Agent skills shipped
generatepress-build-page

Before accepting the result

For generatepress-create-element, pass status=draft explicitly. The default is publish. Review valid condition keys and add the intended conditions while draft, then approve publication. Basic theme settings and the GP Premium Elements, Library and Font features have separate setup gates.

Safety profiles and human confirmation

GeneratePress reads

AbilityWhat it does
wppilot/generatepress-check-setupCheck GeneratePress SetupDiagnostic snapshot of the GeneratePress install: theme active flag + version + minimum supported, GP Premium presence + version, the activation flag for every Premium module the integration cares about (elements, site_library, font_library, backgrounds, blog, colors, typography, spacing, copyright, disable_elements, menu_plus, secondary_nav, woocommerce), and the GenerateBlocks (free + Pro) presence + version. Call once at the start of any session that will read or write theme settings, Elements, or build page content. Lean by design - does NOT echo the settings or hook list back; use code-snippets-style drill-down (generatepress-get-settings, generatepress-list-hooks).
wppilot/generatepress-get-css-outputGet GeneratePress Dynamic CSSReturns the CSS strings GeneratePress builds at runtime from generate_settings and (when active) the Font Library. Useful for debugging why a style choice is not landing on the front-end. Five streams: base (theme container / colour variables - generate_base_css), typography (font-family / size / weight rules - generate_typography_default_styles), spacing (container / element spacing - generate_spacing_css), advanced (top bar / secondary nav / mobile menu - generate_advanced_css), and font_library (the dynamic @font-face rules from GP Premium's Font Library, empty string when the module is off). The combined output mirrors the inline <style id="generate-style-inline-css"> block on the front-end, minus the small generate_no_cache_dynamic_css fragment that GP injects at enqueue time.
wppilot/generatepress-get-customizer-schemaGet Customizer Schema (GeneratePress)Returns the GeneratePress + GP Premium sections + controls registered in the WordPress Customizer. Each section is {id, title, panel, priority} and each control is {id, setting, label, type, choices, section, priority}. Reference for generatepress-set-settings - the setting field of each control is the key you would pass inside the settings patch (controls bound to generate_settings[<key>] map to the simple <key> form set-settings accepts). Use scope=gp_only (default) to keep the response to GeneratePress-owned entries (theme + Premium), scope=all to include core WP and other plugins.
wppilot/generatepress-get-defaultsGet GeneratePress DefaultsReturns the four default sets that compose GeneratePress's known settings surface: settings (layout / structural - generate_get_defaults), colors (palette - generate_get_color_defaults), typography (font stack - generate_get_default_fonts), spacing (padding / margins - generate_spacing_get_defaults). Use as a schema reference before calling generatepress-set-settings - the value type per key follows the default value's type (int / string / bool / array).
wppilot/generatepress-get-elementGet GeneratePress ElementReads a single gp_elements post by id with every meta key the integration cares about decoded into a flat object: id, title, status, type, block_type, content, hook (+ custom_hook if hook="custom"), priority, execute_shortcodes, disable_site_header / _footer, display_conditions, exclude_conditions, user_conditions. The _generate_hook_execute_php meta is INTENTIONALLY OMITTED - exposing arbitrary PHP execution to AI agents is a code-injection vector we never want; a human site-owner sets it via the metabox UI. Returns WP_Error when the id does not exist or points at a non-gp_elements post.
wppilot/generatepress-get-layoutGet GeneratePress LayoutResolves the layout decisions GeneratePress would make for the current request context (or for a specific post if post_id is passed). Returns sidebar layout, navigation location, footer-widgets count, and the flexbox-engine flag. Use this when reasoning about where to place hook elements or block elements - the values reflect the cascade of theme settings + per-post overrides + filters, which is hard to compute by hand. Read-only - does NOT mutate state even when post_id is supplied.
wppilot/generatepress-get-settingsGet GeneratePress SettingsReads keys from the generate_settings option array (e.g. container_width, layout_setting, header_layout_setting, primary_nav_position_setting, colors, fonts). Use keys to pull only what you need - leaving it empty returns the FULL set (heavy: ~80 keys on a default install, more with Premium modules). Reads go through the theme's canonical accessor generate_get_option() so defaults + the generate_option filter are applied - never reads get_option('generate_settings') raw. To see what keys exist without reading values, call generatepress-get-defaults.
wppilot/generatepress-get-siteGet GeneratePress Site Library TemplateReturns the full record for a single starter template plus a probe of which remote assets (options.json, content.xml, widgets.wie) are present at the template directory. The asset-presence flags tell you which steps generatepress-apply-site can actually run - for example, a template without widgets.wie will silently skip the widgets step. Use the plugins map to know what activate_plugins would attempt before running an apply with steps=["plugins"].
wppilot/generatepress-list-element-conditionsList GeneratePress Element ConditionsReturns the catalogue of conditions a GP Premium Element can use to scope visibility. Two buckets: display_exclude (used by both display_conditions and exclude_conditions on an element - same vocabulary) and user (used by user_conditions). Each entry is a {group, label, locations: {<rule-key>: <label>}} row sourced from GeneratePress_Conditions::get_conditions() and ::get_user_conditions() - the same classes the admin UI uses. Pass this catalogue to the agent before composing a payload for generatepress-set-element-conditions so the rule values it picks exist.
wppilot/generatepress-list-elementsList GeneratePress ElementsLists gp_elements posts (Hook Elements + Block Elements + headers + layouts) as a compact summary per element - id, title, status, type, block_type, hook, priority, modified, and per-bucket conditions counts. The content body is intentionally omitted (can be long raw HTML / shortcode) - drill down via generatepress-get-element for a specific id. Filters compose: type, block_type, status, hook, limit.
wppilot/generatepress-list-fontsList GeneratePress FontsLists the fonts the GP Premium Font Library has bundled (Google Fonts downloaded locally + custom uploads). Each row carries {id, name, slug, fontFamily, alias, variants, source, fallback, fontDisplay, preview, cssVariable, disabled}. Notable: cssVariable is the CSS custom-property name (e.g. --gp-font--inter) you reference in generate_settings.font_body / font_headings; disabled=true means the post is not in publish status; source may be "" when GP Premium did not record a provenance (most Google downloads in 2.5.x leave it blank - fall back to per-variant source inside variants to know if a row came from Google CDN vs custom upload).
wppilot/generatepress-list-hooksList GeneratePress HooksLists the GeneratePress action hooks available as injection points for Hook Elements (Group B). When GP Premium Elements is active the catalogue comes from GeneratePress_Elements_Helper::get_available_hooks() - the same list the admin UI uses, grouped by area (header, navigation, content, footer, woocommerce, …). When Elements is not active the response falls back to a small set of the core theme hooks an agent might still find useful as a reference. Use group to narrow the response.
wppilot/generatepress-list-modulesList GP Premium ModulesReports every GP Premium module known to the integration (Backgrounds, Blog, Colors, Copyright, Disable Elements, Elements, Hooks, Menu Plus, Page Header, Secondary Nav, Sections, Spacing, Typography, WooCommerce, Site Library, Font Library - 16 total in GP Premium 2.5.x). Each row contains {slug, label, active, source} - source explains WHY the module is active: option (the generate_package_<name> option equals "activated"), constant (the GENERATE_<NAME> constant is defined in wp-config or mu-plugin), or none (inactive). Use this when generatepress-check-setup's gp_premium.modules map is too terse - list-modules gives the per-module signal source.
wppilot/generatepress-list-sitesList GeneratePress Site Library TemplatesReturns the catalogue of starter templates the GP Premium Site Library can install. The list is cached in the generatepress_sites option (1-day TTL); pass refresh=true to force a fresh fetch from gpsites.co (network call). Each row is a compact summary - name, category, description, page_builder, preview_url, min_theme_version, plugins map, directory (the remote asset root used by generatepress-apply-site). Use generatepress-get-site to inspect a specific template before applying.

Destructive GeneratePress calls

AbilityWhat it does
wppilot/generatepress-add-fontAdd Google Font to GeneratePress LibraryDownloads a Google Font into the local GP Premium Font Library and creates the matching gp_font post. Side effects: woff2/woff files written under wp-content/uploads/generatepress/fonts/<slug>/, post created with the variants meta filled in, fonts.css regenerated. Idempotent on family - calling twice with the same family + variants tops up missing variants but does not duplicate the post. Use generatepress-list-fonts after to confirm the cssVariable assigned. Each variant string follows the Google Fonts notation (400, 400italic, 700, 700italic).
wppilot/generatepress-apply-siteApply GeneratePress Site Library TemplateDESTRUCTIVE - overwrites Customizer settings, imports posts/pages/media, sets element locations, and (optionally) installs/activates plugins from a Site Library starter template. Steps run in fixed order: theme_options → plugins → content → site_options → widgets. The default step list excludes plugins because plugin installation is the riskiest path; pass steps=["theme_options","plugins","content","site_options","widgets"] to opt in. confirm=true is required - the call returns a gp_confirmation_required WP_Error otherwise. Use generatepress-get-site first to know which assets are present (a step whose asset is missing fails fast and is recorded under steps_failed). Rollback is partial: generatepress-restore-site replays GP Premium's own Site Library backup (Customizer settings, theme mods and active modules; posts and terms the last apply imported). Plugins the apply installed or activated stay, and the change ledger cannot undo either call.
wppilot/generatepress-create-elementCreate GeneratePress ElementCreates a new gp_elements post. Required inputs depend on type: every element needs title + type; when type=block, block_type is required; when type=hook (or type=block with block_type=hook), hook is required (or hook="custom" plus custom_hook for a non-registered action). content is treated as a raw string (HTML / shortcode / Gutenberg block-serialised markup); the integration does NOT parse it. The _generate_hook_execute_php flag is permanently blocked - agents do not write arbitrary PHP via this ability. New elements default to status=publish. Use generatepress-list-hooks before this call so the hook value is valid.
wppilot/generatepress-delete-elementDelete GeneratePress ElementRemoves a gp_elements post. Default behaviour: send it to the trash (recoverable from the WP admin trash bin). Pass force=true to hard-delete (irrecoverable via the abilities). Use the trash-then-restore flow whenever possible - the user can recover the element from /wp-admin/edit.php?post_type=gp_elements&post_status=trash without a database backup. Returns WP_Error when the id is not a gp_elements post.
wppilot/generatepress-delete-fontDelete GeneratePress FontPermanently removes a font from the GP Premium Font Library. Hard delete - the gp_font post is force-deleted, the per-font upload directory (wp-content/uploads/generatepress/fonts/<slug>/) is recursively wiped, and the bundled fonts.css is regenerated. No trash flow exists for this CPT - there is no undo. Before calling, run generatepress-list-fonts to confirm the id, and check that generate_settings.font_body / font_headings do not reference the font being removed (the front-end will silently fall back to a system font otherwise).
wppilot/generatepress-edit-elementEdit GeneratePress ElementPatches an existing gp_elements post. Merge semantics: only the keys you pass are updated, omitted keys keep their current value. When changing type (or moving type=block between block_type values), pass both fields together - the integration validates the resulting combination. Conditions (display / exclude / user) are NOT touched by this ability; use generatepress-set-element-conditions for those. The _generate_hook_execute_php flag is permanently blocked. Returns WP_Error when the id does not point at a gp_elements post.
wppilot/generatepress-restore-siteRestore GeneratePress Site Library BackupUndo for generatepress-apply-site. GP Premium snapshots theme_options (Customizer settings + theme mods + active modules) and content (post / term ids imported during an apply) into a single _generatepress_site_library_backup option at apply time. This ability dispatches the matching REST restore endpoint(s): target=theme_options reverts Customizer / theme_mods / module activation (backup option preserved - safe to re-run); target=content deletes the posts and terms imported by the last apply AND removes the backup option (single-use - a second call returns gp_no_backup); target=all (default) runs both, leaving no backup. confirm=true is required. Returns gp_no_backup WP_Error when no apply has run yet or the backup was already consumed.
wppilot/generatepress-set-element-conditionsSet GeneratePress Element ConditionsWrites the display / exclude / user conditions onto an existing gp_elements post. Each condition is {rule: "<group>:<key>", object?: "<id-or-empty>"} - the storage shape the plugin's metabox uses (class-metabox.php:1900-1935). Pass the buckets you want to update; omitted buckets keep their current value. Pass [] (empty array) to clear a bucket. Always validate rule values against the catalogue from generatepress-list-element-conditions first - bad rules are stored as-is and silently never match.
wppilot/generatepress-set-settingsSet GeneratePress SettingsPatches the generate_settings option array - merge semantics, only the keys present in settings are touched, omitted keys keep their current value. Keys unknown to generate_get_defaults() (and the color / font / spacing default sets) are written anyway but surface in the warnings field of the response - this preserves the ability to set keys added by GP Premium modules or child themes (via the generate_option_defaults filter) that an agent might not see in the static defaults reference. The write is destructive (overwrites prior values for the listed keys); pair with generatepress-get-settings to read existing values before patching.

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