[wp-trac] [WordPress Trac] #59383: Blocks: Introduce helper function to retrieve hooked blocks
WordPress Trac
noreply at wordpress.org
Tue Oct 3 08:28:08 UTC 2023
#59383: Blocks: Introduce helper function to retrieve hooked blocks
-------------------------------------------------+-------------------------
Reporter: gziolo | Owner: gziolo
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.4
Component: Themes | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests needs-dev- | Focuses:
note gutenberg-merge |
-------------------------------------------------+-------------------------
Comment (by gziolo):
In [changeset:"56759" 56759]:
{{{
#!CommitTicketReference repository="" revision="56759"
Tests: Cover Block Hooks integration with a custom block theme
Adds a simplified version of Twenty Twenty-Three theme that helps testing
Block Hooks integration. The theme contains:
- The required index.html template.
- The optional single.html template used with tests.
- 3 template parts where two of them reference patterns.
- 3 patterns referenced in the templates and the template parts.
New tests automatically register 4 custom blocks with the test theme where
each of them hooks into another block using all four target relative
positions: `before`, `after`, `firstChild`, `lastChild`.
The tests verify that the block gets hooked into the correct positions
when targeting:
- template
- template part
- pattern
Props ockham, costdev.
See #59313, #59383.
Follow-up [56610].
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59383#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list