PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 1.0
GenerateBlocks v1.0
trunk 1.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.3.0
generateblocks / src / blocks / container / block.js
generateblocks / src / blocks / container Last commit date
css 6 years ago attributes.js 6 years ago block-controls.js 6 years ago block.js 6 years ago edit.js 6 years ago editor.scss 6 years ago save.js 6 years ago section-tag.js 6 years ago style.scss 6 years ago
block.js
45 lines
1 /**
2 * Block: Container
3 */
4
5 import './style.scss';
6 import './editor.scss';
7 import './block-controls.js';
8
9 import editContainer from './edit';
10 import saveContainer from './save';
11 import blockAttributes from './attributes';
12 import getIcon from '../../utils/get-icon';
13
14 const { __ } = wp.i18n;
15 const { registerBlockType } = wp.blocks;
16
17 /**
18 * Register our Container block.
19 *
20 * @param {string} name Block name.
21 * @param {Object} settings Block settings.
22 * @return {?WPBlock} The block, if it has been successfully
23 * registered; otherwise `undefined`.
24 */
25 registerBlockType( 'generateblocks/container', {
26 title: __( 'Container', 'generateblocks' ),
27 description: __( 'Organize your content into rows and sections.', 'generateblocks' ),
28 icon: getIcon( 'container' ),
29 category: 'generateblocks',
30 keywords: [
31 __( 'section' ),
32 __( 'container' ),
33 __( 'generate' ),
34 ],
35 attributes: blockAttributes,
36 supports: {
37 align: false,
38 anchor: false,
39 className: false,
40 customClassName: false,
41 },
42 edit: editContainer,
43 save: saveContainer,
44 } );
45