wp_interactivity_state


wp_interactivity_state ( $store_namespace = null, $state = array() )

Parameters:
  • (string) store_namespace The unique store namespace identifier.
  • (array) state Optional. The array that will be merged with the existing state for the specified store namespace.
Returns:
  • (array) The state for the specified store namespace. This will be the updated state if a $state argument was provided.
Defined at:
Change Log:
  • 6: .

Description

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. The namespace can be omitted inside derived state getters, using the namespace where the getter is defined.

Related Functions

wp_interactivity, wp_interactivity_get_context, wp_interactivity_config, wp_interactivity_data_wp_context, wp_interactivity_get_element

Top Google Results

User discussions

wpseek mobile