WP_Block_List::count │ public │ WP 5.5.0 │ ReturnTypeWillChange

Returns the count of blocks in the list.

Method of the class: WP_Block_List{}

No Hooks.

Returns

int. Block count.

Usage

$WP_Block_List = new WP_Block_List();
$WP_Block_List->count();

Changelog

Since 5.5.0 Introduced.

WP_Block_List::count() code WP 7.1.4

public function count() {
	return count( $this->blocks );
}