Returns true if a block exists by the specified block index, or false otherwise.
(string) (Required) Index of block to check.
(bool) Whether block exists.
File: wp-includes/class-wp-block-list.php
public function offsetExists( $index ) { return isset( $this->blocks[ $index ] ); }
Version | Description |
---|---|
5.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_block_list/offsetexists