index.js
39 lines
| 1 | /** |
| 2 | * WordPress dependencies |
| 3 | */ |
| 4 | const { __ } = wp.i18n; |
| 5 | const { registerBlockType } = wp.blocks; |
| 6 | |
| 7 | /** |
| 8 | * Internal dependencies |
| 9 | */ |
| 10 | import blockAttributes from './data/attributes'; |
| 11 | import GiveLogo from './logo'; |
| 12 | import edit from './edit'; |
| 13 | |
| 14 | /** |
| 15 | * Register Block |
| 16 | */ |
| 17 | |
| 18 | export default registerBlockType( 'give/donor-dashboard', { |
| 19 | title: __( 'Donor Dashboard', 'give' ), |
| 20 | description: __( 'The Donor Dashboard block allows donors to modify and review their donor information from the front-end.', 'give' ), |
| 21 | category: 'give', |
| 22 | icon: <GiveLogo color="grey" />, |
| 23 | keywords: [ |
| 24 | __( 'donor', 'give' ), |
| 25 | __( 'dashboard', 'give' ), |
| 26 | ], |
| 27 | attributes: blockAttributes, |
| 28 | supports: { |
| 29 | align: [ |
| 30 | 'wide', |
| 31 | ], |
| 32 | }, |
| 33 | edit: edit, |
| 34 | save: () => { |
| 35 | // Server side rendering via shortcode |
| 36 | return null; |
| 37 | }, |
| 38 | } ); |
| 39 |