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