WP_Block_List::offsetExists( int $offset ): bool

In this article

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

Parameters

$offsetintrequired
Offset of block to check for.

Return

bool Whether block exists.

Source

#[ReturnTypeWillChange]
public function offsetExists( $offset ) {
	return isset( $this->blocks[ $offset ] );
}

Changelog

VersionDescription
5.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.