wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_interactivity_state › WordPress Function

Od6.5.0
Przestarzałyn/a
› wp_interactivity_state ( $store_namespace = null, $state = array() )
Parametry: (2)
  • (string|null) $store_namespace The unique store namespace identifier.
    Wymagane: Nie
    Domyślny: null
  • (array) $state Optional. The array that will be merged with the existing state for the specified store namespace.
    Wymagane: Nie
    Domyślny: array()
Powrót:
  • (array) The state for the specified store namespace. This will be the updated state if a $state argument was
    provided.
Zdefiniowane na:
Codex:
Dziennik zmian:
  • 6.6.0

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.


Źródło

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