WPDev.one
Core Class

WP_Block_List

class WP_Block_List // Constructor: function Object() { [native code] }

Class representing a list of block instances.

Methods 11 methods

Method / Return Description
__construct()
void

Constructor.

Parameters: $blocks: mixed, $available_context: mixed, $registry: mixed
offsetExists()
bool

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

Parameters: $offset: mixed
offsetGet()
(mixed

Returns the value by the specified block offset.

Parameters: $offset: mixed
offsetSet()
void

Assign a block value by the specified block offset.

Parameters: $offset: mixed, $value: mixed
offsetUnset()
void

Unset a block.

Parameters: $offset: mixed
rewind()
void

Rewinds back to the first element of the Iterator.

current()
mixed

Returns the current element of the block list.

key()
mixed

Returns the key of the current element of the block list.

next()
void

Moves the current position of the block list to the next element.

valid()
void

Checks if current position is valid.

count()
int

Returns the count of blocks in the list.

Properties

Property / Type Description
$blocks
mixed
public
No description available.
$available_context
mixed
public
No description available.
$registry
mixed
public
No description available.

Class Information

Since Version
5.5.0
Source File
wp-includes/class-wp-block-list.php
Advertisement