wp/wp-includes/interactivity-api/interactivity-api.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
   123  * @return array The context for the specified store namespace.
   123  * @return array The context for the specified store namespace.
   124  */
   124  */
   125 function wp_interactivity_get_context( ?string $store_namespace = null ): array {
   125 function wp_interactivity_get_context( ?string $store_namespace = null ): array {
   126 	return wp_interactivity()->get_context( $store_namespace );
   126 	return wp_interactivity()->get_context( $store_namespace );
   127 }
   127 }
       
   128 
       
   129 /**
       
   130  * Returns an array representation of the current element being processed.
       
   131  *
       
   132  * The function should be used only during directive processing.
       
   133  *
       
   134  * @since 6.7.0
       
   135  *
       
   136  * @return array{attributes: array<string, string|bool>}|null Current element.
       
   137  */
       
   138 function wp_interactivity_get_element(): ?array {
       
   139 	return wp_interactivity()->get_element();
       
   140 }