[wp-trac] [WordPress Trac] #59385: Blocks: Implement `insert_hooked_block(s)`

WordPress Trac noreply at wordpress.org
Tue Sep 19 12:03:03 UTC 2023


#59385: Blocks: Implement `insert_hooked_block(s)`
-----------------------------+------------------------------
 Reporter:  Bernhard Reiter  |       Owner:  Bernhard Reiter
     Type:  defect (bug)     |      Status:  assigned
 Priority:  normal           |   Milestone:  6.4
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------
Description changed by Bernhard Reiter:

Old description:

> For #59313, we need to implement a function to insert a given hooked
> block into a location specified by an anchor block and a relative
> position (tentatively called `insert_hooked_block`), and another one to
> insert all registered hooked blocks for a given anchor block (tentatively
> called `insert_hooked_blocks`).
>
> We will then use the latter in combination with `serialize_blocks`' new
> callback argument (see #59327) to implement automatic insertion of hooked
> blocks into block templates and patterns.

New description:

 For #59313, we need to implement functions to insert a given parsed block
 into another parsed block's inner blocks, and to prepend and prepend to
 that array, respectively.

 We will use those functions in combination with
 `traverse_and_serialize_blocks`' (see #59327) to implement automatic
 insertion of hooked blocks into block templates and patterns.

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59385#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list