Gets the current Interactivity API context for a given namespace.
Description
The function should be used only during directive processing. If the $store_namespace parameter is omitted, it uses the current namespace value on the internal namespace stack.
It returns an empty array when the specified namespace is not defined.
Parameters
$store_namespacestringoptional- The unique store namespace identifier.
Default:
null
Source
function wp_interactivity_get_context( ?string $store_namespace = null ): array {
return wp_interactivity()->get_context( $store_namespace );
}
Changelog
| Version | Description |
|---|---|
| 6.6.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.