PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 1.4.0
GenerateBlocks v1.4.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 / button / block.js
generateblocks / src / blocks / button Last commit date
css 5 years ago attributes.js 4 years ago block.js 4 years ago deprecated.js 5 years ago edit.js 4 years ago editor.scss 5 years ago save.js 5 years ago
block.js
50 lines
1 /**
2 * Block: Buttons
3 */
4
5 import './editor.scss';
6
7 import editButton from './edit';
8 import saveButton from './save';
9 import deprecated from './deprecated';
10 import blockAttributes from './attributes';
11 import getIcon from '../../utils/get-icon';
12
13 import {
14 __,
15 } from '@wordpress/i18n';
16
17 import {
18 registerBlockType,
19 } from '@wordpress/blocks';
20
21 /**
22 * Register our Button block.
23 *
24 * @param {string} name Block name.
25 * @param {Object} settings Block settings.
26 * @return {?WPBlock} The block, if it has been successfully
27 * registered; otherwise `undefined`.
28 */
29 registerBlockType( 'generateblocks/button', {
30 title: __( 'Button', 'generateblocks' ),
31 description: __( 'Drive conversions with beautiful buttons.', 'generateblocks' ),
32 parent: [ 'generateblocks/button-container' ],
33 icon: getIcon( 'button' ),
34 category: 'generateblocks',
35 keywords: [
36 __( 'button' ),
37 __( 'buttons' ),
38 __( 'generate' ),
39 ],
40 attributes: blockAttributes,
41 supports: {
42 className: false,
43 inserter: false,
44 reusable: false,
45 },
46 edit: editButton,
47 save: saveButton,
48 deprecated,
49 } );
50