-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy pathindex.js
51 lines (44 loc) · 1.59 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// A "block" is the abstract term used to describe units of markup that,
// when composed together, form the content or layout of a page.
// The API for blocks is exposed via `wp.blocks`.
//
// Supported blocks are registered by calling `registerBlockType`. Once registered,
// the block is made available as an option to the editor interface.
//
// Blocks are inferred from the HTML source of a post through a parsing mechanism
// and then stored as objects in state, from which it is then rendered for editing.
/**
* WordPress dependencies
*/
import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/experiments';
const { registerExperimentalAPIs, getExperimentalAPIs } =
__dangerousOptInToUnstableAPIsOnlyForCoreModules(
'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',
'@wordpress/blocks'
);
/**
* Internal dependencies
*/
import { store } from './store';
export { store };
export * from './api';
export * from './deprecated';
import { __experimentalReapplyBlockTypeFilters } from './store/actions';
import {
// eslint-disable-next-line camelcase
unstable__bootstrapServerSideBlockDefinitions,
__unstableGetInnerBlocksProps,
} from './api';
const { __experimentalPrivateDispatch } =
getExperimentalAPIs( '@wordpress/data' );
registerExperimentalAPIs( {
__unstableGetInnerBlocksProps,
// eslint-disable-next-line camelcase
unstable__bootstrapServerSideBlockDefinitions,
__experimentalReapplyBlockTypeFilters: () => {
__experimentalPrivateDispatch(
store,
__experimentalReapplyBlockTypeFilters()
);
},
} );