WP_Block_List::offsetExists() WordPress Method

The WP_Block_List::offsetExists() method is used to check if a given key exists in the list of block objects. This is useful for checking if a particular block object exists before attempting to retrieve it.

WP_Block_List::offsetExists( $index ) #

Contents


Source

File: wp-includes/class-wp-block-list.php

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

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.