[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Blocks API: WP_Block_List class
File Size: | 213 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Block_List:: (11 methods):
__construct()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
rewind()
current()
key()
next()
valid()
count()
Class: WP_Block_List - X-Ref
Class representing a list of block instances.__construct( $blocks, $available_context = array() X-Ref |
Constructor. Populates object properties from the provided block instance argument. since: 5.5.0 param: array[]|WP_Block[] $blocks Array of parsed block data, or block instances. param: array $available_context Optional array of ancestry context values. param: WP_Block_Type_Registry $registry Optional block type registry. |
offsetExists( $index ) X-Ref |
Returns true if a block exists by the specified block index, or false otherwise. return: bool Whether block exists. since: 5.5.0 param: string $index Index of block to check. |
offsetGet( $index ) X-Ref |
Returns the value by the specified block index. return: mixed|null Block value if exists, or null. since: 5.5.0 param: string $index Index of block value to retrieve. |
offsetSet( $index, $value ) X-Ref |
Assign a block value by the specified block index. since: 5.5.0 param: string $index Index of block value to set. param: mixed $value Block value. |
offsetUnset( $index ) X-Ref |
Unset a block. since: 5.5.0 param: string $index Index of block value to unset. |
rewind() X-Ref |
Rewinds back to the first element of the Iterator. since: 5.5.0 |
current() X-Ref |
Returns the current element of the block list. return: mixed Current element. since: 5.5.0 |
key() X-Ref |
Returns the key of the current element of the block list. return: mixed Key of the current element. since: 5.5.0 |
next() X-Ref |
Moves the current position of the block list to the next element. since: 5.5.0 |
valid() X-Ref |
Checks if current position is valid. since: 5.5.0 |
count() X-Ref |
Returns the count of blocks in the list. return: int Block count. since: 5.5.0 |
Generated: Thu Dec 5 01:00:03 2024 | Cross-referenced by PHPXref 0.7.1 |