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

WordPress Trac noreply at wordpress.org
Mon Oct 9 17:04:48 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 Bernhard Reiter):

 The best way I can think of to fix this would involve an entirely new
 endpoint (e.g. `block-hooks` or `hooked-blocks`) that receives pretty much
 the same information as the `hooked_block_types` filter.

 I.e. something like


 {{{
 /hooked-blocks/core/navigation?position=after&part=header
 /hooked-blocks/core/comment-template?position=last-child&pattern=tt3
 /hidden-comments
 }}}

 that should return the list of blocks hooked to that specific anchor block
 and in the position given by the eponymous query arg.

 (Some creative license taken here to allow for clients to have a pragmatic
 way of specifying context, see the `part` or `pattern` query args.)

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


More information about the wp-trac mailing list