Best WordPress Hosting
 

Extending the Query Loop block

via make.wordpress.org => original post link

Extenders needed a way to present bespoke versions of the Query Loop block, with their presets, additional settings and disabled customization options when irrelevant to their use-case. With WordPress 6.1, the Query Loop block offers mighty ways to create such versions, through Block Variations.

To make WordPress recognize your variation you need to set the isActive block variation property. For providing an easy and consistent way for extenders to recognize and scope their variation a new namespace property has been introduced in Query Loop block.

Through the Query Loop block’s allowedControls property, you can control which features are presented to the user to simplify content creation.