PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.3 3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 All 107 releases
wp-parsely / src / content-helper / common / settings / index.ts

index.ts in Parse.ly 3.24.2, at src/content-helper/common/settings/index.ts

36 lines 683 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * WordPress dependencies
3 */
4 import { register, select } from '@wordpress/data';
5
6 /**
7 * Internal dependencies
8 */
9 import { SettingsStore, STORE_NAME } from './store';
10
11 /**
12 * Exports
13 */
14 export { SettingsProvider, useSettings } from './provider';
15 // Export all the settings types.
16 export * from './types';
17
18 /**
19 * Initializes the settings store.
20 *
21 * @since 3.14.0
22 */
23 function initSettings() {
24 // Check if the store is already registered.
25 const isStoreRegistered = select( STORE_NAME ) !== undefined;
26
27 // Register the store if it's not already registered.
28 if ( ! isStoreRegistered ) {
29 register( SettingsStore );
30 }
31 }
32
33 // Initialize the settings store.
34 initSettings();
35
36