wp_interactivity_get_context()
Gets the current Interactivity API context for a given namespace.
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.
Хуков нет.
Возвращает
Массив. The context for the specified store namespace.
Использование
wp_interactivity_get_context( ?string $store_namespace ): array;
- ?string $store_namespace
- .
По умолчанию: null
Список изменений
| С версии 6.6.0 | Введена. |
Код wp_interactivity_get_context() wp interactivity get context WP 6.9
function wp_interactivity_get_context( ?string $store_namespace = null ): array {
return wp_interactivity()->get_context( $store_namespace );
}