assets
5 years ago
sections
6 years ago
views
6 years ago
Actions.php
6 years ago
Sequoia.php
5 years ago
optionConfig.php
5 years ago
optionConfig.php
210 lines
| 1 | <?php |
| 2 | |
| 3 | use Give\Form\Template\Options; |
| 4 | use Give\Helpers\Form\Template\Utils\Frontend as FrontendFormTemplateUtils; |
| 5 | |
| 6 | global $pagenow; |
| 7 | $formInfo = get_post( FrontendFormTemplateUtils::getFormId() ); |
| 8 | |
| 9 | // Setup dynamic defaults |
| 10 | $introHeadline = ( ! $formInfo->post_title || 'post-new.php' === $pagenow ) ? __( 'Support Our Cause', 'give' ) : $formInfo->post_title; |
| 11 | $introDescription = $formInfo->post_excerpt ? $formInfo->post_excerpt : __( 'Help our organization by donating today! All donations go directly to making a difference for our cause.', 'give' ); |
| 12 | |
| 13 | return [ |
| 14 | 'introduction' => [ |
| 15 | 'name' => sprintf( __( '%1$s Step 1: %2$s Introduction', 'give' ), '<strong>', '</strong>' ), |
| 16 | 'desc' => __( 'Step description goes here.', 'give' ), |
| 17 | 'fields' => [ |
| 18 | [ |
| 19 | 'name' => __( 'Include Step One', 'give' ), |
| 20 | 'desc' => __( 'If enabled, a headline and description show for the first step of the donation process.', 'give' ), |
| 21 | 'id' => 'enabled', |
| 22 | 'type' => 'radio_inline', |
| 23 | 'options' => [ |
| 24 | 'enabled' => __( 'Enabled', 'give' ), |
| 25 | 'disabled' => __( 'Disabled', 'give' ), |
| 26 | ], |
| 27 | 'default' => 'enabled', |
| 28 | ], |
| 29 | [ |
| 30 | 'id' => 'headline', |
| 31 | 'name' => __( 'Headline', 'give' ), |
| 32 | 'desc' => __( 'The headline displays at the top of step one, and defaults to the Form Title. Best practice: limit the headline to fewer than 8 words.', 'give' ), |
| 33 | 'type' => 'text', |
| 34 | 'attributes' => [ |
| 35 | 'placeholder' => $introHeadline, |
| 36 | ], |
| 37 | 'default' => $introHeadline, |
| 38 | ], |
| 39 | [ |
| 40 | 'id' => 'description', |
| 41 | 'name' => __( 'Description', 'give' ), |
| 42 | 'desc' => __( 'The description displays below the headline, and defaults to the Donation Form\'s excerpt, if present. Best practice: limit the description to short sentences that drive the donor toward the next step.', 'give' ), |
| 43 | 'type' => 'textarea', |
| 44 | 'attributes' => [ |
| 45 | 'placeholder' => $introDescription, |
| 46 | ], |
| 47 | 'default' => $introDescription, |
| 48 | ], |
| 49 | [ |
| 50 | 'id' => 'image', |
| 51 | 'name' => __( 'Image', 'give' ), |
| 52 | 'desc' => __( 'Upload an eye-catching image that reflects your cause. For best results use an image in 16x9 aspect ratio at least 680x400px.', 'give' ), |
| 53 | 'type' => 'file', |
| 54 | ], |
| 55 | [ |
| 56 | 'id' => 'primary_color', |
| 57 | 'name' => __( 'Primary Color', 'give' ), |
| 58 | 'desc' => __( 'The primary color is used throughout the Form Template for various elements including buttons, line breaks, and focus/hover elements. Set a color that reflects your brand or main featured image for best results.', 'give' ), |
| 59 | 'type' => 'colorpicker', |
| 60 | 'default' => '#28C77B', |
| 61 | ], |
| 62 | [ |
| 63 | 'id' => 'donate_label', |
| 64 | 'name' => __( 'Donate Button', 'give' ), |
| 65 | 'desc' => __( 'Customize the text that appears prompting the user to go to the next step.', 'give' ), |
| 66 | 'type' => 'text_medium', |
| 67 | 'attributes' => [ |
| 68 | 'placeholder' => __( 'Donate Now', 'give' ), |
| 69 | ], |
| 70 | 'default' => __( 'Donate Now', 'give' ), |
| 71 | ], |
| 72 | ], |
| 73 | ], |
| 74 | 'payment_amount' => [ |
| 75 | 'name' => sprintf( __( '%1$s Step 2: %2$s Payment Amount', 'give' ), '<strong>', '</strong>' ), |
| 76 | 'desc' => __( 'Step description goes here.', 'give' ), |
| 77 | 'fields' => [ |
| 78 | [ |
| 79 | 'id' => 'header_label', |
| 80 | 'name' => __( 'Header Label', 'give' ), |
| 81 | 'desc' => __( 'The Header Label displays at the top of this step, and is designed to focus the donor\'s attention on what this step is about. Best Practice: limit this to fewer than 4 words.', 'give' ), |
| 82 | 'type' => 'text', |
| 83 | 'attributes' => [ |
| 84 | 'placeholder' => __( 'Choose Amount', 'give' ), |
| 85 | ], |
| 86 | 'default' => __( 'Choose Amount', 'give' ), |
| 87 | ], |
| 88 | [ |
| 89 | 'id' => 'content', |
| 90 | 'name' => __( 'Content', 'give' ), |
| 91 | 'desc' => __( 'Cotent displays before the level amounts, and is designed to provide context for those levels. Best practice: limit this to 1-2 short sentences crafted to drive the donor to decide and to remove friction.', 'give' ), |
| 92 | 'type' => 'textarea', |
| 93 | 'attributes' => [ |
| 94 | 'placeholder' => sprintf( __( 'How much would you like to donate? As a contributor to %s we make sure your donation goes directly to supporting our cause.', 'give' ), get_bloginfo( 'sitename' ) ), |
| 95 | ], |
| 96 | ], |
| 97 | [ |
| 98 | 'id' => 'next_label', |
| 99 | 'name' => __( 'Continue Button', 'give' ), |
| 100 | 'desc' => __( 'Customize the text that appears prompting the user to go to the next step.', 'give' ), |
| 101 | 'type' => 'text_medium', |
| 102 | 'attributes' => [ |
| 103 | 'placeholder' => __( 'Continue', 'give' ), |
| 104 | ], |
| 105 | 'default' => __( 'Continue', 'give' ), |
| 106 | ], |
| 107 | ], |
| 108 | ], |
| 109 | 'payment_information' => [ |
| 110 | 'name' => sprintf( __( '%1$s Step 3: %2$s Payment Information', 'give' ), '<strong>', '</strong>' ), |
| 111 | 'desc' => __( 'Step description goes here.', 'give' ), |
| 112 | 'fields' => [ |
| 113 | [ |
| 114 | 'id' => 'header_label', |
| 115 | 'name' => __( 'Header Label', 'give' ), |
| 116 | 'desc' => __( 'The Header Label displays at the top of this step, and is designed to focus the donor\'s attention on what this step is about. Best Practice: limit this to fewer than 4 words.', 'give' ), |
| 117 | 'type' => 'text', |
| 118 | 'attributes' => [ |
| 119 | 'placeholder' => __( 'Add Your Information', 'give' ), |
| 120 | ], |
| 121 | 'default' => __( 'Add Your Information', 'give' ), |
| 122 | ], |
| 123 | [ |
| 124 | 'id' => 'headline', |
| 125 | 'name' => __( 'Headline', 'give' ), |
| 126 | 'desc' => __( 'The Headline introduces the section where donors provide information about themselves. Best practice: limit the headline to fewer than 5 words.', 'give' ), |
| 127 | 'type' => 'text', |
| 128 | 'attributes' => [ |
| 129 | 'placeholder' => __( "Who's giving today?", 'give' ), |
| 130 | ], |
| 131 | 'default' => __( "Who's giving today?", 'give' ), |
| 132 | ], |
| 133 | [ |
| 134 | 'id' => 'description', |
| 135 | 'name' => __( 'Description', 'give' ), |
| 136 | 'desc' => __( 'The description displays below the checkout step, and is designed to remove obstacles from donating. Best practice: use this section to reassure donors that they are making a wise decision.', 'give' ), |
| 137 | 'type' => 'textarea', |
| 138 | 'attributes' => [ |
| 139 | 'placeholder' => __( 'We’ll never share this information with anyone.', 'give' ), |
| 140 | ], |
| 141 | 'default' => __( 'We’ll never share this information with anyone.', 'give' ), |
| 142 | ], |
| 143 | Options::getCheckoutLabelField(), |
| 144 | ], |
| 145 | ], |
| 146 | 'thank-you' => [ |
| 147 | 'name' => sprintf( __( '%1$s Step 4: %2$s Thank You', 'give' ), '<strong>', '</strong>' ), |
| 148 | 'desc' => __( 'Step description goes here.', 'give' ), |
| 149 | 'fields' => [ |
| 150 | [ |
| 151 | 'id' => 'image', |
| 152 | 'name' => __( 'Image', 'give' ), |
| 153 | 'desc' => __( 'This image appears above the main thank you content. If no image is provided, a check mark icon will appear. For best results use an image in 16x9 aspect ratio at least 680x400px.', 'give' ), |
| 154 | 'type' => 'file', |
| 155 | ], |
| 156 | [ |
| 157 | 'id' => 'headline', |
| 158 | 'name' => __( 'Headline', 'give' ), |
| 159 | 'desc' => __( 'This message displays in large font on the thank you screen. Best practice: short, sweet, and sincere works best.', 'give' ), |
| 160 | 'type' => 'text', |
| 161 | 'attributes' => [ |
| 162 | 'placeholder' => __( 'A great big thank you!', 'give' ), |
| 163 | ], |
| 164 | 'default' => __( 'A great big thank you!', 'give' ), |
| 165 | ], |
| 166 | [ |
| 167 | 'id' => 'description', |
| 168 | 'name' => __( 'Description', 'give' ), |
| 169 | 'desc' => __( 'The description is displayed directly below the main headline and should be 1-2 sentences. You may use <a href="http://docs.givewp.com/email-tags target="_blank">any of the available template tags</a> within this message.', 'give' ), |
| 170 | 'type' => 'textarea', |
| 171 | 'attributes' => [ |
| 172 | 'placeholder' => __( '{name}, your contribution means a lot and will be put to good use making a difference. We’ve sent your donation receipt to {donor_email}. ', 'give' ), |
| 173 | ], |
| 174 | 'default' => __( '{name}, your contribution means a lot and will be put to good use making a difference. We’ve sent your donation receipt to {donor_email}. ', 'give' ), |
| 175 | ], |
| 176 | [ |
| 177 | 'name' => __( 'Social Sharing', 'give' ), |
| 178 | 'desc' => __( 'Enable to display links for donors to share on social media that they donated.', 'give' ), |
| 179 | 'id' => 'sharing', |
| 180 | 'type' => 'radio_inline', |
| 181 | 'options' => [ |
| 182 | 'enabled' => __( 'Enabled', 'give' ), |
| 183 | 'disabled' => __( 'Disabled', 'give' ), |
| 184 | ], |
| 185 | 'default' => 'enabled', |
| 186 | ], |
| 187 | [ |
| 188 | 'id' => 'sharing_instruction', |
| 189 | 'name' => __( 'Sharing Instruction', 'give' ), |
| 190 | 'desc' => __( 'Sharing instructions display above the social sharing buttons. Best practice: be direct, bold, and confident here. Donors share when they are asked to.', 'give' ), |
| 191 | 'type' => 'text', |
| 192 | 'attributes' => [ |
| 193 | 'placeholder' => __( 'Help us out by sharing with friends and followers that you supported the cause!', 'give' ), |
| 194 | ], |
| 195 | 'default' => __( 'Help us out by sharing with friends and followers that you supported the cause!', 'give' ), |
| 196 | ], |
| 197 | [ |
| 198 | 'id' => 'twitter_message', |
| 199 | 'name' => __( 'Twitter Message', 'give' ), |
| 200 | 'desc' => __( 'This puts "words in the mouth" of your donor to share with their Twitter followers.', 'give' ), |
| 201 | 'type' => 'text', |
| 202 | 'attributes' => [ |
| 203 | 'placeholder' => __( 'I just gave to this cause. Who\'s next?', 'give' ), |
| 204 | ], |
| 205 | 'default' => __( 'I just gave to this cause. Who\'s next?', 'give' ), |
| 206 | ], |
| 207 | ], |
| 208 | ], |
| 209 | ]; |
| 210 |