1 |
|
2 |
|
3 |
|
4 | import {
|
5 | registerBlockType,
|
6 | setDefaultBlockName,
|
7 | } from '@wordpress/blocks';
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | import * as code from './code';
|
13 | import * as heading from './heading';
|
14 | import * as more from './more';
|
15 | import * as paragraph from './paragraph';
|
16 | import * as image from './image';
|
17 | import * as nextpage from './nextpage';
|
18 |
|
19 | export const registerCoreBlocks = () => {
|
20 | [
|
21 | paragraph,
|
22 | heading,
|
23 | code,
|
24 | more,
|
25 | image,
|
26 | nextpage,
|
27 | ].forEach( ( { name, settings } ) => {
|
28 | registerBlockType( name, settings );
|
29 | } );
|
30 | };
|
31 |
|
32 | setDefaultBlockName( paragraph.name );
|