Gets and/or sets the configuration of the Interactivity API for a given store namespace.
Description
If configuration for that store namespace exists, it merges the new provided configuration with the existing one.
Parameters
$store_namespace
stringrequired- The unique store namespace identifier.
$config
arrayoptional- The array that will be merged with the existing configuration for the specified store namespace.
Default:
array()
Source
* @since 6.6.0 The `$store_namespace` param is optional.
*
* @param string $store_namespace Optional. The unique store namespace identifier.
* @param array $state Optional. The array that will be merged with the existing state for the specified
* store namespace.
* @return array The current state for the specified store namespace. This will be the updated state if a $state
* argument was provided.
*/
public function state( ?string $store_namespace = null, ?array $state = null ): array {
if ( ! $store_namespace ) {
if ( $state ) {
_doing_it_wrong(
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.