--- a/wp/wp-includes/interactivity-api/interactivity-api.php Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-includes/interactivity-api/interactivity-api.php Fri Sep 05 18:52:52 2025 +0200
@@ -125,3 +125,16 @@
function wp_interactivity_get_context( ?string $store_namespace = null ): array {
return wp_interactivity()->get_context( $store_namespace );
}
+
+/**
+ * Returns an array representation of the current element being processed.
+ *
+ * The function should be used only during directive processing.
+ *
+ * @since 6.7.0
+ *
+ * @return array{attributes: array<string, string|bool>}|null Current element.
+ */
+function wp_interactivity_get_element(): ?array {
+ return wp_interactivity()->get_element();
+}