wp_get_first_block
wp_get_first_block ( $blocks, $block_name )
Parameters:- (array) blocks Array of blocks.
- (string) block_name Name of the block to find.
Returns:- (array) Found block, or empty array if none found.
Defined at: - Introduced in WordPress: 6.3.0
- Deprecated in WordPress: —
Description
Finds the first occurrence of a specific block in an array of blocks.