attributes.js
118 lines
| 1 | /** |
| 2 | * WordPress dependencies |
| 3 | */ |
| 4 | import {__} from '@wordpress/i18n' |
| 5 | |
| 6 | /** |
| 7 | * Block Attributes |
| 8 | */ |
| 9 | |
| 10 | const blockAttributes = { |
| 11 | donorsPerPage: { |
| 12 | type: 'string', |
| 13 | default: '12', |
| 14 | }, |
| 15 | formID: { |
| 16 | type: 'array', |
| 17 | default: [], |
| 18 | }, |
| 19 | ids: { |
| 20 | type: 'array', |
| 21 | default: [], |
| 22 | }, |
| 23 | categories: { |
| 24 | type: 'array', |
| 25 | default: [], |
| 26 | }, |
| 27 | tags: { |
| 28 | type: 'string', |
| 29 | default: [], |
| 30 | }, |
| 31 | orderBy: { |
| 32 | type: 'string', |
| 33 | default: 'post_date', |
| 34 | }, |
| 35 | order: { |
| 36 | type: 'string', |
| 37 | default: 'DESC', |
| 38 | }, |
| 39 | paged: { |
| 40 | type: 'string', |
| 41 | default: '1', |
| 42 | }, |
| 43 | columns: { |
| 44 | type: 'string', |
| 45 | default: '3', |
| 46 | }, |
| 47 | showAvatar: { |
| 48 | type: 'boolean', |
| 49 | default: true, |
| 50 | }, |
| 51 | showName: { |
| 52 | type: 'boolean', |
| 53 | default: true, |
| 54 | }, |
| 55 | showCompanyName: { |
| 56 | type: 'boolean', |
| 57 | default: false, |
| 58 | }, |
| 59 | showForm: { |
| 60 | type: 'boolean', |
| 61 | default: true, |
| 62 | }, |
| 63 | showTotal: { |
| 64 | type: 'boolean', |
| 65 | default: true, |
| 66 | }, |
| 67 | showComments: { |
| 68 | type: 'boolean', |
| 69 | default: true, |
| 70 | }, |
| 71 | showTributes: { |
| 72 | type: 'boolean', |
| 73 | default: true, |
| 74 | }, |
| 75 | showAnonymous: { |
| 76 | type: 'boolean', |
| 77 | default: true, |
| 78 | }, |
| 79 | onlyComments: { |
| 80 | type: 'boolean', |
| 81 | default: false, |
| 82 | }, |
| 83 | commentLength: { |
| 84 | type: 'string', |
| 85 | default: '80', |
| 86 | }, |
| 87 | readMoreText: { |
| 88 | type: 'string', |
| 89 | default: __('Read more', 'give'), |
| 90 | }, |
| 91 | loadMoreText: { |
| 92 | type: 'string', |
| 93 | default: __('Load more', 'give'), |
| 94 | }, |
| 95 | avatarSize: { |
| 96 | type: 'string', |
| 97 | default: '75', |
| 98 | }, |
| 99 | toggleOptions: { |
| 100 | type: 'string', |
| 101 | default: 'donorInfo', |
| 102 | }, |
| 103 | filterOptions: { |
| 104 | type: 'string', |
| 105 | default: 'ids', |
| 106 | }, |
| 107 | color: { |
| 108 | type: 'string', |
| 109 | default: '#219653', |
| 110 | }, |
| 111 | showTimestamp: { |
| 112 | type: 'boolean', |
| 113 | default: true, |
| 114 | }, |
| 115 | }; |
| 116 | |
| 117 | export default blockAttributes; |
| 118 |