[wp-trac] [WordPress Trac] #60769: Block Hooks: Consolidate approach to get the list of hooked blocks.

WordPress Trac noreply at wordpress.org
Tue May 21 19:00:32 UTC 2024


#60769: Block Hooks: Consolidate approach to get the list of hooked blocks.
---------------------------+------------------------------
 Reporter:  tomjcafferkey  |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  General        |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:
---------------------------+------------------------------

Comment (by Bernhard Reiter):

 Replying to [comment:3 tomjcafferkey]:
 > We may also need to revisit the visitor functions and the callbacks they
 return since they all pass down `$hooked_blocks` which won't be necessary
 any longer if a new helper function will handle getting this value inside
 `insert_hooked_blocks` and `set_ignored_hooked_blocks_metadata`
 internally.

 Ah, good point! I think we can do that.

 > I think modifying the visitor functions to accommodate a new helper
 function might be a better option since they're marked as `@private` and
 `get_hooked_blocks()` isn't.

 Agree.

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


More information about the wp-trac mailing list