options.js
57 lines
| 1 | /** |
| 2 | * WordPress dependencies |
| 3 | */ |
| 4 | import {__} from '@wordpress/i18n' |
| 5 | |
| 6 | /** |
| 7 | * Options data for various form selects |
| 8 | */ |
| 9 | const giveFormOptions = {}; |
| 10 | |
| 11 | // Form Order By |
| 12 | giveFormOptions.orderBy = [ |
| 13 | {value: 'date', label: __('Date Created', 'give')}, |
| 14 | {value: 'title', label: __('Form Name', 'give')}, |
| 15 | {value: 'amount_donated', label: __('Amount Donated', 'give')}, |
| 16 | {value: 'number_donations', label: __('Number of Donations', 'give')}, |
| 17 | {value: 'menu_order', label: __('Menu Order', 'give')}, |
| 18 | {value: 'post__in', label: __('Provided Form IDs', 'give')}, |
| 19 | {value: 'closest_to_goal', label: __('Closest To Goal', 'give')}, |
| 20 | {value: 'random', label: __('Random', 'give')}, |
| 21 | ]; |
| 22 | |
| 23 | // Form Order |
| 24 | giveFormOptions.order = [ |
| 25 | {value: 'DESC', label: __('Descending', 'give')}, |
| 26 | {value: 'ASC', label: __('Ascending', 'give')}, |
| 27 | ]; |
| 28 | |
| 29 | // Form Display Styles |
| 30 | giveFormOptions.columns = [ |
| 31 | {value: '1', label: __('Full Width', 'give')}, |
| 32 | {value: '2', label: __('Double', 'give')}, |
| 33 | {value: '3', label: __('Triple', 'give')}, |
| 34 | {value: '4', label: __('Max (4)', 'give')}, |
| 35 | ]; |
| 36 | |
| 37 | // Form Display Styles |
| 38 | giveFormOptions.displayType = [ |
| 39 | {value: 'redirect', label: __('Redirect', 'give')}, |
| 40 | {value: 'modal_reveal', label: __('Modal', 'give')}, |
| 41 | ]; |
| 42 | |
| 43 | //Filter |
| 44 | giveFormOptions.filter = [ |
| 45 | {value: 'formIDs', label: __('Form ID', 'give')}, |
| 46 | {value: 'categories', label: __('Categories', 'give')}, |
| 47 | {value: 'tags', label: __('Tags', 'give')}, |
| 48 | ]; |
| 49 | |
| 50 | //Image Height |
| 51 | giveFormOptions.imageHeight = [ |
| 52 | {value: 'auto', label: __('Auto', 'give')}, |
| 53 | {value: 'custom', label: __('Custom', 'give')}, |
| 54 | ] |
| 55 | |
| 56 | export default giveFormOptions; |
| 57 |