GeneratePress AI is here - Read the release post

Learn GeneratePress

Forms: rendering and stored submissions (Pro)

Hooks for the HTML attributes a form control can have and for how long the form keeps stored submissions. For what happens when a form is submitted, see Forms: processing and validation. Jump to Form controls generateblocks_form_control_html_attributes GB Pro — since GenerateBlocks 2.6. The generateblocks_form_control_html_attributes filter changes which custom HTML attributes a Form Field Control … Read more

Global styles and design tokens (Pro)

Hooks for Global Styles and Design Tokens, and for the style builder that edits block styles. Global Styles are reusable classes with their own CSS, and Design Tokens are the CSS variables of a design system. Both are GenerateBlocks Pro features. The style builder hooks near the end are in the free plugin and apply … Read more

Overlays, menus and accordion (Pro)

Hooks for Overlay Panels (pop-ups, modals and mega menus), the Classic Menu block and the accordion’s FAQ schema. They are all GenerateBlocks Pro features. Jump to Overlay Panels generateblocks_overlays_capability GB Pro — since GenerateBlocks 2.4. The generateblocks_overlays_capability filter sets the capability needed to use or manage Overlay Panels. Parameters: $capability (string, the capability required), $context … Read more

Pattern library

Hooks for the pattern library, the panel in the block editor where you browse and insert patterns from GenerateBlocks libraries, your own libraries and local patterns. GenerateBlocks Pro adds local pattern collections, global styles and forms to the library. Jump to Libraries and access generateblocks_pattern_libraries GB Free — GenerateBlocks Pro uses it to add its … Read more

Query and Looper

Hooks for the Query block, which builds the list of items, and the Looper block, which repeats its Loop Item block for each of them. Use the first group to change the standard post query, and the second to add a query type of your own, such as items from an API or a custom … Read more

Registering conditions (Pro)

Conditions decide whether a block, menu item or overlay panel is shown. GenerateBlocks Pro ships types such as location, user role and device. You can add your own type with a class that tells GenerateBlocks which rules and operators it offers and how to evaluate them. To hook into the existing types, see Conditions: registering … Read more

Dynamic tags: output and rendering

Hooks for changing what a dynamic tag outputs, which blocks and HTML can use tags, and how tags are previewed in the editor. To register your own tag, see Registering dynamic tags. For who can use dynamic tags and how meta is read, see Dynamic tags: meta access and security. Jump to Changing a tag’s … Read more

Registering form actions (Pro)

A form action is what a Form block does with a submission once it has been sanitized and validated, such as sending an email or posting to a webhook. GenerateBlocks Pro registers four actions: email, email-signup, webhook and confirmation-email. You can register your own with GenerateBlocks_Pro_Form_Action_Registry. For the hooks around form processing, see Forms: processing … Read more

Editor: inspector controls and panels

JavaScript hooks for adding to or changing the controls in the block editor: the block inspector, the style panels, individual controls and presets, and the GenerateBlocks editor sidebar. These are wp.hooks filters and actions. Add them with wp.hooks.addFilter() or wp.hooks.addAction() in a script that loads in the block editor, after wp-hooks and the GenerateBlocks editor … Read more

Registering form integrations (Pro)

A form integration adds a service to the form editor, such as an email marketing list or a webhook. GenerateBlocks Pro includes Mailchimp, ActiveCampaign, Brevo, ConvertKit, MailerLite and a webhook. You can add your own with generateblocks_pro_register_form_integration(). For the hooks around integrations, see Forms: email, webhooks and integrations. To run your own code on a … Read more