-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The Problem
There is a Gutenberg\BlockInterface
, and a common way of creating one seems to be by using a map returned by parse_blocks()
. Unfortunately, there's nothing right now that could allow the creation of a block from such a map. There's no way at all to abstract block initialization.
Suggested Solution
- Add a
BlockFactoryInterface
that would accept the key parameters for blocks separately and with proper type declarations. - Add a
ConfigBasedBlockFactoryInterface
that would accept anarray
map of values from one of the items ofparse_blocks()
. This allows easy creation from configuration, based on WP config key conventions.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request