[wp-trac] [WordPress Trac] #59313: Implement Block Hooks
WordPress Trac
noreply at wordpress.org
Tue Sep 26 08:07:23 UTC 2023
#59313: Implement Block Hooks
-------------------------------------------------+-------------------------
Reporter: Bernhard Reiter | Owner: Bernhard
| Reiter
Type: enhancement | Status: closed
Priority: high | Milestone: 6.4
Component: Editor | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch gutenberg-merge has-unit- | Focuses:
tests commit |
-------------------------------------------------+-------------------------
Comment (by gziolo):
In [changeset:"56701" 56701]:
{{{
#!CommitTicketReference repository="" revision="56701"
Blocks: Add more unit test covering edge cases for Block Hooks
These two new unit tests document how Block Hooks behave with
`first_child` and `last_child` relative positions. The hooked blocks will
only get inserted in the case where the parent block has at least one
child block present. While it seems like a limitation, in practice, it's
hard to think of a case where the template would use a parent block
without its children. It's more likely to happen with patterns in general,
but in the case of patterns wired with the block theme, it also seems
unlikely. The reasoning here is that out of the box, the block theme
should produce a fully functional and valid HTML.
Props ockham.
See #59313.
Follow-up [56649].
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59313#comment:99>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list