wp_interactivity_get_element()WP 6.7.0

Returns an array representation of the current element being processed.

The function should be used only during directive processing.

No Hooks.

Returns

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

Usage

wp_interactivity_get_element(): ?array;

Changelog

Since 6.7.0 Introduced.

wp_interactivity_get_element() code WP 6.8.1

function wp_interactivity_get_element(): ?array {
	return wp_interactivity()->get_element();
}