Petra
AI assistant for GrootMade
Hi! I'm Petra 👋 Ask me to help you find the perfect WP plugin, theme, or template kit.
forked from ACF Gutenblocks™
BentoBlocks is not affiliated with ACF Gutenblocks. The name and any related trademarks are used solely for nominative descriptive purposes.
This library provides a structured way for developers to create custom blocks for the block editor using Advanced Custom Fields (ACF). It is designed for developers who want to build complex, reusable content components while maintaining clean, object-oriented PHP code separate from their templates.
Class-based block registration defines each block as a PHP class, allowing logic and field definitions to be encapsulated in a single, organized location. Template data control uses a dedicated with() method to pass specific variables from the block controller to the frontend template, ensuring a clear separation of concerns. Flexible templating supports standard PHP templates and can be extended to work with the Blade templating engine used in Sage-based themes. ACF field integration lets you define block fields directly within the block class, either as a simple array or using the ACF Builder syntax for complex layouts. Custom filters offer hooks to modify block settings, rendering paths, and output, providing control over the block loading and display process.