Make WordPress Core

Timestamp:
09/18/2023 12:40:11 PM (22 months ago)
Author:
gziolo
Message:

Blocks: Introduce helper function to retrieve hooked blocks

In order to implement Block Hooks (see #59313), we added block_hooks field to the WP_Block_Type class, as well as to block registration related functions. In this follow-up, new helper function gets introduced that is going to compute the list of hooked blocks by other registered blocks for a given block type.

Extracted from https://github.com/WordPress/wordpress-develop/pull/5158 and covered with unit tests.

Props ockham.
Fixes #59383.

File:
1 added

Note: See TracChangeset for help on using the changeset viewer.