# gutenberg/17.0.3/lib/experimental/interactivity-api/store.php

Gutenberg, version 17.0.3. 29 lines.

- Page: https://pluginprobe.com/plugins/gutenberg/17.0.3/code/lib/experimental/interactivity-api/store.php
- Raw: https://pluginprobe.com/plugins/gutenberg/17.0.3/raw/lib/experimental/interactivity-api/store.php
- Modified: 2023-11-22T21:25:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/gutenberg/17.0.3/code/lib/experimental/interactivity-api/store.php#L10-L20`.

```php
<?php
/**
 * Functions to expose the store of the WP_Interactivity_Store class.
 *
 * @package Gutenberg
 * @subpackage Interactivity API
 */

if ( ! function_exists( 'wp_store' ) ) {
	/**
	 * Merge data with the existing store.
	 *
	 * @param array $data Data that will be merged with the existing store.
	 *
	 * @return $data The current store data.
	 */
	function wp_store( $data = null ) {
		if ( $data ) {
			WP_Interactivity_Store::merge_data( $data );
		}
		return WP_Interactivity_Store::get_data();
	}
}

/**
 * Render the Interactivity API store in the frontend.
 */
add_action( 'wp_footer', array( 'WP_Interactivity_Store', 'render' ), 8 );

```
