[wp-trac] [WordPress Trac] #61074: Block Hooks: Enable for post content
WordPress Trac
noreply at wordpress.org
Tue Dec 17 10:35:35 UTC 2024
#61074: Block Hooks: Enable for post content
-----------------------------+------------------------------
Reporter: Bernhard Reiter | Owner: Bernhard Reiter
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.8
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
-----------------------------+------------------------------
Changes (by Bernhard Reiter):
* owner: (none) => Bernhard Reiter
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"59523" 59523]:
{{{
#!CommitTicketReference repository="" revision="59523"
Block Hooks: Enable for post content.
Block Hooks were previously only applied to layout elements such as
templates, template parts, patterns, and navigation menus -- things that
are edited in the Site Editor.
This changeset enables Block Hooks in post content. The parity between
frontend and editor is preserved: Blocks inserted by Block Hooks are
visible both on the frontend and in the editor, and any customizations
made by the user are respected on the frontend.
This is possible thanks to setting the `metadata.ignoredHookedBlocks`
attribute on anchor blocks (a technique first introduced in [57594]). For
first child and last child insertion into a Post Content block, the
corresponding post object's `_wp_ignored_hooked_blocks` post meta is set.
Props bernhard-reiter, gziolo, jonsurrell, karolmanijak, leewillis77.
Fixes #61074.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61074#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list