WP_Interactivity_API::get_element(): array{attributes:

In this article

Returns an array representation of the current element being processed.

Description

The returned array contains a copy of the element attributes.

Return

array{attributes: array<string, string|bool>}|null Current element.

Source

public function get_element(): ?array {
	if ( null === $this->current_element ) {
		_doing_it_wrong(
			__METHOD__,
			__( 'The element can only be read during directive processing.' ),
			'6.7.0'
		);
	}

	return $this->current_element;
}

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.