[wp-trac] [WordPress Trac] #59574: Blocks: No toggle shown for hooked blocks added via filter

WordPress Trac noreply at wordpress.org
Tue Oct 10 07:02:32 UTC 2023


#59574: Blocks: No toggle shown for hooked blocks added via filter
-----------------------------+------------------------------
 Reporter:  Bernhard Reiter  |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by gziolo):

 One idea that comes to my mind would be to always mark hooked blocks with
 a special metadata attribute:


 {{{
 <!-- wp:tests/hooked-last-child {"metadata":{"hookedBlock":"after"}} /-->
 }}}

 This way, the block editor could learn about them even when they were
 injected using `hooked_block_types` filter. The UI in the sidebar's Plugin
 section would be mostly about removing and then adding back this block.

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


More information about the wp-trac mailing list