index.js
38 lines
| 1 | /** |
| 2 | * WordPress dependencies |
| 3 | */ |
| 4 | import { __ } from '@wordpress/i18n' |
| 5 | import { registerBlockType } from '@wordpress/blocks'; |
| 6 | |
| 7 | /** |
| 8 | * Internal dependencies |
| 9 | */ |
| 10 | import blockAttributes from './data/attributes'; |
| 11 | import GiveIcon from '@givewp/components/GiveIcon'; |
| 12 | import GiveDonorWallGrid from './edit/block'; |
| 13 | |
| 14 | /** |
| 15 | * Register Block |
| 16 | */ |
| 17 | |
| 18 | export default registerBlockType( 'give/donor-wall', { |
| 19 | title: __( 'Donor Wall', 'give' ), |
| 20 | description: __( 'The GiveWP Donor Wall block displays donations on the front end of the site. The settings below allow you to customize the information displayed', 'give' ), |
| 21 | category: 'give', |
| 22 | icon: <GiveIcon color="grey" />, |
| 23 | keywords: [ |
| 24 | __( 'donation', 'give' ), |
| 25 | __( 'wall', 'give' ), |
| 26 | ], |
| 27 | supports: { |
| 28 | html: false, |
| 29 | }, |
| 30 | attributes: blockAttributes, |
| 31 | edit: GiveDonorWallGrid, |
| 32 | |
| 33 | save: () => { |
| 34 | // Server side rendering via shortcode |
| 35 | return null; |
| 36 | }, |
| 37 | } ); |
| 38 |