W3cubDocs

/WordPress

WP_Block_List::key()

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

Return

(mixed) Key of the current element.

Source

File: wp-includes/class-wp-block-list.php

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

Changelog

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/key