Extending blocks PHP API #9901
Labels
[Feature] Block API
API that allows to express the block paradigm.
[Feature] Extensibility
The ability to extend blocks or the editing experience
[Type] Enhancement
A suggestion for improvement.
Currently, we have an API for extending blocks using JS. It is ok. But we also need API on the backend to extend dynamic blocks.
For example, I have the plugin, that extends all core blocks and adds custom attribute and class in output using this filter
blocks.getSaveContent.extraProps
. Everything works fine with static blocks, but not with dynamic (for ex. Latest Posts block).Tried to change
attributes
argument inblocks.getSaveElement
filter, but also no luck.Plus my plugin adds additional attributes to the blocks using filter
blocks.registerBlockType
:p.s. all code example simplified just for demonstration. Full extensions code here - https://github.com/nk-o/ghostkit/blob/master/src/blocks/_extend/styles.jsx#L138-L9999
The text was updated successfully, but these errors were encountered: