[wp-trac] [WordPress Trac] #48104: Add the gutenberg_provide_render_callback_with_block_object shim to core
WordPress Trac
noreply at wordpress.org
Tue Sep 24 23:30:53 UTC 2019
#48104: Add the gutenberg_provide_render_callback_with_block_object shim to core
-------------------------------------------------+-------------------------
Reporter: andraganescu | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.4
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing needs-dev- | Focuses:
note needs-docs |
-------------------------------------------------+-------------------------
Comment (by noisysocks):
[attachment:"48104.diff"] looks good to me. I wonder, though, if we should
move away from giving third parties the raw block array and instead create
a `WP_Block` class to encapsulate that data. This would make the API nicer
(e.g. `$block->attributes` instead of `$block['attrs']`), and would help
developers avoid nasty surprises like default block attributes not being
set. We could consider updating `parse_blocks()` to also return
`WP_Block`.
What do you think?
At any rate, since this isn't needed for 5.3, let's punt on this for now
and focus on landing it when trunk opens for 5.4.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48104#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list