WordPress at a glance
function is not described

WP_Block_List::offsetExists() public WP 5.5.0

Returns true if a block exists by the specified block index, or false otherwise.

{} It's a method of the class: WP_Block_List{}

No Hooks.

Return

true/false. Whether block exists.

Usage

$WP_Block_List = new WP_Block_List();
$WP_Block_List->offsetExists( $index );
$index(string) (required)
Index of block to check.

Changelog

Since 5.5.0 Introduced.

Code of WP_Block_List::offsetExists() WP 5.5.1

<?php
public function offsetExists( $index ) {
	return isset( $this->blocks[ $index ] );
}