wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_interactivity_state › WordPress Function

Since6.5.0
已弃用n/a
wp_interactivity_state ( $store_namespace, $state = array() )
参数: (2)
  • (string) $store_namespace The unique store namespace identifier.
    Required: Yes
  • (array) $state Optional. The array that will be merged with the existing state for the specified store namespace.
    Required: No
    默认: array()
返回:
  • (array) The state for the specified store namespace. This will be the updated state if a $state argument was provided.
定义在:
文档:

Gets and/or sets the initial state of an Interactivity API store for a given namespace.

If state for that store namespace already exists, it merges the new provided state with the existing one.


源码

function wp_interactivity_state( string $store_namespace, array $state = array() ): array {
	return wp_interactivity()->state( $store_namespace, $state );
}