[wp-trac] [WordPress Trac] #61902: Block Hooks: `"multiple": false` not respected
WordPress Trac
noreply at wordpress.org
Fri Sep 27 09:19:01 UTC 2024
#61902: Block Hooks: `"multiple": false` not respected
--------------------------------------+------------------------------
Reporter: Bernhard Reiter | Owner: Bernhard Reiter
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.7
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Comment (by Bernhard Reiter):
In [changeset:"59101" 59101]:
{{{
#!CommitTicketReference repository="" revision="59101"
Block Hooks: `apply_block_hooks_to_content` in Patterns, Templates.
In the Patterns registry, use `apply_block_hooks_to_content` (introduced
in [58291]) instead of the `WP_Block_Patterns_Registry` class's private
`get_content` method. (The latter is removed as part of this changeset.)
In a similar vein, use `apply_block_hooks_to_content` in the
`_build_block_template_result_from_file` and
`_build_block_template_result_from_post` functions, respectively.
For that to work, `apply_block_hooks_to_content` is amended to inject the
`theme` attribute into Template Part blocks, even if no hooked blocks are
present.
This kind of centralization is required as a preparation for #61902.
Props bernhard-reiter, jonsurrell.
See #61902.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61902#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list