PluginProbe
Gutenberg / 17.3.0
Gutenberg v17.3.0
24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 All 403 releases
gutenberg / lib / experimental / interactivity-api / store.php

store.php in Gutenberg 17.3.0, at lib/experimental/interactivity-api/store.php

29 lines 652 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Functions to expose the store of the WP_Interactivity_Store class.
4 *
5 * @package Gutenberg
6 * @subpackage Interactivity API
7 */
8
9 if ( ! function_exists( 'wp_store' ) ) {
10 /**
11 * Merge data with the existing store.
12 *
13 * @param array $data Data that will be merged with the existing store.
14 *
15 * @return $data The current store data.
16 */
17 function wp_store( $data = null ) {
18 if ( $data ) {
19 WP_Interactivity_Store::merge_data( $data );
20 }
21 return WP_Interactivity_Store::get_data();
22 }
23 }
24
25 /**
26 * Render the Interactivity API store in the frontend.
27 */
28 add_action( 'wp_footer', array( 'WP_Interactivity_Store', 'render' ), 8 );
29