data
3 years ago
edit
2 years ago
class-give-donation-form-grid-block.php
1 year ago
index.js
7 months ago
index.js
39 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 GiveDonationFormGrid from './edit/block'; |
| 13 | |
| 14 | /** |
| 15 | * Register Block |
| 16 | */ |
| 17 | |
| 18 | export default registerBlockType('give/donation-form-grid', { |
| 19 | apiVersion: 3, |
| 20 | title: __('Donation Form Grid', 'give'), |
| 21 | description: __( |
| 22 | "The GiveWP Donation Form Grid block insert an existing donation form into the page. Each form's presentation can be customized below.", |
| 23 | 'give' |
| 24 | ), |
| 25 | category: 'give', |
| 26 | icon: <GiveIcon color="grey" />, |
| 27 | keywords: [__('donation', 'give'), __('grid', 'give')], |
| 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 |