data
8 years ago
edit
7 years ago
class-give-donation-form-grid-block.php
8 years ago
index.js
8 years ago
index.js
39 lines
| 1 | /** |
| 2 | * Block dependencies |
| 3 | */ |
| 4 | import blockAttributes from './data/attributes'; |
| 5 | import giveLogo from './data/icon'; |
| 6 | import GiveDonationFormGrid from './edit/block'; |
| 7 | |
| 8 | /** |
| 9 | * Internal dependencies |
| 10 | */ |
| 11 | const {__} = wp.i18n, |
| 12 | {registerBlockType} = wp.blocks; |
| 13 | |
| 14 | /** |
| 15 | * Register Block |
| 16 | */ |
| 17 | |
| 18 | export default registerBlockType('give/donation-form-grid', { |
| 19 | |
| 20 | title: __('Give Donation Form Grid'), |
| 21 | description: __('The Give Donation Form Grid block insert an existing donation form into the page. Each form\'s presentation can be customized below.'), |
| 22 | category: 'widgets', |
| 23 | icon: giveLogo, |
| 24 | keywords: [ |
| 25 | __('donation'), |
| 26 | __('grid'), |
| 27 | ], |
| 28 | supports: { |
| 29 | html: false, |
| 30 | }, |
| 31 | attributes: blockAttributes, |
| 32 | edit: GiveDonationFormGrid, |
| 33 | |
| 34 | save: () => { |
| 35 | // Server side rendering via shortcode |
| 36 | return null; |
| 37 | }, |
| 38 | }); |
| 39 |