Inventory_Presser_Admin_Photo_Arranger::inner_blocks_contains_id( mixed $block, mixed $id )

inner_blocks_contains_id


Parameters

$block

(mixed) (Required) A core/gallery block output by parse_blocks().

$id

(mixed) (Required) The attachment ID to search for.


Return

(bool)


Source

File: includes/admin/class-admin-photo-arranger.php

	protected function inner_blocks_contains_id( $block, $id ) {
		if ( empty( $block['innerBlocks'] ) ) {
			return false;
		}
		foreach ( $block['innerBlocks'] as $inner_block ) {
			if ( empty( $inner_block['attrs']['id'] )
				|| $id !== $inner_block['attrs']['id'] ) {
				continue;
			}
			return true;
		}
		return false;
	}