@@ -217,12 +217,14 @@ |
||
217 | 217 | ?> |
218 | 218 | |
219 | 219 | <?php |
220 | -else : |
|
220 | +else { |
|
221 | + : |
|
221 | 222 | if ( isset( $_GET['updated'] ) && 'true' === $_GET['updated'] && ! give_get_errors() ) { |
222 | 223 | if ( isset( $_GET['update_code'] ) ) { |
223 | 224 | switch ( $_GET['update_code'] ) { |
224 | 225 | case '2': |
225 | 226 | printf( '<p class="give_success"><strong>%1$s</strong> %2$s</p>', esc_html__( 'Success:', 'give' ), esc_html__( 'Your profile and password has been updated.', 'give' ) ); |
227 | +} |
|
226 | 228 | _e( 'Login with your new credentials.', 'give' ); |
227 | 229 | echo give_login_form(); |
228 | 230 | break; |
@@ -10,25 +10,25 @@ discard block |
||
10 | 10 | |
11 | 11 | $current_user = wp_get_current_user(); |
12 | 12 | |
13 | -if ( is_user_logged_in() ) : |
|
13 | +if (is_user_logged_in()) : |
|
14 | 14 | $user_id = get_current_user_id(); |
15 | - $first_name = get_user_meta( $user_id, 'first_name', true ); |
|
16 | - $last_name = get_user_meta( $user_id, 'last_name', true ); |
|
17 | - $last_name = get_user_meta( $user_id, 'last_name', true ); |
|
15 | + $first_name = get_user_meta($user_id, 'first_name', true); |
|
16 | + $last_name = get_user_meta($user_id, 'last_name', true); |
|
17 | + $last_name = get_user_meta($user_id, 'last_name', true); |
|
18 | 18 | $display_name = $current_user->display_name; |
19 | - $donor = new Give_Donor( $user_id, true ); |
|
20 | - $address = $donor->get_donor_address( array( 'address_type' => 'personal' ) ); |
|
21 | - $company_name = $donor->get_meta( '_give_donor_company', true ); |
|
22 | - |
|
23 | - if ( isset( $_GET['updated'] ) && 'true' === $_GET['updated'] && ! give_get_errors() ) { |
|
24 | - if ( isset( $_GET['update_code'] ) ) { |
|
25 | - if ( 1 === absint( $_GET['update_code'] ) ) { |
|
26 | - printf( '<p class="give_success"><strong>%1$s</strong> %2$s</p>', esc_html__( 'Success:', 'give' ), esc_html__( 'Your profile has been updated.', 'give' ) ); |
|
19 | + $donor = new Give_Donor($user_id, true); |
|
20 | + $address = $donor->get_donor_address(array('address_type' => 'personal')); |
|
21 | + $company_name = $donor->get_meta('_give_donor_company', true); |
|
22 | + |
|
23 | + if (isset($_GET['updated']) && 'true' === $_GET['updated'] && ! give_get_errors()) { |
|
24 | + if (isset($_GET['update_code'])) { |
|
25 | + if (1 === absint($_GET['update_code'])) { |
|
26 | + printf('<p class="give_success"><strong>%1$s</strong> %2$s</p>', esc_html__('Success:', 'give'), esc_html__('Your profile has been updated.', 'give')); |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
31 | - Give()->notices->render_frontend_notices( 0 ); |
|
31 | + Give()->notices->render_frontend_notices(0); |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Fires in the profile editor shortcode, before the form. |
@@ -37,57 +37,57 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @since 1.0 |
39 | 39 | */ |
40 | - do_action( 'give_profile_editor_before' ); |
|
40 | + do_action('give_profile_editor_before'); |
|
41 | 41 | ?> |
42 | 42 | |
43 | 43 | <form id="give_profile_editor_form" class="give-form" action="<?php echo give_get_current_page_url(); ?>" method="post"> |
44 | 44 | <fieldset> |
45 | - <legend id="give_profile_name_label"><?php _e( 'Profile', 'give' ); ?></legend> |
|
45 | + <legend id="give_profile_name_label"><?php _e('Profile', 'give'); ?></legend> |
|
46 | 46 | |
47 | 47 | <h3 id="give_personal_information_label" |
48 | - class="give-section-break"><?php _e( 'Change your Name', 'give' ); ?></h3> |
|
48 | + class="give-section-break"><?php _e('Change your Name', 'give'); ?></h3> |
|
49 | 49 | |
50 | 50 | <p id="give_profile_first_name_wrap" class="form-row form-row-first form-row-responsive"> |
51 | 51 | <label for="give_first_name"> |
52 | - <?php _e( 'First Name', 'give' ); ?> |
|
52 | + <?php _e('First Name', 'give'); ?> |
|
53 | 53 | <span class="give-required-indicator ">*</span> |
54 | 54 | </label> |
55 | 55 | <input name="give_first_name" id="give_first_name" class="text give-input" type="text" |
56 | - value="<?php echo esc_attr( $first_name ); ?>"/> |
|
56 | + value="<?php echo esc_attr($first_name); ?>"/> |
|
57 | 57 | </p> |
58 | 58 | |
59 | 59 | <p id="give_profile_last_name_wrap" class="form-row form-row-last form-row-responsive"> |
60 | - <label for="give_last_name"><?php _e( 'Last Name', 'give' ); ?></label> |
|
60 | + <label for="give_last_name"><?php _e('Last Name', 'give'); ?></label> |
|
61 | 61 | <input name="give_last_name" id="give_last_name" class="text give-input" type="text" |
62 | - value="<?php echo esc_attr( $last_name ); ?>"/> |
|
62 | + value="<?php echo esc_attr($last_name); ?>"/> |
|
63 | 63 | </p> |
64 | 64 | |
65 | - <?php if ( ! empty( $company_name ) ) : ?> |
|
65 | + <?php if ( ! empty($company_name)) : ?> |
|
66 | 66 | <p id="give_profile_company_name_wrap" class="form-row form-row-wide"> |
67 | - <label for="give_company_name"><?php _e( 'Company Name', 'give' ); ?></label> |
|
67 | + <label for="give_company_name"><?php _e('Company Name', 'give'); ?></label> |
|
68 | 68 | <input name="give_company_name" id="give_company_name" class="text give-input" type="text" |
69 | - value="<?php echo esc_attr( $company_name ); ?>"/> |
|
69 | + value="<?php echo esc_attr($company_name); ?>"/> |
|
70 | 70 | </p> |
71 | 71 | <?php endif; ?> |
72 | 72 | |
73 | 73 | <p id="give_profile_display_name_wrap" class="form-row form-row-first form-row-responsive"> |
74 | - <label for="give_display_name"><?php _e( 'Display Name', 'give' ); ?></label> |
|
74 | + <label for="give_display_name"><?php _e('Display Name', 'give'); ?></label> |
|
75 | 75 | <select name="give_display_name" id="give_display_name" class="select give-select"> |
76 | - <?php if ( ! empty( $current_user->first_name ) ): ?> |
|
77 | - <option <?php selected( $display_name, $current_user->first_name ); ?> |
|
78 | - value="<?php echo esc_attr( $current_user->first_name ); ?>"><?php echo esc_html( $current_user->first_name ); ?></option> |
|
76 | + <?php if ( ! empty($current_user->first_name)): ?> |
|
77 | + <option <?php selected($display_name, $current_user->first_name); ?> |
|
78 | + value="<?php echo esc_attr($current_user->first_name); ?>"><?php echo esc_html($current_user->first_name); ?></option> |
|
79 | 79 | <?php endif; ?> |
80 | - <option <?php selected( $display_name, $current_user->user_nicename ); ?> |
|
81 | - value="<?php echo esc_attr( $current_user->user_nicename ); ?>"><?php echo esc_html( $current_user->user_nicename ); ?></option> |
|
82 | - <?php if ( ! empty( $current_user->last_name ) ): ?> |
|
83 | - <option <?php selected( $display_name, $current_user->last_name ); ?> |
|
84 | - value="<?php echo esc_attr( $current_user->last_name ); ?>"><?php echo esc_html( $current_user->last_name ); ?></option> |
|
80 | + <option <?php selected($display_name, $current_user->user_nicename); ?> |
|
81 | + value="<?php echo esc_attr($current_user->user_nicename); ?>"><?php echo esc_html($current_user->user_nicename); ?></option> |
|
82 | + <?php if ( ! empty($current_user->last_name)): ?> |
|
83 | + <option <?php selected($display_name, $current_user->last_name); ?> |
|
84 | + value="<?php echo esc_attr($current_user->last_name); ?>"><?php echo esc_html($current_user->last_name); ?></option> |
|
85 | 85 | <?php endif; ?> |
86 | - <?php if ( ! empty( $current_user->first_name ) && ! empty( $current_user->last_name ) ): ?> |
|
87 | - <option <?php selected( $display_name, $current_user->first_name . ' ' . $current_user->last_name ); ?> |
|
88 | - value="<?php echo esc_attr( $current_user->first_name . ' ' . $current_user->last_name ); ?>"><?php echo esc_html( $current_user->first_name . ' ' . $current_user->last_name ); ?></option> |
|
89 | - <option <?php selected( $display_name, $current_user->last_name . ' ' . $current_user->first_name ); ?> |
|
90 | - value="<?php echo esc_attr( $current_user->last_name . ' ' . $current_user->first_name ); ?>"><?php echo esc_html( $current_user->last_name . ' ' . $current_user->first_name ); ?></option> |
|
86 | + <?php if ( ! empty($current_user->first_name) && ! empty($current_user->last_name)): ?> |
|
87 | + <option <?php selected($display_name, $current_user->first_name.' '.$current_user->last_name); ?> |
|
88 | + value="<?php echo esc_attr($current_user->first_name.' '.$current_user->last_name); ?>"><?php echo esc_html($current_user->first_name.' '.$current_user->last_name); ?></option> |
|
89 | + <option <?php selected($display_name, $current_user->last_name.' '.$current_user->first_name); ?> |
|
90 | + value="<?php echo esc_attr($current_user->last_name.' '.$current_user->first_name); ?>"><?php echo esc_html($current_user->last_name.' '.$current_user->first_name); ?></option> |
|
91 | 91 | <?php endif; ?> |
92 | 92 | </select> |
93 | 93 | <?php |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * |
99 | 99 | * @since 1.0 |
100 | 100 | */ |
101 | - do_action( 'give_profile_editor_name' ); |
|
101 | + do_action('give_profile_editor_name'); |
|
102 | 102 | ?> |
103 | 103 | </p> |
104 | 104 | |
@@ -110,16 +110,16 @@ discard block |
||
110 | 110 | * |
111 | 111 | * @since 1.0 |
112 | 112 | */ |
113 | - do_action( 'give_profile_editor_after_name' ); |
|
113 | + do_action('give_profile_editor_after_name'); |
|
114 | 114 | ?> |
115 | 115 | |
116 | 116 | <p class="form-row form-row-last form-row-responsive"> |
117 | 117 | <label for="give_email"> |
118 | - <?php _e( 'Email Address', 'give' ); ?> |
|
118 | + <?php _e('Email Address', 'give'); ?> |
|
119 | 119 | <span class="give-required-indicator ">*</span> |
120 | 120 | </label> |
121 | 121 | <input name="give_email" id="give_email" class="text give-input required" type="email" |
122 | - value="<?php echo esc_attr( $current_user->user_email ); ?>" required aria-required="true"/> |
|
122 | + value="<?php echo esc_attr($current_user->user_email); ?>" required aria-required="true"/> |
|
123 | 123 | <?php |
124 | 124 | /** |
125 | 125 | * Fires in the profile editor shortcode, to the email section. |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * |
129 | 129 | * @since 1.0 |
130 | 130 | */ |
131 | - do_action( 'give_profile_editor_email' ); |
|
131 | + do_action('give_profile_editor_email'); |
|
132 | 132 | ?> |
133 | 133 | </p> |
134 | 134 | |
@@ -140,21 +140,21 @@ discard block |
||
140 | 140 | * |
141 | 141 | * @since 1.0 |
142 | 142 | */ |
143 | - do_action( 'give_profile_editor_after_email' ); |
|
143 | + do_action('give_profile_editor_after_email'); |
|
144 | 144 | ?> |
145 | 145 | |
146 | 146 | <h3 id="give_profile_password_label" |
147 | - class="give-section-break"><?php _e( 'Change your Password', 'give' ); ?></h3> |
|
147 | + class="give-section-break"><?php _e('Change your Password', 'give'); ?></h3> |
|
148 | 148 | |
149 | 149 | <div id="give_profile_password_wrap" class="give-clearfix"> |
150 | 150 | <p id="give_profile_password_wrap_1" class="form-row form-row-first form-row-responsive"> |
151 | - <label for="give_new_user_pass1"><?php _e( 'New Password', 'give' ); ?></label> |
|
151 | + <label for="give_new_user_pass1"><?php _e('New Password', 'give'); ?></label> |
|
152 | 152 | <input name="give_new_user_pass1" id="give_new_user_pass1" class="password give-input" |
153 | 153 | type="password"/> |
154 | 154 | </p> |
155 | 155 | |
156 | 156 | <p id="give_profile_password_wrap_2" class="form-row form-row-last form-row-responsive"> |
157 | - <label for="give_new_user_pass2"><?php _e( 'Re-enter Password', 'give' ); ?></label> |
|
157 | + <label for="give_new_user_pass2"><?php _e('Re-enter Password', 'give'); ?></label> |
|
158 | 158 | <input name="give_new_user_pass2" id="give_new_user_pass2" class="password give-input" |
159 | 159 | type="password"/> |
160 | 160 | <?php |
@@ -165,12 +165,12 @@ discard block |
||
165 | 165 | * |
166 | 166 | * @since 1.0 |
167 | 167 | */ |
168 | - do_action( 'give_profile_editor_password' ); |
|
168 | + do_action('give_profile_editor_password'); |
|
169 | 169 | ?> |
170 | 170 | </p> |
171 | 171 | </div> |
172 | 172 | |
173 | - <p class="give_password_change_notice"><?php _e( 'Please note after changing your password, you must log back in.', 'give' ); ?></p> |
|
173 | + <p class="give_password_change_notice"><?php _e('Please note after changing your password, you must log back in.', 'give'); ?></p> |
|
174 | 174 | |
175 | 175 | <?php |
176 | 176 | /** |
@@ -180,17 +180,17 @@ discard block |
||
180 | 180 | * |
181 | 181 | * @since 1.0 |
182 | 182 | */ |
183 | - do_action( 'give_profile_editor_after_password' ); |
|
183 | + do_action('give_profile_editor_after_password'); |
|
184 | 184 | ?> |
185 | 185 | |
186 | 186 | <p id="give_profile_submit_wrap"> |
187 | 187 | <input type="hidden" name="give_profile_editor_nonce" |
188 | - value="<?php echo wp_create_nonce( 'give-profile-editor-nonce' ); ?>"/> |
|
188 | + value="<?php echo wp_create_nonce('give-profile-editor-nonce'); ?>"/> |
|
189 | 189 | <input type="hidden" name="give_action" value="edit_user_profile"/> |
190 | 190 | <input type="hidden" name="give_redirect" |
191 | - value="<?php echo esc_url( give_get_current_page_url() ); ?>"/> |
|
191 | + value="<?php echo esc_url(give_get_current_page_url()); ?>"/> |
|
192 | 192 | <input name="give_profile_editor_submit" id="give_profile_editor_submit" type="submit" |
193 | - class="give_submit" value="<?php _e( 'Save Changes', 'give' ); ?>"/> |
|
193 | + class="give_submit" value="<?php _e('Save Changes', 'give'); ?>"/> |
|
194 | 194 | </p> |
195 | 195 | |
196 | 196 | </fieldset> |
@@ -205,23 +205,23 @@ discard block |
||
205 | 205 | * |
206 | 206 | * @since 1.0 |
207 | 207 | */ |
208 | - do_action( 'give_profile_editor_after' ); |
|
208 | + do_action('give_profile_editor_after'); |
|
209 | 209 | ?> |
210 | 210 | |
211 | 211 | <?php |
212 | 212 | else : |
213 | - if ( isset( $_GET['updated'] ) && 'true' === $_GET['updated'] && ! give_get_errors() ) { |
|
214 | - if ( isset( $_GET['update_code'] ) ) { |
|
215 | - switch ( $_GET['update_code'] ) { |
|
213 | + if (isset($_GET['updated']) && 'true' === $_GET['updated'] && ! give_get_errors()) { |
|
214 | + if (isset($_GET['update_code'])) { |
|
215 | + switch ($_GET['update_code']) { |
|
216 | 216 | case '2': |
217 | - printf( '<p class="give_success"><strong>%1$s</strong> %2$s</p>', esc_html__( 'Success:', 'give' ), esc_html__( 'Your profile and password has been updated.', 'give' ) ); |
|
218 | - _e( 'Login with your new credentials.', 'give' ); |
|
217 | + printf('<p class="give_success"><strong>%1$s</strong> %2$s</p>', esc_html__('Success:', 'give'), esc_html__('Your profile and password has been updated.', 'give')); |
|
218 | + _e('Login with your new credentials.', 'give'); |
|
219 | 219 | echo give_login_form(); |
220 | 220 | break; |
221 | 221 | |
222 | 222 | case '3': |
223 | - printf( '<p class="give_success"><strong>%1$s</strong> %2$s</p>', esc_html__( 'Success:', 'give' ), esc_html__( 'Your password has been updated.', 'give' ) ); |
|
224 | - _e( 'Login with your new credentials.', 'give' ); |
|
223 | + printf('<p class="give_success"><strong>%1$s</strong> %2$s</p>', esc_html__('Success:', 'give'), esc_html__('Your password has been updated.', 'give')); |
|
224 | + _e('Login with your new credentials.', 'give'); |
|
225 | 225 | echo give_login_form(); |
226 | 226 | break; |
227 | 227 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | } |
231 | 231 | } |
232 | 232 | } else { |
233 | - _e( 'You need to login to edit your profile.', 'give' ); |
|
233 | + _e('You need to login to edit your profile.', 'give'); |
|
234 | 234 | echo give_login_form(); |
235 | 235 | } |
236 | 236 | endif; |
@@ -6,26 +6,26 @@ discard block |
||
6 | 6 | global $give_receipt_args, $payment; |
7 | 7 | |
8 | 8 | // Validation: Ensure $payment var is set. |
9 | -if ( empty( $payment ) ) { |
|
10 | - $payment = ! empty( $give_receipt_args['id'] ) ? get_post( $give_receipt_args['id'] ) : 0; |
|
9 | +if (empty($payment)) { |
|
10 | + $payment = ! empty($give_receipt_args['id']) ? get_post($give_receipt_args['id']) : 0; |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | // Double-Validation: Check for $payment global. |
14 | -if ( empty( $payment ) ) { |
|
15 | - Give()->notices->print_frontend_notice( __( 'The specified receipt ID appears to be invalid.', 'give' ) ); |
|
14 | +if (empty($payment)) { |
|
15 | + Give()->notices->print_frontend_notice(__('The specified receipt ID appears to be invalid.', 'give')); |
|
16 | 16 | |
17 | 17 | return; |
18 | 18 | } |
19 | 19 | |
20 | 20 | $donation_id = $payment->ID; |
21 | -$donation_number = Give()->seq_donation_number->get_serial_code( $payment->ID ); |
|
22 | -$form_id = give_get_payment_meta( $donation_id, '_give_payment_form_id', true ); |
|
23 | -$donation = give_get_donation_form_title( $donation_id ); |
|
24 | -$user = give_get_payment_meta_user_info( $donation_id ); |
|
25 | -$email = give_get_payment_user_email( $donation_id ); |
|
21 | +$donation_number = Give()->seq_donation_number->get_serial_code($payment->ID); |
|
22 | +$form_id = give_get_payment_meta($donation_id, '_give_payment_form_id', true); |
|
23 | +$donation = give_get_donation_form_title($donation_id); |
|
24 | +$user = give_get_payment_meta_user_info($donation_id); |
|
25 | +$email = give_get_payment_user_email($donation_id); |
|
26 | 26 | $status = $payment->post_status; |
27 | -$status_label = give_get_payment_status( $payment, true ); |
|
28 | -$company_name = give_get_payment_meta( $donation_id, '_give_donation_company', true ); |
|
27 | +$status_label = give_get_payment_status($payment, true); |
|
28 | +$company_name = give_get_payment_meta($donation_id, '_give_donation_company', true); |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Generate Donation Receipt Arguments. |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | * @since 1.8.8 |
37 | 37 | */ |
38 | 38 | $give_receipt_args['donation_receipt']['donor'] = array( |
39 | - 'name' => __( 'Donor', 'give' ), |
|
40 | - 'value' => $user['first_name'] . ' ' . $user['last_name'], |
|
39 | + 'name' => __('Donor', 'give'), |
|
40 | + 'value' => $user['first_name'].' '.$user['last_name'], |
|
41 | 41 | 'display' => $give_receipt_args['donor'], |
42 | 42 | ); |
43 | 43 | |
@@ -51,50 +51,50 @@ discard block |
||
51 | 51 | * @return bool show/hide company name in donation receipt page. |
52 | 52 | */ |
53 | 53 | $give_receipt_args['donation_receipt']['company_name'] = array( |
54 | - 'name' => __( 'Company Name', 'give' ), |
|
55 | - 'value' => esc_attr( $company_name ), |
|
54 | + 'name' => __('Company Name', 'give'), |
|
55 | + 'value' => esc_attr($company_name), |
|
56 | 56 | 'display' => $give_receipt_args['company_name'], |
57 | 57 | ); |
58 | 58 | |
59 | 59 | $give_receipt_args['donation_receipt']['date'] = array( |
60 | - 'name' => __( 'Date', 'give' ), |
|
61 | - 'value' => date_i18n( give_date_format(), strtotime( give_get_payment_completed_date( $donation_id ) ) ), |
|
60 | + 'name' => __('Date', 'give'), |
|
61 | + 'value' => date_i18n(give_date_format(), strtotime(give_get_payment_completed_date($donation_id))), |
|
62 | 62 | 'display' => $give_receipt_args['date'], |
63 | 63 | ); |
64 | 64 | |
65 | 65 | $give_receipt_args['donation_receipt']['total_donation'] = array( |
66 | - 'name' => __( 'Total Donation', 'give' ), |
|
67 | - 'value' => give_donation_amount( $donation_id, array( 'currency' => true, 'amount' => true, 'type' => 'receipt' ) ), |
|
66 | + 'name' => __('Total Donation', 'give'), |
|
67 | + 'value' => give_donation_amount($donation_id, array('currency' => true, 'amount' => true, 'type' => 'receipt')), |
|
68 | 68 | 'display' => $give_receipt_args['price'], |
69 | 69 | ); |
70 | 70 | |
71 | 71 | $give_receipt_args['donation_receipt']['donation'] = array( |
72 | - 'name' => __( 'Donation', 'give' ), |
|
72 | + 'name' => __('Donation', 'give'), |
|
73 | 73 | 'value' => $donation, |
74 | 74 | 'display' => true, |
75 | 75 | ); |
76 | 76 | |
77 | 77 | $give_receipt_args['donation_receipt']['donation_status'] = array( |
78 | - 'name' => __( 'Donation Status', 'give' ), |
|
79 | - 'value' => esc_attr( $status_label ), |
|
78 | + 'name' => __('Donation Status', 'give'), |
|
79 | + 'value' => esc_attr($status_label), |
|
80 | 80 | 'display' => $give_receipt_args['payment_status'], |
81 | 81 | ); |
82 | 82 | |
83 | 83 | $give_receipt_args['donation_receipt']['donation_id'] = array( |
84 | - 'name' => __( 'Donation ID', 'give' ), |
|
84 | + 'name' => __('Donation ID', 'give'), |
|
85 | 85 | 'value' => $donation_number, |
86 | 86 | 'display' => $give_receipt_args['payment_id'], |
87 | 87 | ); |
88 | 88 | |
89 | 89 | $give_receipt_args['donation_receipt']['payment_key'] = array( |
90 | - 'name' => __( 'Payment Key', 'give' ), |
|
91 | - 'value' => get_post_meta( $donation_id, '_give_payment_purchase_key', true ), |
|
90 | + 'name' => __('Payment Key', 'give'), |
|
91 | + 'value' => get_post_meta($donation_id, '_give_payment_purchase_key', true), |
|
92 | 92 | 'display' => $give_receipt_args['payment_key'], |
93 | 93 | ); |
94 | 94 | |
95 | 95 | $give_receipt_args['donation_receipt']['payment_method'] = array( |
96 | - 'name' => __( 'Payment Method', 'give' ), |
|
97 | - 'value' => give_get_gateway_checkout_label( give_get_payment_gateway( $donation_id ) ), |
|
96 | + 'name' => __('Payment Method', 'give'), |
|
97 | + 'value' => give_get_gateway_checkout_label(give_get_payment_gateway($donation_id)), |
|
98 | 98 | 'display' => $give_receipt_args['payment_method'], |
99 | 99 | ); |
100 | 100 | |
@@ -109,10 +109,10 @@ discard block |
||
109 | 109 | * |
110 | 110 | * @since 1.8.8 |
111 | 111 | */ |
112 | -$give_receipt_args['donation_receipt'] = apply_filters( 'give_donation_receipt_args', $give_receipt_args['donation_receipt'], $donation_id, $form_id ); |
|
112 | +$give_receipt_args['donation_receipt'] = apply_filters('give_donation_receipt_args', $give_receipt_args['donation_receipt'], $donation_id, $form_id); |
|
113 | 113 | |
114 | 114 | // When the donation were made through offline donation, We won't show receipt and payment status though. |
115 | -if ( 'offline' === give_get_payment_gateway( $payment->ID ) && 'pending' === $status ) { |
|
115 | +if ('offline' === give_get_payment_gateway($payment->ID) && 'pending' === $status) { |
|
116 | 116 | |
117 | 117 | /** |
118 | 118 | * Before the offline donation receipt content starts. |
@@ -122,13 +122,13 @@ discard block |
||
122 | 122 | * @param Give_Payment $payment Donation payment object. |
123 | 123 | * @param array $give_receipt_args Receipt Arguments. |
124 | 124 | */ |
125 | - do_action( 'give_receipt_before_offline_payment', $payment, $give_receipt_args ); |
|
125 | + do_action('give_receipt_before_offline_payment', $payment, $give_receipt_args); |
|
126 | 126 | ?> |
127 | - <h2><?php echo apply_filters( 'give_receipt_offline_payment_heading', __( 'Your Donation is Almost Complete!', 'give' ) ); ?></h2> |
|
128 | - <div id="give_donation_receipt" class="<?php echo esc_attr( apply_filters( 'give_receipt_offline_payment_classes', 'give_receipt_offline_payment' ) ); ?>"> |
|
127 | + <h2><?php echo apply_filters('give_receipt_offline_payment_heading', __('Your Donation is Almost Complete!', 'give')); ?></h2> |
|
128 | + <div id="give_donation_receipt" class="<?php echo esc_attr(apply_filters('give_receipt_offline_payment_classes', 'give_receipt_offline_payment')); ?>"> |
|
129 | 129 | <?php |
130 | 130 | // Instruction for offline donation. |
131 | - $offline_instruction = give_get_offline_payment_instruction( $form_id, true ); |
|
131 | + $offline_instruction = give_get_offline_payment_instruction($form_id, true); |
|
132 | 132 | |
133 | 133 | /** |
134 | 134 | * Instruction for the offline donation. |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | * @param Give_Payment $payment Payment object. |
140 | 140 | * @param integer $form_id Donation form id. |
141 | 141 | */ |
142 | - echo apply_filters( 'give_receipt_offline_payment_instruction', $offline_instruction, $payment, $form_id ); |
|
142 | + echo apply_filters('give_receipt_offline_payment_instruction', $offline_instruction, $payment, $form_id); |
|
143 | 143 | ?> |
144 | 144 | </div> |
145 | 145 | <?php |
@@ -151,52 +151,52 @@ discard block |
||
151 | 151 | * @param Give_Payment $payment Donation payment object. |
152 | 152 | * @param array $give_receipt_args Receipt Arguments. |
153 | 153 | */ |
154 | - do_action( 'give_receipt_after_offline_payment', $payment, $give_receipt_args ); |
|
154 | + do_action('give_receipt_after_offline_payment', $payment, $give_receipt_args); |
|
155 | 155 | |
156 | 156 | return; |
157 | 157 | } |
158 | 158 | |
159 | 159 | // Show payment status notice based on shortcode attribute. |
160 | -if ( filter_var( $give_receipt_args['status_notice'], FILTER_VALIDATE_BOOLEAN ) ) { |
|
160 | +if (filter_var($give_receipt_args['status_notice'], FILTER_VALIDATE_BOOLEAN)) { |
|
161 | 161 | $notice_message = ''; |
162 | 162 | $notice_type = 'warning'; |
163 | 163 | |
164 | - switch ( $status ) { |
|
164 | + switch ($status) { |
|
165 | 165 | case 'publish': |
166 | - $notice_message = __( 'Payment Complete: Thank you for your donation.', 'give' ); |
|
166 | + $notice_message = __('Payment Complete: Thank you for your donation.', 'give'); |
|
167 | 167 | $notice_type = 'success'; |
168 | 168 | break; |
169 | 169 | case 'pending': |
170 | - $notice_message = __( 'Payment Pending: Your donation is currently processing.', 'give' ); |
|
170 | + $notice_message = __('Payment Pending: Your donation is currently processing.', 'give'); |
|
171 | 171 | $notice_type = 'warning'; |
172 | 172 | break; |
173 | 173 | case 'refunded': |
174 | - $notice_message = __( 'Payment Refunded: Your donation has been refunded.', 'give' ); |
|
174 | + $notice_message = __('Payment Refunded: Your donation has been refunded.', 'give'); |
|
175 | 175 | $notice_type = 'warning'; |
176 | 176 | break; |
177 | 177 | case 'preapproval': |
178 | - $notice_message = __( 'Payment Preapproved: Thank you for your donation.', 'give' ); |
|
178 | + $notice_message = __('Payment Preapproved: Thank you for your donation.', 'give'); |
|
179 | 179 | $notice_type = 'warning'; |
180 | 180 | break; |
181 | 181 | case 'failed': |
182 | - $notice_message = __( 'Payment Failed: Please contact the site owner for assistance.', 'give' ); |
|
182 | + $notice_message = __('Payment Failed: Please contact the site owner for assistance.', 'give'); |
|
183 | 183 | $notice_type = 'error'; |
184 | 184 | break; |
185 | 185 | case 'cancelled': |
186 | - $notice_message = __( 'Payment Cancelled: Your donation has been cancelled.', 'give' ); |
|
186 | + $notice_message = __('Payment Cancelled: Your donation has been cancelled.', 'give'); |
|
187 | 187 | $notice_type = 'error'; |
188 | 188 | break; |
189 | 189 | case 'abandoned': |
190 | - $notice_message = __( 'Payment Abandoned: This donation has not been completed.', 'give' ); |
|
190 | + $notice_message = __('Payment Abandoned: This donation has not been completed.', 'give'); |
|
191 | 191 | $notice_type = 'error'; |
192 | 192 | break; |
193 | 193 | case 'revoked': |
194 | - $notice_message = __( 'Payment Revoked: Please contact the site owner for assistance.', 'give' ); |
|
194 | + $notice_message = __('Payment Revoked: Please contact the site owner for assistance.', 'give'); |
|
195 | 195 | $notice_type = 'error'; |
196 | 196 | break; |
197 | 197 | } |
198 | 198 | |
199 | - if ( ! empty( $notice_message ) ) { |
|
199 | + if ( ! empty($notice_message)) { |
|
200 | 200 | /** |
201 | 201 | * Filters payment status notice for receipts. |
202 | 202 | * |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | * @param string $status Payment status. |
212 | 212 | * @param int $donation_id Donation ID. |
213 | 213 | */ |
214 | - echo apply_filters( 'give_receipt_status_notice', Give()->notices->print_frontend_notice( $notice_message, false, $notice_type ), $id, $status, $donation_id ); |
|
214 | + echo apply_filters('give_receipt_status_notice', Give()->notices->print_frontend_notice($notice_message, false, $notice_type), $id, $status, $donation_id); |
|
215 | 215 | } |
216 | 216 | }// End if(). |
217 | 217 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | * @param object $payment The payment object. |
226 | 226 | * @param array $give_receipt_args Receipt_argument. |
227 | 227 | */ |
228 | -do_action( 'give_payment_receipt_before_table', $payment, $give_receipt_args ); |
|
228 | +do_action('give_payment_receipt_before_table', $payment, $give_receipt_args); |
|
229 | 229 | ?> |
230 | 230 | |
231 | 231 | <table id="give_donation_receipt" class="give-table"> |
@@ -241,11 +241,11 @@ discard block |
||
241 | 241 | * @param object $payment The payment object. |
242 | 242 | * @param array $give_receipt_args Receipt_argument. |
243 | 243 | */ |
244 | - do_action( 'give_payment_receipt_header_before', $payment, $give_receipt_args ); |
|
244 | + do_action('give_payment_receipt_header_before', $payment, $give_receipt_args); |
|
245 | 245 | ?> |
246 | 246 | <tr> |
247 | 247 | <th scope="colgroup" colspan="2"> |
248 | - <span class="give-receipt-thead-text"><?php esc_html_e( 'Donation Receipt', 'give' ) ?></span> |
|
248 | + <span class="give-receipt-thead-text"><?php esc_html_e('Donation Receipt', 'give') ?></span> |
|
249 | 249 | </th> |
250 | 250 | </tr> |
251 | 251 | <?php |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | * @param object $payment The payment object. |
260 | 260 | * @param array $give_receipt_args Receipt_argument. |
261 | 261 | */ |
262 | - do_action( 'give_payment_receipt_header_after', $payment, $give_receipt_args ); |
|
262 | + do_action('give_payment_receipt_header_after', $payment, $give_receipt_args); |
|
263 | 263 | ?> |
264 | 264 | </thead> |
265 | 265 | |
@@ -275,11 +275,11 @@ discard block |
||
275 | 275 | * @param object $payment The payment object. |
276 | 276 | * @param array $give_receipt_args Receipt_argument. |
277 | 277 | */ |
278 | - do_action( 'give_payment_receipt_before', $payment, $give_receipt_args ); |
|
278 | + do_action('give_payment_receipt_before', $payment, $give_receipt_args); |
|
279 | 279 | ?> |
280 | 280 | |
281 | - <?php foreach ( $give_receipt_args['donation_receipt'] as $receipt_item ) { ?> |
|
282 | - <?php if ( filter_var( $receipt_item['display'], FILTER_VALIDATE_BOOLEAN ) ) : ?> |
|
281 | + <?php foreach ($give_receipt_args['donation_receipt'] as $receipt_item) { ?> |
|
282 | + <?php if (filter_var($receipt_item['display'], FILTER_VALIDATE_BOOLEAN)) : ?> |
|
283 | 283 | <tr> |
284 | 284 | <td scope="row"><strong><?php echo $receipt_item['name']; ?></strong></td> |
285 | 285 | <td><?php echo $receipt_item['value']; ?></td> |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | * @param object $payment The payment object. |
299 | 299 | * @param array $give_receipt_args Receipt_argument. |
300 | 300 | */ |
301 | - do_action( 'give_payment_receipt_after', $payment, $give_receipt_args ); |
|
301 | + do_action('give_payment_receipt_after', $payment, $give_receipt_args); |
|
302 | 302 | ?> |
303 | 303 | </tbody> |
304 | 304 | </table> |
@@ -314,5 +314,5 @@ discard block |
||
314 | 314 | * @param object $payment The payment object. |
315 | 315 | * @param array $give_receipt_args Receipt_argument. |
316 | 316 | */ |
317 | -do_action( 'give_payment_receipt_after_table', $payment, $give_receipt_args ); |
|
317 | +do_action('give_payment_receipt_after_table', $payment, $give_receipt_args); |
|
318 | 318 | ?> |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | */ |
5 | 5 | |
6 | 6 | // Exit if accessed directly. |
7 | -if ( ! defined( 'ABSPATH' ) ) { |
|
7 | +if ( ! defined('ABSPATH')) { |
|
8 | 8 | exit; |
9 | 9 | } |
10 | 10 | |
@@ -19,16 +19,16 @@ discard block |
||
19 | 19 | <div class="give-grid__item"> |
20 | 20 | <?php |
21 | 21 | // Print the opening anchor tag based on display style. |
22 | - if ( 'redirect' === $atts['display_style'] ) { |
|
22 | + if ('redirect' === $atts['display_style']) { |
|
23 | 23 | printf( |
24 | 24 | '<a id="give-card-%1$s" class="give-card" href="%2$s">', |
25 | - esc_attr( $form_id ), |
|
26 | - esc_attr( get_the_permalink() ) |
|
25 | + esc_attr($form_id), |
|
26 | + esc_attr(get_the_permalink()) |
|
27 | 27 | ); |
28 | - } elseif ( 'modal_reveal' === $atts['display_style'] ) { |
|
28 | + } elseif ('modal_reveal' === $atts['display_style']) { |
|
29 | 29 | printf( |
30 | 30 | '<a id="give-card-%1$s" class="give-card js-give-grid-modal-launcher" data-effect="mfp-zoom-out" href="#give-modal-form-%1$s">', |
31 | - esc_attr( $form_id ) |
|
31 | + esc_attr($form_id) |
|
32 | 32 | ); |
33 | 33 | } |
34 | 34 | ?> |
@@ -36,46 +36,46 @@ discard block |
||
36 | 36 | <div class="give-card__body"> |
37 | 37 | <?php |
38 | 38 | // Maybe display the form title. |
39 | - if ( true === $atts['show_title'] ) { |
|
40 | - the_title( '<h3 class="give-card__title">', '</h3>' ); |
|
39 | + if (true === $atts['show_title']) { |
|
40 | + the_title('<h3 class="give-card__title">', '</h3>'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | // Maybe display the form excerpt. |
44 | - if ( true === $atts['show_excerpt'] ) { |
|
45 | - if ( has_excerpt( $form_id ) ) { |
|
44 | + if (true === $atts['show_excerpt']) { |
|
45 | + if (has_excerpt($form_id)) { |
|
46 | 46 | // Get excerpt from the form post's excerpt field. |
47 | - $raw_content = get_the_excerpt( $form_id ); |
|
47 | + $raw_content = get_the_excerpt($form_id); |
|
48 | 48 | $stripped_content = wp_strip_all_tags( |
49 | - strip_shortcodes( $raw_content ) |
|
49 | + strip_shortcodes($raw_content) |
|
50 | 50 | ); |
51 | 51 | } else { |
52 | 52 | // Get content from the form post's content field. |
53 | - $raw_content = give_get_meta( $form_id, '_give_form_content', true ); |
|
53 | + $raw_content = give_get_meta($form_id, '_give_form_content', true); |
|
54 | 54 | |
55 | - if ( ! empty( $raw_content ) ) { |
|
55 | + if ( ! empty($raw_content)) { |
|
56 | 56 | $stripped_content = wp_strip_all_tags( |
57 | - strip_shortcodes( $raw_content ) |
|
57 | + strip_shortcodes($raw_content) |
|
58 | 58 | ); |
59 | 59 | } |
60 | 60 | } |
61 | 61 | |
62 | 62 | // Maybe truncate excerpt. |
63 | - if ( 0 < $atts['excerpt_length'] ) { |
|
64 | - $excerpt = wp_trim_words( $stripped_content, $atts['excerpt_length'] ); |
|
63 | + if (0 < $atts['excerpt_length']) { |
|
64 | + $excerpt = wp_trim_words($stripped_content, $atts['excerpt_length']); |
|
65 | 65 | } else { |
66 | 66 | $excerpt = $stripped_content; |
67 | 67 | } |
68 | 68 | |
69 | - printf( '<p class="give-card__text">%s</p>', $excerpt ); |
|
69 | + printf('<p class="give-card__text">%s</p>', $excerpt); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | // Maybe display the goal progess bar. |
73 | 73 | if ( |
74 | - give_is_setting_enabled( get_post_meta( $form_id, '_give_goal_option', true ) ) |
|
74 | + give_is_setting_enabled(get_post_meta($form_id, '_give_goal_option', true)) |
|
75 | 75 | && true === $atts['show_goal'] |
76 | 76 | ) { |
77 | 77 | echo '<div class="give-card__progress">'; |
78 | - give_show_goal_progress( $form_id ); |
|
78 | + give_show_goal_progress($form_id); |
|
79 | 79 | echo '</div>'; |
80 | 80 | } |
81 | 81 | ?> |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | <?php |
85 | 85 | // Maybe display the featured image. |
86 | 86 | if ( |
87 | - give_is_setting_enabled( $give_settings['form_featured_img'] ) |
|
87 | + give_is_setting_enabled($give_settings['form_featured_img']) |
|
88 | 88 | && has_post_thumbnail() |
89 | 89 | && true === $atts['show_featured_image'] |
90 | 90 | ) { |
@@ -94,28 +94,28 @@ discard block |
||
94 | 94 | * @param string The image size. |
95 | 95 | * @param array Form grid attributes. |
96 | 96 | */ |
97 | - $image_size = apply_filters( 'give_form_grid_image_size', $atts['image_size'], $atts ); |
|
97 | + $image_size = apply_filters('give_form_grid_image_size', $atts['image_size'], $atts); |
|
98 | 98 | $image_attr = ''; |
99 | 99 | |
100 | 100 | echo '<div class="give-card__media">'; |
101 | - if ( 'auto' !== $atts['image_height'] ) { |
|
101 | + if ('auto' !== $atts['image_height']) { |
|
102 | 102 | $image_attr = array( |
103 | - 'style' => 'height: ' . $atts['image_height'], |
|
103 | + 'style' => 'height: '.$atts['image_height'], |
|
104 | 104 | ); |
105 | 105 | } |
106 | - the_post_thumbnail( $image_size, $image_attr ); |
|
106 | + the_post_thumbnail($image_size, $image_attr); |
|
107 | 107 | echo '</div>'; |
108 | 108 | } |
109 | 109 | ?> |
110 | 110 | </a> |
111 | 111 | <?php |
112 | 112 | // If modal, print form in hidden container until it is time to be revealed. |
113 | - if ( 'modal_reveal' === $atts['display_style'] ) { |
|
113 | + if ('modal_reveal' === $atts['display_style']) { |
|
114 | 114 | printf( |
115 | 115 | '<div id="give-modal-form-%1$s" class="give-donation-grid-item-form give-modal--slide mfp-hide">', |
116 | 116 | $form_id |
117 | 117 | ); |
118 | - give_get_donation_form( $form_id ); |
|
118 | + give_get_donation_form($form_id); |
|
119 | 119 | echo '</div>'; |
120 | 120 | } |
121 | 121 | ?> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
@@ -26,14 +26,14 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @return void |
28 | 28 | */ |
29 | -function give_email_donation_receipt( $payment_id, $admin_notice = true ) { |
|
29 | +function give_email_donation_receipt($payment_id, $admin_notice = true) { |
|
30 | 30 | /** |
31 | 31 | * Fire the action |
32 | 32 | */ |
33 | - do_action( 'give_donation-receipt_email_notification', $payment_id ); |
|
33 | + do_action('give_donation-receipt_email_notification', $payment_id); |
|
34 | 34 | |
35 | 35 | // If admin notifications are on, send the admin notice. |
36 | - if ( $admin_notice && give_is_setting_enabled( Give_Email_Notification::get_instance('new-donation' )->get_notification_status() ) ) { |
|
36 | + if ($admin_notice && give_is_setting_enabled(Give_Email_Notification::get_instance('new-donation')->get_notification_status())) { |
|
37 | 37 | /** |
38 | 38 | * Fires in the donation email receipt. |
39 | 39 | * |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * @param int $payment_id Payment id. |
45 | 45 | * @param mixed $payment_data Payment meta data. |
46 | 46 | */ |
47 | - do_action( 'give_new-donation_email_notification', $payment_id, give_get_payment_meta( $payment_id ) ); |
|
47 | + do_action('give_new-donation_email_notification', $payment_id, give_get_payment_meta($payment_id)); |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * |
58 | 58 | * @return void |
59 | 59 | */ |
60 | -function give_admin_email_notice( $payment_id ) { |
|
60 | +function give_admin_email_notice($payment_id) { |
|
61 | 61 | /** |
62 | 62 | * Fires in the donation email receipt. |
63 | 63 | * |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | * @param int $payment_id Payment id. |
69 | 69 | * @param mixed $payment_data Payment meta data. |
70 | 70 | */ |
71 | - do_action( 'give_new-donation_email_notification', $payment_id ); |
|
71 | + do_action('give_new-donation_email_notification', $payment_id); |
|
72 | 72 | } |
73 | 73 | |
74 | -add_action( 'give_admin_donation_email', 'give_admin_email_notice' ); |
|
74 | +add_action('give_admin_donation_email', 'give_admin_email_notice'); |
|
75 | 75 | |
76 | 76 | |
77 | 77 | /** |
@@ -84,16 +84,16 @@ discard block |
||
84 | 84 | */ |
85 | 85 | function give_get_default_donation_notification_email() { |
86 | 86 | |
87 | - $default_email_body = __( 'Hi there,', 'give' ) . "\n\n"; |
|
88 | - $default_email_body .= __( 'This email is to inform you that a new donation has been made on your website:', 'give' ) . ' <a href="' . get_bloginfo( 'url' ) . '" target="_blank">' . get_bloginfo( 'url' ) . '</a>' . ".\n\n"; |
|
89 | - $default_email_body .= '<strong>' . __( 'Donor:', 'give' ) . '</strong> {name}' . "\n"; |
|
90 | - $default_email_body .= '<strong>' . __( 'Donation:', 'give' ) . '</strong> {donation}' . "\n"; |
|
91 | - $default_email_body .= '<strong>' . __( 'Amount:', 'give' ) . '</strong> {amount}' . "\n"; |
|
92 | - $default_email_body .= '<strong>' . __( 'Payment Method:', 'give' ) . '</strong> {payment_method}' . "\n\n"; |
|
93 | - $default_email_body .= __( 'Thank you,', 'give' ) . "\n\n"; |
|
94 | - $default_email_body .= '{sitename}' . "\n"; |
|
87 | + $default_email_body = __('Hi there,', 'give')."\n\n"; |
|
88 | + $default_email_body .= __('This email is to inform you that a new donation has been made on your website:', 'give').' <a href="'.get_bloginfo('url').'" target="_blank">'.get_bloginfo('url').'</a>'.".\n\n"; |
|
89 | + $default_email_body .= '<strong>'.__('Donor:', 'give').'</strong> {name}'."\n"; |
|
90 | + $default_email_body .= '<strong>'.__('Donation:', 'give').'</strong> {donation}'."\n"; |
|
91 | + $default_email_body .= '<strong>'.__('Amount:', 'give').'</strong> {amount}'."\n"; |
|
92 | + $default_email_body .= '<strong>'.__('Payment Method:', 'give').'</strong> {payment_method}'."\n\n"; |
|
93 | + $default_email_body .= __('Thank you,', 'give')."\n\n"; |
|
94 | + $default_email_body .= '{sitename}'."\n"; |
|
95 | 95 | |
96 | - return apply_filters( 'give_default_donation_notification_email', $default_email_body ); |
|
96 | + return apply_filters('give_default_donation_notification_email', $default_email_body); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | |
@@ -107,21 +107,21 @@ discard block |
||
107 | 107 | */ |
108 | 108 | function give_get_default_donation_receipt_email() { |
109 | 109 | |
110 | - $default_email_body = __( 'Dear', 'give' ) . " {name},\n\n"; |
|
111 | - $default_email_body .= __( 'Thank you for your donation. Your generosity is appreciated! Here are the details of your donation:', 'give' ) . "\n\n"; |
|
112 | - $default_email_body .= '<strong>' . __( 'Donor:', 'give' ) . '</strong> {fullname}' . "\n"; |
|
113 | - $default_email_body .= '<strong>' . __( 'Donation:', 'give' ) . '</strong> {donation}' . "\n"; |
|
114 | - $default_email_body .= '<strong>' . __( 'Donation Date:', 'give' ) . '</strong> {date}' . "\n"; |
|
115 | - $default_email_body .= '<strong>' . __( 'Amount:', 'give' ) . '</strong> {amount}' . "\n"; |
|
116 | - $default_email_body .= '<strong>' . __( 'Payment Method:', 'give' ) . '</strong> {payment_method}' . "\n"; |
|
117 | - $default_email_body .= '<strong>' . __( 'Payment ID:', 'give' ) . '</strong> {payment_id}' . "\n"; |
|
118 | - $default_email_body .= '<strong>' . __( 'Receipt ID:', 'give' ) . '</strong> {receipt_id}' . "\n\n"; |
|
119 | - $default_email_body .= '{receipt_link}' . "\n\n"; |
|
110 | + $default_email_body = __('Dear', 'give')." {name},\n\n"; |
|
111 | + $default_email_body .= __('Thank you for your donation. Your generosity is appreciated! Here are the details of your donation:', 'give')."\n\n"; |
|
112 | + $default_email_body .= '<strong>'.__('Donor:', 'give').'</strong> {fullname}'."\n"; |
|
113 | + $default_email_body .= '<strong>'.__('Donation:', 'give').'</strong> {donation}'."\n"; |
|
114 | + $default_email_body .= '<strong>'.__('Donation Date:', 'give').'</strong> {date}'."\n"; |
|
115 | + $default_email_body .= '<strong>'.__('Amount:', 'give').'</strong> {amount}'."\n"; |
|
116 | + $default_email_body .= '<strong>'.__('Payment Method:', 'give').'</strong> {payment_method}'."\n"; |
|
117 | + $default_email_body .= '<strong>'.__('Payment ID:', 'give').'</strong> {payment_id}'."\n"; |
|
118 | + $default_email_body .= '<strong>'.__('Receipt ID:', 'give').'</strong> {receipt_id}'."\n\n"; |
|
119 | + $default_email_body .= '{receipt_link}'."\n\n"; |
|
120 | 120 | $default_email_body .= "\n\n"; |
121 | - $default_email_body .= __( 'Sincerely,', 'give' ) . "\n"; |
|
122 | - $default_email_body .= '{sitename}' . "\n"; |
|
121 | + $default_email_body .= __('Sincerely,', 'give')."\n"; |
|
122 | + $default_email_body .= '{sitename}'."\n"; |
|
123 | 123 | |
124 | - return apply_filters( 'give_default_donation_receipt_email', $default_email_body ); |
|
124 | + return apply_filters('give_default_donation_receipt_email', $default_email_body); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -134,22 +134,22 @@ discard block |
||
134 | 134 | * |
135 | 135 | * @return array $email_names |
136 | 136 | */ |
137 | -function give_get_email_names( $user_info, $payment = false ) { |
|
137 | +function give_get_email_names($user_info, $payment = false) { |
|
138 | 138 | $email_names = array(); |
139 | 139 | |
140 | - if ( is_a( $payment, 'Give_Payment' ) ) { |
|
140 | + if (is_a($payment, 'Give_Payment')) { |
|
141 | 141 | |
142 | - if ( $payment->user_id > 0 ) { |
|
142 | + if ($payment->user_id > 0) { |
|
143 | 143 | |
144 | - $user_data = get_userdata( $payment->user_id ); |
|
144 | + $user_data = get_userdata($payment->user_id); |
|
145 | 145 | $email_names['name'] = $payment->first_name; |
146 | - $email_names['fullname'] = trim( $payment->first_name . ' ' . $payment->last_name ); |
|
146 | + $email_names['fullname'] = trim($payment->first_name.' '.$payment->last_name); |
|
147 | 147 | $email_names['username'] = $user_data->user_login; |
148 | 148 | |
149 | - } elseif ( ! empty( $payment->first_name ) ) { |
|
149 | + } elseif ( ! empty($payment->first_name)) { |
|
150 | 150 | |
151 | 151 | $email_names['name'] = $payment->first_name; |
152 | - $email_names['fullname'] = trim( $payment->first_name . ' ' . $payment->last_name ); |
|
152 | + $email_names['fullname'] = trim($payment->first_name.' '.$payment->last_name); |
|
153 | 153 | $email_names['username'] = $payment->first_name; |
154 | 154 | |
155 | 155 | } else { |
@@ -162,30 +162,30 @@ discard block |
||
162 | 162 | } else { |
163 | 163 | |
164 | 164 | // Support for old serialized data. |
165 | - if ( is_serialized( $user_info ) ) { |
|
165 | + if (is_serialized($user_info)) { |
|
166 | 166 | |
167 | 167 | // Security check. |
168 | - preg_match( '/[oO]\s*:\s*\d+\s*:\s*"\s*(?!(?i)(stdClass))/', $user_info, $matches ); |
|
169 | - if ( ! empty( $matches ) ) { |
|
168 | + preg_match('/[oO]\s*:\s*\d+\s*:\s*"\s*(?!(?i)(stdClass))/', $user_info, $matches); |
|
169 | + if ( ! empty($matches)) { |
|
170 | 170 | return array( |
171 | 171 | 'name' => '', |
172 | 172 | 'fullname' => '', |
173 | 173 | 'username' => '', |
174 | 174 | ); |
175 | 175 | } else { |
176 | - $user_info = maybe_unserialize( $user_info ); |
|
176 | + $user_info = maybe_unserialize($user_info); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | } |
180 | 180 | |
181 | - if ( isset( $user_info['id'] ) && $user_info['id'] > 0 && isset( $user_info['first_name'] ) ) { |
|
182 | - $user_data = get_userdata( $user_info['id'] ); |
|
181 | + if (isset($user_info['id']) && $user_info['id'] > 0 && isset($user_info['first_name'])) { |
|
182 | + $user_data = get_userdata($user_info['id']); |
|
183 | 183 | $email_names['name'] = $user_info['first_name']; |
184 | - $email_names['fullname'] = $user_info['first_name'] . ' ' . $user_info['last_name']; |
|
184 | + $email_names['fullname'] = $user_info['first_name'].' '.$user_info['last_name']; |
|
185 | 185 | $email_names['username'] = $user_data->user_login; |
186 | - } elseif ( isset( $user_info['first_name'] ) ) { |
|
186 | + } elseif (isset($user_info['first_name'])) { |
|
187 | 187 | $email_names['name'] = $user_info['first_name']; |
188 | - $email_names['fullname'] = $user_info['first_name'] . ' ' . $user_info['last_name']; |
|
188 | + $email_names['fullname'] = $user_info['first_name'].' '.$user_info['last_name']; |
|
189 | 189 | $email_names['username'] = $user_info['first_name']; |
190 | 190 | } else { |
191 | 191 | $email_names['name'] = $user_info['email']; |
@@ -205,37 +205,37 @@ discard block |
||
205 | 205 | * |
206 | 206 | * @since 1.8.14 |
207 | 207 | */ |
208 | -function give_admin_email_user_donor_disconnection( $user_id, $donor_id ) { |
|
208 | +function give_admin_email_user_donor_disconnection($user_id, $donor_id) { |
|
209 | 209 | |
210 | - $user_id = absint( $user_id ); |
|
211 | - $donor_id = absint( $donor_id ); |
|
210 | + $user_id = absint($user_id); |
|
211 | + $donor_id = absint($donor_id); |
|
212 | 212 | |
213 | 213 | // Bail Out, if user id doesn't exists. |
214 | - if ( empty( $user_id ) ) { |
|
214 | + if (empty($user_id)) { |
|
215 | 215 | return; |
216 | 216 | } |
217 | 217 | |
218 | 218 | // Bail Out, if donor id doesn't exists. |
219 | - if ( empty( $donor_id ) ) { |
|
219 | + if (empty($donor_id)) { |
|
220 | 220 | return; |
221 | 221 | } |
222 | 222 | |
223 | - $from_name = give_get_option( 'from_name', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) ); |
|
223 | + $from_name = give_get_option('from_name', wp_specialchars_decode(get_bloginfo('name'), ENT_QUOTES)); |
|
224 | 224 | |
225 | - $from_email = give_get_option( 'from_email', get_bloginfo( 'admin_email' ) ); |
|
225 | + $from_email = give_get_option('from_email', get_bloginfo('admin_email')); |
|
226 | 226 | |
227 | 227 | /* translators: %s: payment id */ |
228 | - $subject = __( 'Attention: User tries to login whose Donor profile is disconnected!', 'give' ); |
|
228 | + $subject = __('Attention: User tries to login whose Donor profile is disconnected!', 'give'); |
|
229 | 229 | |
230 | 230 | /** |
231 | 231 | * Filters the Donor-User Disconnection notification subject. |
232 | 232 | * |
233 | 233 | * @since 1.8.14 |
234 | 234 | */ |
235 | - $subject = apply_filters( 'give_admin_donor_user_disconnection_notification_subject', wp_strip_all_tags( $subject ) ); |
|
235 | + $subject = apply_filters('give_admin_donor_user_disconnection_notification_subject', wp_strip_all_tags($subject)); |
|
236 | 236 | |
237 | - $headers = "From: " . stripslashes_deep( html_entity_decode( $from_name, ENT_COMPAT, 'UTF-8' ) ) . " <$from_email>\r\n"; |
|
238 | - $headers .= "Reply-To: " . $from_email . "\r\n"; |
|
237 | + $headers = "From: ".stripslashes_deep(html_entity_decode($from_name, ENT_COMPAT, 'UTF-8'))." <$from_email>\r\n"; |
|
238 | + $headers .= "Reply-To: ".$from_email."\r\n"; |
|
239 | 239 | $headers .= "Content-Type: text/html; charset=utf-8\r\n"; |
240 | 240 | |
241 | 241 | /** |
@@ -243,25 +243,25 @@ discard block |
||
243 | 243 | * |
244 | 244 | * @since 1.8.14 |
245 | 245 | */ |
246 | - $headers = apply_filters( 'give_admin_donor_user_disconnection_notification_headers', $headers ); |
|
246 | + $headers = apply_filters('give_admin_donor_user_disconnection_notification_headers', $headers); |
|
247 | 247 | |
248 | - $message = __( 'Hi Admin,', 'give' ) . "\n\n"; |
|
249 | - $message .= __( 'This email is to inform you that a user has tried logging in. But, User was unable to login due to User-Donor profile disconnection.', 'give' ) . "\n\n"; |
|
250 | - $message .= __( 'Do you want to reconnect User and Donor profile again?', 'give' ) . "\n\n"; |
|
248 | + $message = __('Hi Admin,', 'give')."\n\n"; |
|
249 | + $message .= __('This email is to inform you that a user has tried logging in. But, User was unable to login due to User-Donor profile disconnection.', 'give')."\n\n"; |
|
250 | + $message .= __('Do you want to reconnect User and Donor profile again?', 'give')."\n\n"; |
|
251 | 251 | $message .= sprintf( |
252 | 252 | '<a href="%1$s">%2$s</a>', |
253 | - esc_url( admin_url() . 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $donor_id . '&user_id=' . $user_id . '&give-message=reconnect-user' ), |
|
254 | - __( 'Reconnect User', 'give' ) . "\n\n" |
|
253 | + esc_url(admin_url().'edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$donor_id.'&user_id='.$user_id.'&give-message=reconnect-user'), |
|
254 | + __('Reconnect User', 'give')."\n\n" |
|
255 | 255 | ); |
256 | - $message .= __( 'Thank you,', 'give' ) . "\n\n"; |
|
257 | - $message .= '{sitename}' . "\n"; |
|
256 | + $message .= __('Thank you,', 'give')."\n\n"; |
|
257 | + $message .= '{sitename}'."\n"; |
|
258 | 258 | |
259 | 259 | $emails = Give()->emails; |
260 | - $emails->__set( 'from_name', $from_name ); |
|
261 | - $emails->__set( 'from_email', $from_email ); |
|
262 | - $emails->__set( 'headers', $headers ); |
|
263 | - $emails->__set( 'heading', __( 'User - Donor Profile Disconnection', 'give' ) ); |
|
260 | + $emails->__set('from_name', $from_name); |
|
261 | + $emails->__set('from_email', $from_email); |
|
262 | + $emails->__set('headers', $headers); |
|
263 | + $emails->__set('heading', __('User - Donor Profile Disconnection', 'give')); |
|
264 | 264 | |
265 | - $emails->send( give_get_admin_notice_emails(), $subject, give_do_email_tags( $message ) ); |
|
265 | + $emails->send(give_get_admin_notice_emails(), $subject, give_do_email_tags($message)); |
|
266 | 266 | |
267 | 267 | } |
@@ -9,11 +9,11 @@ discard block |
||
9 | 9 | * @since 1.8 |
10 | 10 | */ |
11 | 11 | |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if ( ! defined('ABSPATH')) { |
|
13 | 13 | exit; // Exit if accessed directly |
14 | 14 | } |
15 | 15 | |
16 | -if ( ! class_exists( 'Give_Settings_Advanced' ) ) : |
|
16 | +if ( ! class_exists('Give_Settings_Advanced')) : |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Give_Settings_Advanced. |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function __construct() { |
29 | 29 | $this->id = 'advanced'; |
30 | - $this->label = __( 'Advanced', 'give' ); |
|
30 | + $this->label = __('Advanced', 'give'); |
|
31 | 31 | |
32 | 32 | $this->default_tab = 'advanced-options'; |
33 | 33 | |
34 | - if ( $this->id === give_get_current_setting_tab() ) { |
|
35 | - add_action( 'give_admin_field_remove_cache_button', array( $this, 'render_remove_cache_button' ), 10, 1 ); |
|
34 | + if ($this->id === give_get_current_setting_tab()) { |
|
35 | + add_action('give_admin_field_remove_cache_button', array($this, 'render_remove_cache_button'), 10, 1); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | parent::__construct(); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | $current_section = give_get_current_setting_section(); |
51 | 51 | |
52 | - switch ( $current_section ) { |
|
52 | + switch ($current_section) { |
|
53 | 53 | case 'advanced-options': |
54 | 54 | $settings = array( |
55 | 55 | array( |
@@ -57,19 +57,19 @@ discard block |
||
57 | 57 | 'type' => 'title', |
58 | 58 | ), |
59 | 59 | array( |
60 | - 'name' => __( 'Remove Data on Uninstall', 'give' ), |
|
61 | - 'desc' => __( 'When the plugin is deleted, completely remove all Give data. This includes all Give settings, forms, form meta, donor, donor data, donations. Everything.', 'give' ), |
|
60 | + 'name' => __('Remove Data on Uninstall', 'give'), |
|
61 | + 'desc' => __('When the plugin is deleted, completely remove all Give data. This includes all Give settings, forms, form meta, donor, donor data, donations. Everything.', 'give'), |
|
62 | 62 | 'id' => 'uninstall_on_delete', |
63 | 63 | 'type' => 'radio_inline', |
64 | 64 | 'default' => 'disabled', |
65 | 65 | 'options' => array( |
66 | - 'enabled' => __( 'Yes, Remove all data', 'give' ), |
|
67 | - 'disabled' => __( 'No, keep my Give settings and donation data', 'give' ), |
|
66 | + 'enabled' => __('Yes, Remove all data', 'give'), |
|
67 | + 'disabled' => __('No, keep my Give settings and donation data', 'give'), |
|
68 | 68 | ), |
69 | 69 | ), |
70 | 70 | array( |
71 | - 'name' => __( 'Default User Role', 'give' ), |
|
72 | - 'desc' => __( 'Assign default user roles for donors when donors opt to register as a WP User.', 'give' ), |
|
71 | + 'name' => __('Default User Role', 'give'), |
|
72 | + 'desc' => __('Assign default user roles for donors when donors opt to register as a WP User.', 'give'), |
|
73 | 73 | 'id' => 'donor_default_user_role', |
74 | 74 | 'type' => 'select', |
75 | 75 | 'default' => 'give_donor', |
@@ -77,51 +77,51 @@ discard block |
||
77 | 77 | ), |
78 | 78 | array( |
79 | 79 | /* translators: %s: the_content */ |
80 | - 'name' => sprintf( __( '%s filter', 'give' ), '<code>the_content</code>' ), |
|
80 | + 'name' => sprintf(__('%s filter', 'give'), '<code>the_content</code>'), |
|
81 | 81 | /* translators: 1: https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content 2: the_content */ |
82 | - 'desc' => sprintf( __( 'If you are seeing extra social buttons, related posts, or other unwanted elements appearing within your forms then you can disable WordPress\' content filter. <a href="%1$s" target="_blank">Learn more</a> about %2$s filter.', 'give' ), esc_url( 'https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content' ), '<code>the_content</code>' ), |
|
82 | + 'desc' => sprintf(__('If you are seeing extra social buttons, related posts, or other unwanted elements appearing within your forms then you can disable WordPress\' content filter. <a href="%1$s" target="_blank">Learn more</a> about %2$s filter.', 'give'), esc_url('https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content'), '<code>the_content</code>'), |
|
83 | 83 | 'id' => 'the_content_filter', |
84 | 84 | 'default' => 'enabled', |
85 | 85 | 'type' => 'radio_inline', |
86 | 86 | 'options' => array( |
87 | - 'enabled' => __( 'Enabled', 'give' ), |
|
88 | - 'disabled' => __( 'Disabled', 'give' ), |
|
87 | + 'enabled' => __('Enabled', 'give'), |
|
88 | + 'disabled' => __('Disabled', 'give'), |
|
89 | 89 | ), |
90 | 90 | ), |
91 | 91 | array( |
92 | - 'name' => __( 'Script Loading Location', 'give' ), |
|
93 | - 'desc' => __( 'This allows you to load your Give scripts either in the <code><head></code> or footer of your website.', 'give' ), |
|
92 | + 'name' => __('Script Loading Location', 'give'), |
|
93 | + 'desc' => __('This allows you to load your Give scripts either in the <code><head></code> or footer of your website.', 'give'), |
|
94 | 94 | 'id' => 'scripts_footer', |
95 | 95 | 'type' => 'radio_inline', |
96 | 96 | 'default' => 'disabled', |
97 | 97 | 'options' => array( |
98 | - 'disabled' => __( 'Head', 'give' ), |
|
99 | - 'enabled' => __( 'Footer', 'give' ), |
|
98 | + 'disabled' => __('Head', 'give'), |
|
99 | + 'enabled' => __('Footer', 'give'), |
|
100 | 100 | ), |
101 | 101 | ), |
102 | 102 | array( |
103 | - 'name' => __( 'Akismet SPAM Protection', 'give' ), |
|
104 | - 'desc' => __( 'Add a layer of SPAM protection to your donation submissions with Akismet. When enabled, donation submissions will be first sent to Akismet\'s API if you have the plugin activated and configured.', 'give' ), |
|
103 | + 'name' => __('Akismet SPAM Protection', 'give'), |
|
104 | + 'desc' => __('Add a layer of SPAM protection to your donation submissions with Akismet. When enabled, donation submissions will be first sent to Akismet\'s API if you have the plugin activated and configured.', 'give'), |
|
105 | 105 | 'id' => 'akismet_spam_protection', |
106 | 106 | 'type' => 'radio_inline', |
107 | - 'default' => ( give_check_akismet_key() ) ? 'enabled' : 'disabled', |
|
107 | + 'default' => (give_check_akismet_key()) ? 'enabled' : 'disabled', |
|
108 | 108 | 'options' => array( |
109 | - 'enabled' => __( 'Enabled', 'give' ), |
|
110 | - 'disabled' => __( 'Disabled', 'give' ), |
|
109 | + 'enabled' => __('Enabled', 'give'), |
|
110 | + 'disabled' => __('Disabled', 'give'), |
|
111 | 111 | ), |
112 | 112 | ), |
113 | 113 | array( |
114 | 114 | 'name' => 'Give Cache', |
115 | 115 | 'id' => 'give-clear-cache', |
116 | - 'buttonTitle' => __( 'Clear Cache', 'give' ), |
|
117 | - 'desc' => __( 'Click this button if you want to clear Give\'s cache. The plugin stores common settings and queries in cache to optimize performance. Clearing cache will remove and begin rebuilding these saved queries.', 'give' ), |
|
116 | + 'buttonTitle' => __('Clear Cache', 'give'), |
|
117 | + 'desc' => __('Click this button if you want to clear Give\'s cache. The plugin stores common settings and queries in cache to optimize performance. Clearing cache will remove and begin rebuilding these saved queries.', 'give'), |
|
118 | 118 | 'type' => 'remove_cache_button' |
119 | 119 | ), |
120 | 120 | array( |
121 | - 'name' => __( 'Advanced Settings Docs Link', 'give' ), |
|
121 | + 'name' => __('Advanced Settings Docs Link', 'give'), |
|
122 | 122 | 'id' => 'advanced_settings_docs_link', |
123 | - 'url' => esc_url( 'http://docs.givewp.com/settings-advanced' ), |
|
124 | - 'title' => __( 'Advanced Settings', 'give' ), |
|
123 | + 'url' => esc_url('http://docs.givewp.com/settings-advanced'), |
|
124 | + 'title' => __('Advanced Settings', 'give'), |
|
125 | 125 | 'type' => 'give_docs_link', |
126 | 126 | ), |
127 | 127 | array( |
@@ -137,20 +137,20 @@ discard block |
||
137 | 137 | * |
138 | 138 | * @since 2.0 |
139 | 139 | */ |
140 | - if ( apply_filters( 'give_settings_advanced_show_cache_setting', false ) ) { |
|
141 | - array_splice( $settings, 1, 0, array( |
|
140 | + if (apply_filters('give_settings_advanced_show_cache_setting', false)) { |
|
141 | + array_splice($settings, 1, 0, array( |
|
142 | 142 | array( |
143 | - 'name' => __( 'Cache', 'give' ), |
|
144 | - 'desc' => __( 'If caching is enabled the plugin will start caching custom post type related queries and reduce the overall load time.', 'give' ), |
|
143 | + 'name' => __('Cache', 'give'), |
|
144 | + 'desc' => __('If caching is enabled the plugin will start caching custom post type related queries and reduce the overall load time.', 'give'), |
|
145 | 145 | 'id' => 'cache', |
146 | 146 | 'type' => 'radio_inline', |
147 | 147 | 'default' => 'enabled', |
148 | 148 | 'options' => array( |
149 | - 'enabled' => __( 'Enabled', 'give' ), |
|
150 | - 'disabled' => __( 'Disabled', 'give' ), |
|
149 | + 'enabled' => __('Enabled', 'give'), |
|
150 | + 'disabled' => __('Disabled', 'give'), |
|
151 | 151 | ), |
152 | 152 | ) |
153 | - ) ); |
|
153 | + )); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | * Filter the advanced settings. |
159 | 159 | * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8 |
160 | 160 | */ |
161 | - $settings = apply_filters( 'give_settings_advanced', $settings ); |
|
161 | + $settings = apply_filters('give_settings_advanced', $settings); |
|
162 | 162 | |
163 | 163 | /** |
164 | 164 | * Filter the settings. |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * |
168 | 168 | * @param array $settings |
169 | 169 | */ |
170 | - $settings = apply_filters( 'give_get_settings_' . $this->id, $settings ); |
|
170 | + $settings = apply_filters('give_get_settings_'.$this->id, $settings); |
|
171 | 171 | |
172 | 172 | // Output. |
173 | 173 | return $settings; |
@@ -181,10 +181,10 @@ discard block |
||
181 | 181 | */ |
182 | 182 | public function get_sections() { |
183 | 183 | $sections = array( |
184 | - 'advanced-options' => __( 'Advanced Options', 'give' ), |
|
184 | + 'advanced-options' => __('Advanced Options', 'give'), |
|
185 | 185 | ); |
186 | 186 | |
187 | - return apply_filters( 'give_get_sections_' . $this->id, $sections ); |
|
187 | + return apply_filters('give_get_sections_'.$this->id, $sections); |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | |
@@ -196,17 +196,17 @@ discard block |
||
196 | 196 | * |
197 | 197 | * @param array $field |
198 | 198 | */ |
199 | - public function render_remove_cache_button( $field ) { |
|
199 | + public function render_remove_cache_button($field) { |
|
200 | 200 | ?> |
201 | - <tr valign="top" <?php echo ! empty( $field['wrapper_class'] ) ? 'class="' . $field['wrapper_class'] . '"' : '' ?>> |
|
201 | + <tr valign="top" <?php echo ! empty($field['wrapper_class']) ? 'class="'.$field['wrapper_class'].'"' : '' ?>> |
|
202 | 202 | <th scope="row" class="titledesc"> |
203 | 203 | <label |
204 | - for="<?php echo esc_attr( $field['id'] ); ?>"><?php echo esc_html( $field['name'] ) ?></label> |
|
204 | + for="<?php echo esc_attr($field['id']); ?>"><?php echo esc_html($field['name']) ?></label> |
|
205 | 205 | </th> |
206 | 206 | <td class="give-forminp"> |
207 | - <button type="button" id="<?php echo esc_attr( $field['id'] ); ?>" |
|
208 | - class="button button-secondary"><?php echo esc_html( $field['buttonTitle'] ) ?></button> |
|
209 | - <?php echo Give_Admin_Settings::get_field_description( $field ); ?> |
|
207 | + <button type="button" id="<?php echo esc_attr($field['id']); ?>" |
|
208 | + class="button button-secondary"><?php echo esc_html($field['buttonTitle']) ?></button> |
|
209 | + <?php echo Give_Admin_Settings::get_field_description($field); ?> |
|
210 | 210 | </td> |
211 | 211 | </tr> |
212 | 212 | <?php |
@@ -9,11 +9,11 @@ discard block |
||
9 | 9 | * @since 1.8 |
10 | 10 | */ |
11 | 11 | |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if ( ! defined('ABSPATH')) { |
|
13 | 13 | exit; // Exit if accessed directly. |
14 | 14 | } |
15 | 15 | |
16 | -if ( ! class_exists( 'Give_Settings_General' ) ) : |
|
16 | +if ( ! class_exists('Give_Settings_General')) : |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Give_Settings_General. |
@@ -27,14 +27,14 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function __construct() { |
29 | 29 | $this->id = 'general'; |
30 | - $this->label = __( 'General', 'give' ); |
|
30 | + $this->label = __('General', 'give'); |
|
31 | 31 | |
32 | 32 | $this->default_tab = 'general-settings'; |
33 | 33 | |
34 | - if ( $this->id === give_get_current_setting_tab() ) { |
|
35 | - add_action( 'give_save_settings_give_settings', array( $this, '__give_change_donation_stating_number' ), 10, 3 ); |
|
36 | - add_action( 'give_admin_field_give_sequential_donation_code_preview', array( $this, '__render_give_sequential_donation_code_preview' ), 10, 3 ); |
|
37 | - add_action( 'give_admin_field_give_unlock_all_settings', array( $this, '__render_give_unlock_all_settings' ), 10, 3 ); |
|
34 | + if ($this->id === give_get_current_setting_tab()) { |
|
35 | + add_action('give_save_settings_give_settings', array($this, '__give_change_donation_stating_number'), 10, 3); |
|
36 | + add_action('give_admin_field_give_sequential_donation_code_preview', array($this, '__render_give_sequential_donation_code_preview'), 10, 3); |
|
37 | + add_action('give_admin_field_give_unlock_all_settings', array($this, '__render_give_unlock_all_settings'), 10, 3); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | parent::__construct(); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $settings = array(); |
51 | 51 | $current_section = give_get_current_setting_section(); |
52 | 52 | |
53 | - switch ( $current_section ) { |
|
53 | + switch ($current_section) { |
|
54 | 54 | case 'access-control': |
55 | 55 | $settings = array( |
56 | 56 | // Section 3: Access control. |
@@ -60,20 +60,20 @@ discard block |
||
60 | 60 | ), |
61 | 61 | array( |
62 | 62 | 'id' => 'session_lifetime', |
63 | - 'name' => __( 'Session Lifetime', 'give' ), |
|
64 | - 'desc' => __( 'The length of time a user\'s session is kept alive. Give starts a new session per user upon donation. Sessions allow donors to view their donation receipts without being logged in.', 'give' ), |
|
63 | + 'name' => __('Session Lifetime', 'give'), |
|
64 | + 'desc' => __('The length of time a user\'s session is kept alive. Give starts a new session per user upon donation. Sessions allow donors to view their donation receipts without being logged in.', 'give'), |
|
65 | 65 | 'type' => 'select', |
66 | 66 | 'options' => array( |
67 | - '86400' => __( '24 Hours', 'give' ), |
|
68 | - '172800' => __( '48 Hours', 'give' ), |
|
69 | - '259200' => __( '72 Hours', 'give' ), |
|
70 | - '604800' => __( '1 Week', 'give' ), |
|
67 | + '86400' => __('24 Hours', 'give'), |
|
68 | + '172800' => __('48 Hours', 'give'), |
|
69 | + '259200' => __('72 Hours', 'give'), |
|
70 | + '604800' => __('1 Week', 'give'), |
|
71 | 71 | ), |
72 | 72 | ), |
73 | 73 | array( |
74 | 74 | 'id' => 'limit_display_donations', |
75 | - 'name' => __( 'Limit Donations Displayed', 'give' ), |
|
76 | - 'desc' => __( 'Adjusts the number of donations displayed to a non logged-in user when they attempt to access the Donation History page without an active session. For security reasons, it\'s best to leave this at 1-3 donations.', 'give' ), |
|
75 | + 'name' => __('Limit Donations Displayed', 'give'), |
|
76 | + 'desc' => __('Adjusts the number of donations displayed to a non logged-in user when they attempt to access the Donation History page without an active session. For security reasons, it\'s best to leave this at 1-3 donations.', 'give'), |
|
77 | 77 | 'default' => '1', |
78 | 78 | 'type' => 'number', |
79 | 79 | 'css' => 'width:50px;', |
@@ -83,47 +83,47 @@ discard block |
||
83 | 83 | ), |
84 | 84 | ), |
85 | 85 | array( |
86 | - 'name' => __( 'Email Access', 'give' ), |
|
87 | - 'desc' => __( 'Would you like your donors to be able to access their donation history using only email? Donors whose sessions have expired and do not have an account may still access their donation history via a temporary email access link.', 'give' ), |
|
86 | + 'name' => __('Email Access', 'give'), |
|
87 | + 'desc' => __('Would you like your donors to be able to access their donation history using only email? Donors whose sessions have expired and do not have an account may still access their donation history via a temporary email access link.', 'give'), |
|
88 | 88 | 'id' => 'email_access', |
89 | 89 | 'type' => 'radio_inline', |
90 | 90 | 'default' => 'disabled', |
91 | 91 | 'options' => array( |
92 | - 'enabled' => __( 'Enabled', 'give' ), |
|
93 | - 'disabled' => __( 'Disabled', 'give' ), |
|
92 | + 'enabled' => __('Enabled', 'give'), |
|
93 | + 'disabled' => __('Disabled', 'give'), |
|
94 | 94 | ), |
95 | 95 | ), |
96 | 96 | array( |
97 | - 'name' => __( 'Enable reCAPTCHA', 'give' ), |
|
98 | - 'desc' => __( 'Would you like to enable the reCAPTCHA feature?', 'give' ), |
|
97 | + 'name' => __('Enable reCAPTCHA', 'give'), |
|
98 | + 'desc' => __('Would you like to enable the reCAPTCHA feature?', 'give'), |
|
99 | 99 | 'id' => 'enable_recaptcha', |
100 | 100 | 'type' => 'radio_inline', |
101 | 101 | 'default' => 'disabled', |
102 | 102 | 'options' => array( |
103 | - 'enabled' => __( 'Enabled', 'give' ), |
|
104 | - 'disabled' => __( 'Disabled', 'give' ), |
|
103 | + 'enabled' => __('Enabled', 'give'), |
|
104 | + 'disabled' => __('Disabled', 'give'), |
|
105 | 105 | ), |
106 | 106 | ), |
107 | 107 | array( |
108 | 108 | 'id' => 'recaptcha_key', |
109 | - 'name' => __( 'reCAPTCHA Site Key', 'give' ), |
|
109 | + 'name' => __('reCAPTCHA Site Key', 'give'), |
|
110 | 110 | /* translators: %s: https://www.google.com/recaptcha/ */ |
111 | - 'desc' => sprintf( __( 'If you would like to prevent spam on the email access form navigate to <a href="%s" target="_blank">the reCAPTCHA website</a> and sign up for an API key and paste your reCAPTCHA site key here. The reCAPTCHA uses Google\'s user-friendly single click verification method.', 'give' ), esc_url( 'http://docs.givewp.com/recaptcha' ) ), |
|
111 | + 'desc' => sprintf(__('If you would like to prevent spam on the email access form navigate to <a href="%s" target="_blank">the reCAPTCHA website</a> and sign up for an API key and paste your reCAPTCHA site key here. The reCAPTCHA uses Google\'s user-friendly single click verification method.', 'give'), esc_url('http://docs.givewp.com/recaptcha')), |
|
112 | 112 | 'default' => '', |
113 | 113 | 'type' => 'text', |
114 | 114 | ), |
115 | 115 | array( |
116 | 116 | 'id' => 'recaptcha_secret', |
117 | - 'name' => __( 'reCAPTCHA Secret Key', 'give' ), |
|
118 | - 'desc' => __( 'Please paste the reCAPTCHA secret key here from your reCAPTCHA API Keys panel.', 'give' ), |
|
117 | + 'name' => __('reCAPTCHA Secret Key', 'give'), |
|
118 | + 'desc' => __('Please paste the reCAPTCHA secret key here from your reCAPTCHA API Keys panel.', 'give'), |
|
119 | 119 | 'default' => '', |
120 | 120 | 'type' => 'text', |
121 | 121 | ), |
122 | 122 | array( |
123 | - 'name' => __( 'Access Control Docs Link', 'give' ), |
|
123 | + 'name' => __('Access Control Docs Link', 'give'), |
|
124 | 124 | 'id' => 'access_control_docs_link', |
125 | - 'url' => esc_url( 'http://docs.givewp.com/settings-access-control' ), |
|
126 | - 'title' => __( 'Access Control', 'give' ), |
|
125 | + 'url' => esc_url('http://docs.givewp.com/settings-access-control'), |
|
126 | + 'title' => __('Access Control', 'give'), |
|
127 | 127 | 'type' => 'give_docs_link', |
128 | 128 | ), |
129 | 129 | array( |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | break; |
135 | 135 | |
136 | 136 | case 'currency-settings' : |
137 | - $currency_position_before = __( 'Before - %s‎10', 'give' ); |
|
138 | - $currency_position_after = __( 'After - 10%s‏', 'give' ); |
|
137 | + $currency_position_before = __('Before - %s‎10', 'give'); |
|
138 | + $currency_position_after = __('After - 10%s‏', 'give'); |
|
139 | 139 | |
140 | 140 | $settings = array( |
141 | 141 | // Section 2: Currency |
@@ -144,14 +144,14 @@ discard block |
||
144 | 144 | 'id' => 'give_title_general_settings_2', |
145 | 145 | ), |
146 | 146 | array( |
147 | - 'name' => __( 'Currency Settings', 'give' ), |
|
147 | + 'name' => __('Currency Settings', 'give'), |
|
148 | 148 | 'desc' => '', |
149 | 149 | 'type' => 'give_title', |
150 | 150 | 'id' => 'give_title_general_settings_2', |
151 | 151 | ), |
152 | 152 | array( |
153 | - 'name' => __( 'Currency', 'give' ), |
|
154 | - 'desc' => __( 'The donation currency. Note that some payment gateways have currency restrictions.', 'give' ), |
|
153 | + 'name' => __('Currency', 'give'), |
|
154 | + 'desc' => __('The donation currency. Note that some payment gateways have currency restrictions.', 'give'), |
|
155 | 155 | 'id' => 'currency', |
156 | 156 | 'class' => 'give-select-chosen', |
157 | 157 | 'type' => 'select', |
@@ -159,51 +159,51 @@ discard block |
||
159 | 159 | 'default' => 'USD', |
160 | 160 | ), |
161 | 161 | array( |
162 | - 'name' => __( 'Currency Position', 'give' ), |
|
163 | - 'desc' => __( 'The position of the currency symbol.', 'give' ), |
|
162 | + 'name' => __('Currency Position', 'give'), |
|
163 | + 'desc' => __('The position of the currency symbol.', 'give'), |
|
164 | 164 | 'id' => 'currency_position', |
165 | 165 | 'type' => 'select', |
166 | 166 | 'options' => array( |
167 | 167 | /* translators: %s: currency symbol */ |
168 | - 'before' => sprintf( $currency_position_before, give_currency_symbol( give_get_currency() ) ), |
|
168 | + 'before' => sprintf($currency_position_before, give_currency_symbol(give_get_currency())), |
|
169 | 169 | /* translators: %s: currency symbol */ |
170 | - 'after' => sprintf( $currency_position_after, give_currency_symbol( give_get_currency() ) ), |
|
170 | + 'after' => sprintf($currency_position_after, give_currency_symbol(give_get_currency())), |
|
171 | 171 | ), |
172 | 172 | 'default' => 'before', |
173 | 173 | 'attributes' => array( |
174 | - 'data-before-template' => sprintf( $currency_position_before, '{currency_pos}' ), |
|
175 | - 'data-after-template' => sprintf( $currency_position_after, '{currency_pos}' ), |
|
174 | + 'data-before-template' => sprintf($currency_position_before, '{currency_pos}'), |
|
175 | + 'data-after-template' => sprintf($currency_position_after, '{currency_pos}'), |
|
176 | 176 | ), |
177 | 177 | ), |
178 | 178 | array( |
179 | - 'name' => __( 'Thousands Separator', 'give' ), |
|
180 | - 'desc' => __( 'The symbol (typically , or .) to separate thousands.', 'give' ), |
|
179 | + 'name' => __('Thousands Separator', 'give'), |
|
180 | + 'desc' => __('The symbol (typically , or .) to separate thousands.', 'give'), |
|
181 | 181 | 'id' => 'thousands_separator', |
182 | 182 | 'type' => 'text', |
183 | 183 | 'default' => ',', |
184 | 184 | 'css' => 'width:12em;', |
185 | 185 | ), |
186 | 186 | array( |
187 | - 'name' => __( 'Decimal Separator', 'give' ), |
|
188 | - 'desc' => __( 'The symbol (usually , or .) to separate decimal points.', 'give' ), |
|
187 | + 'name' => __('Decimal Separator', 'give'), |
|
188 | + 'desc' => __('The symbol (usually , or .) to separate decimal points.', 'give'), |
|
189 | 189 | 'id' => 'decimal_separator', |
190 | 190 | 'type' => 'text', |
191 | 191 | 'default' => '.', |
192 | 192 | 'css' => 'width:12em;', |
193 | 193 | ), |
194 | 194 | array( |
195 | - 'name' => __( 'Number of Decimals', 'give' ), |
|
196 | - 'desc' => __( 'The number of decimal points displayed in amounts.', 'give' ), |
|
195 | + 'name' => __('Number of Decimals', 'give'), |
|
196 | + 'desc' => __('The number of decimal points displayed in amounts.', 'give'), |
|
197 | 197 | 'id' => 'number_decimals', |
198 | 198 | 'type' => 'text', |
199 | 199 | 'default' => 2, |
200 | 200 | 'css' => 'width:12em;', |
201 | 201 | ), |
202 | 202 | array( |
203 | - 'name' => __( 'Currency Options Docs Link', 'give' ), |
|
203 | + 'name' => __('Currency Options Docs Link', 'give'), |
|
204 | 204 | 'id' => 'currency_settings_docs_link', |
205 | - 'url' => esc_url( 'http://docs.givewp.com/settings-currency' ), |
|
206 | - 'title' => __( 'Currency Settings', 'give' ), |
|
205 | + 'url' => esc_url('http://docs.givewp.com/settings-currency'), |
|
206 | + 'title' => __('Currency Settings', 'give'), |
|
207 | 207 | 'type' => 'give_docs_link', |
208 | 208 | ), |
209 | 209 | array( |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | $country = give_get_country(); |
220 | 220 | |
221 | 221 | // get the list of the states of which default country is selected. |
222 | - $states = give_get_states( $country ); |
|
222 | + $states = give_get_states($country); |
|
223 | 223 | |
224 | 224 | // Get the country list that does not have any states init. |
225 | 225 | $no_states_country = give_no_states_country_list(); |
@@ -231,58 +231,58 @@ discard block |
||
231 | 231 | 'id' => 'give_title_general_settings_1', |
232 | 232 | ), |
233 | 233 | array( |
234 | - 'name' => __( 'General Settings', 'give' ), |
|
234 | + 'name' => __('General Settings', 'give'), |
|
235 | 235 | 'desc' => '', |
236 | 236 | 'type' => 'give_title', |
237 | 237 | 'id' => 'give_title_general_settings_1', |
238 | 238 | ), |
239 | 239 | array( |
240 | - 'name' => __( 'Success Page', 'give' ), |
|
240 | + 'name' => __('Success Page', 'give'), |
|
241 | 241 | /* translators: %s: [give_receipt] */ |
242 | - 'desc' => sprintf( __( 'The page donors are sent to after completing their donations. The %s shortcode should be on this page.', 'give' ), '<code>[give_receipt]</code>' ), |
|
242 | + 'desc' => sprintf(__('The page donors are sent to after completing their donations. The %s shortcode should be on this page.', 'give'), '<code>[give_receipt]</code>'), |
|
243 | 243 | 'id' => 'success_page', |
244 | 244 | 'class' => 'give-select give-select-chosen', |
245 | 245 | 'type' => 'select', |
246 | - 'options' => give_cmb2_get_post_options( array( |
|
246 | + 'options' => give_cmb2_get_post_options(array( |
|
247 | 247 | 'post_type' => 'page', |
248 | 248 | 'numberposts' => 30, |
249 | - ) ), |
|
249 | + )), |
|
250 | 250 | 'attributes' => array( |
251 | 251 | 'data-search-type' => 'pages' |
252 | 252 | ) |
253 | 253 | ), |
254 | 254 | array( |
255 | - 'name' => __( 'Failed Donation Page', 'give' ), |
|
256 | - 'desc' => __( 'The page donors are sent to if their donation is cancelled or fails.', 'give' ), |
|
255 | + 'name' => __('Failed Donation Page', 'give'), |
|
256 | + 'desc' => __('The page donors are sent to if their donation is cancelled or fails.', 'give'), |
|
257 | 257 | 'class' => 'give-select give-select-chosen', |
258 | 258 | 'id' => 'failure_page', |
259 | 259 | 'type' => 'select', |
260 | - 'options' => give_cmb2_get_post_options( array( |
|
260 | + 'options' => give_cmb2_get_post_options(array( |
|
261 | 261 | 'post_type' => 'page', |
262 | 262 | 'numberposts' => 30, |
263 | - ) ), |
|
263 | + )), |
|
264 | 264 | 'attributes' => array( |
265 | 265 | 'data-search-type' => 'pages' |
266 | 266 | ) |
267 | 267 | ), |
268 | 268 | array( |
269 | - 'name' => __( 'Donation History Page', 'give' ), |
|
269 | + 'name' => __('Donation History Page', 'give'), |
|
270 | 270 | /* translators: %s: [donation_history] */ |
271 | - 'desc' => sprintf( __( 'The page showing a complete donation history for the current user. The %s shortcode should be on this page.', 'give' ), '<code>[donation_history]</code>' ), |
|
271 | + 'desc' => sprintf(__('The page showing a complete donation history for the current user. The %s shortcode should be on this page.', 'give'), '<code>[donation_history]</code>'), |
|
272 | 272 | 'id' => 'history_page', |
273 | 273 | 'class' => 'give-select give-select-chosen', |
274 | 274 | 'type' => 'select', |
275 | - 'options' => give_cmb2_get_post_options( array( |
|
275 | + 'options' => give_cmb2_get_post_options(array( |
|
276 | 276 | 'post_type' => 'page', |
277 | 277 | 'numberposts' => 30, |
278 | - ) ), |
|
278 | + )), |
|
279 | 279 | 'attributes' => array( |
280 | 280 | 'data-search-type' => 'pages' |
281 | 281 | ) |
282 | 282 | ), |
283 | 283 | array( |
284 | - 'name' => __( 'Base Country', 'give' ), |
|
285 | - 'desc' => __( 'The country your site operates from.', 'give' ), |
|
284 | + 'name' => __('Base Country', 'give'), |
|
285 | + 'desc' => __('The country your site operates from.', 'give'), |
|
286 | 286 | 'id' => 'base_country', |
287 | 287 | 'type' => 'select', |
288 | 288 | 'options' => give_get_country_list(), |
@@ -293,18 +293,18 @@ discard block |
||
293 | 293 | * @since 1.8.14 |
294 | 294 | */ |
295 | 295 | array( |
296 | - 'wrapper_class' => ( array_key_exists( $country, $no_states_country ) ? 'give-hidden' : '' ), |
|
297 | - 'name' => __( 'Base State/Province', 'give' ), |
|
298 | - 'desc' => __( 'The state/province your site operates from.', 'give' ), |
|
296 | + 'wrapper_class' => (array_key_exists($country, $no_states_country) ? 'give-hidden' : ''), |
|
297 | + 'name' => __('Base State/Province', 'give'), |
|
298 | + 'desc' => __('The state/province your site operates from.', 'give'), |
|
299 | 299 | 'id' => 'base_state', |
300 | - 'type' => ( empty( $states ) ? 'text' : 'select' ), |
|
300 | + 'type' => (empty($states) ? 'text' : 'select'), |
|
301 | 301 | 'options' => $states, |
302 | 302 | ), |
303 | 303 | array( |
304 | - 'name' => __( 'General Options Docs Link', 'give' ), |
|
304 | + 'name' => __('General Options Docs Link', 'give'), |
|
305 | 305 | 'id' => 'general_options_docs_link', |
306 | - 'url' => esc_url( 'http://docs.givewp.com/settings-general' ), |
|
307 | - 'title' => __( 'General Options', 'give' ), |
|
306 | + 'url' => esc_url('http://docs.givewp.com/settings-general'), |
|
307 | + 'title' => __('General Options', 'give'), |
|
308 | 308 | 'type' => 'give_docs_link', |
309 | 309 | ), |
310 | 310 | array( |
@@ -324,48 +324,48 @@ discard block |
||
324 | 324 | 'type' => 'title' |
325 | 325 | ), |
326 | 326 | array( |
327 | - 'name' => __( 'Sequential Ordering', 'give' ), |
|
327 | + 'name' => __('Sequential Ordering', 'give'), |
|
328 | 328 | 'id' => "{$current_section}_status", |
329 | - 'desc' => __( 'Custom donation numbering that increases sequentially to prevent gaps between donation IDs. If disabled, then donation numbers are generated from WordPress post IDs, which will result in gaps between numbers.', 'give' ), |
|
329 | + 'desc' => __('Custom donation numbering that increases sequentially to prevent gaps between donation IDs. If disabled, then donation numbers are generated from WordPress post IDs, which will result in gaps between numbers.', 'give'), |
|
330 | 330 | 'type' => 'radio_inline', |
331 | 331 | 'default' => 'disabled', |
332 | 332 | 'options' => array( |
333 | - 'enabled' => __( 'Enabled', 'give' ), |
|
334 | - 'disabled' => __( 'Disabled', 'give' ) |
|
333 | + 'enabled' => __('Enabled', 'give'), |
|
334 | + 'disabled' => __('Disabled', 'give') |
|
335 | 335 | ) |
336 | 336 | ), |
337 | 337 | array( |
338 | - 'name' => __( 'Next Donation Number', 'give' ), |
|
338 | + 'name' => __('Next Donation Number', 'give'), |
|
339 | 339 | 'id' => "{$current_section}_number", |
340 | 340 | 'desc' => sprintf( |
341 | - __( 'The number used to generate the next donation ID. This value must be greater than or equal to %s to avoid conflicts with existing donation IDs.', 'give' ), |
|
342 | - '<code>' . Give()->seq_donation_number->get_next_number() . '</code>' |
|
341 | + __('The number used to generate the next donation ID. This value must be greater than or equal to %s to avoid conflicts with existing donation IDs.', 'give'), |
|
342 | + '<code>'.Give()->seq_donation_number->get_next_number().'</code>' |
|
343 | 343 | ), |
344 | 344 | 'type' => 'number', |
345 | 345 | ), |
346 | 346 | array( |
347 | - 'name' => __( 'Number Prefix', 'give' ), |
|
347 | + 'name' => __('Number Prefix', 'give'), |
|
348 | 348 | 'id' => "{$current_section}_number_prefix", |
349 | 349 | 'desc' => sprintf( |
350 | - __( 'The prefix appended to all sequential donation numbers. Spaces are replaced by %s.', 'give' ), |
|
350 | + __('The prefix appended to all sequential donation numbers. Spaces are replaced by %s.', 'give'), |
|
351 | 351 | '<code>-</code>' |
352 | 352 | ), |
353 | 353 | 'type' => 'text', |
354 | 354 | ), |
355 | 355 | array( |
356 | - 'name' => __( 'Number Suffix', 'give' ), |
|
356 | + 'name' => __('Number Suffix', 'give'), |
|
357 | 357 | 'id' => "{$current_section}_number_suffix", |
358 | 358 | 'desc' => sprintf( |
359 | - __( 'The suffix appended to all sequential donation numbers. Spaces are replaced by %s.', 'give' ), |
|
359 | + __('The suffix appended to all sequential donation numbers. Spaces are replaced by %s.', 'give'), |
|
360 | 360 | '<code>-</code>' |
361 | 361 | ), |
362 | 362 | 'type' => 'text', |
363 | 363 | ), |
364 | 364 | array( |
365 | - 'name' => __( 'Number Padding', 'give' ), |
|
365 | + 'name' => __('Number Padding', 'give'), |
|
366 | 366 | 'id' => "{$current_section}_number_padding", |
367 | 367 | 'desc' => sprintf( |
368 | - __( 'The minimum number of digits in the sequential donation number. Enter %s to display %s as %s.', 'give' ), |
|
368 | + __('The minimum number of digits in the sequential donation number. Enter %s to display %s as %s.', 'give'), |
|
369 | 369 | '<code>4</code>', |
370 | 370 | '<code>1</code>', |
371 | 371 | '<code>0001</code>' |
@@ -374,16 +374,16 @@ discard block |
||
374 | 374 | 'default' => '0', |
375 | 375 | ), |
376 | 376 | array( |
377 | - 'name' => __( 'Donation ID Preview', 'give' ), |
|
377 | + 'name' => __('Donation ID Preview', 'give'), |
|
378 | 378 | 'id' => "{$current_section}_preview", |
379 | 379 | 'type' => 'give_sequential_donation_code_preview', |
380 | - 'desc' => __( 'A preview of the next sequential donation ID. This preview cannot be edited directly as it is generated from the settings above.', 'give' ), |
|
380 | + 'desc' => __('A preview of the next sequential donation ID. This preview cannot be edited directly as it is generated from the settings above.', 'give'), |
|
381 | 381 | ), |
382 | 382 | array( |
383 | - 'name' => __( 'Sequential Ordering Docs Link', 'give' ), |
|
383 | + 'name' => __('Sequential Ordering Docs Link', 'give'), |
|
384 | 384 | 'id' => "{$current_section}_doc link", |
385 | - 'url' => esc_url( 'http://docs.givewp.com/settings-sequential-ordering' ), |
|
386 | - 'title' => __( 'Sequential Ordering', 'give' ), |
|
385 | + 'url' => esc_url('http://docs.givewp.com/settings-sequential-ordering'), |
|
386 | + 'title' => __('Sequential Ordering', 'give'), |
|
387 | 387 | 'type' => 'give_docs_link', |
388 | 388 | ), |
389 | 389 | array( |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | * Filter the general settings. |
398 | 398 | * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8 |
399 | 399 | */ |
400 | - $settings = apply_filters( 'give_settings_general', $settings ); |
|
400 | + $settings = apply_filters('give_settings_general', $settings); |
|
401 | 401 | |
402 | 402 | /** |
403 | 403 | * Filter the settings. |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | * |
407 | 407 | * @param array $settings |
408 | 408 | */ |
409 | - $settings = apply_filters( 'give_get_settings_' . $this->id, $settings ); |
|
409 | + $settings = apply_filters('give_get_settings_'.$this->id, $settings); |
|
410 | 410 | |
411 | 411 | // Output. |
412 | 412 | return $settings; |
@@ -420,13 +420,13 @@ discard block |
||
420 | 420 | */ |
421 | 421 | public function get_sections() { |
422 | 422 | $sections = array( |
423 | - 'general-settings' => __( 'General', 'give' ), |
|
424 | - 'currency-settings' => __( 'Currency', 'give' ), |
|
425 | - 'access-control' => __( 'Access Control', 'give' ), |
|
426 | - 'sequential-ordering' => __( 'Sequential Ordering', 'give' ), |
|
423 | + 'general-settings' => __('General', 'give'), |
|
424 | + 'currency-settings' => __('Currency', 'give'), |
|
425 | + 'access-control' => __('Access Control', 'give'), |
|
426 | + 'sequential-ordering' => __('Sequential Ordering', 'give'), |
|
427 | 427 | ); |
428 | 428 | |
429 | - return apply_filters( 'give_get_sections_' . $this->id, $sections ); |
|
429 | + return apply_filters('give_get_sections_'.$this->id, $sections); |
|
430 | 430 | } |
431 | 431 | |
432 | 432 | |
@@ -442,23 +442,23 @@ discard block |
||
442 | 442 | * |
443 | 443 | * @return bool |
444 | 444 | */ |
445 | - public function __give_change_donation_stating_number( $update_options, $option_name, $old_options ) { |
|
446 | - if ( ! isset( $_POST['sequential-ordering_number'] ) ) { |
|
445 | + public function __give_change_donation_stating_number($update_options, $option_name, $old_options) { |
|
446 | + if ( ! isset($_POST['sequential-ordering_number'])) { |
|
447 | 447 | return false; |
448 | 448 | } |
449 | 449 | |
450 | - if ( ( $next_number = Give()->seq_donation_number->get_next_number() ) > $update_options['sequential-ordering_number'] ) { |
|
451 | - give_update_option( 'sequential-ordering_number', $next_number ); |
|
450 | + if (($next_number = Give()->seq_donation_number->get_next_number()) > $update_options['sequential-ordering_number']) { |
|
451 | + give_update_option('sequential-ordering_number', $next_number); |
|
452 | 452 | |
453 | 453 | Give_Admin_Settings::add_error( |
454 | 454 | 'give-invalid-sequential-starting-number', |
455 | 455 | sprintf( |
456 | - __( 'Next Donation Number must be equal to or larger than %s to avoid conflicts with existing donation IDs.', 'give' ), |
|
456 | + __('Next Donation Number must be equal to or larger than %s to avoid conflicts with existing donation IDs.', 'give'), |
|
457 | 457 | $next_number |
458 | 458 | ) |
459 | 459 | ); |
460 | - } elseif ( $update_options['sequential-ordering_number'] !== $old_options['sequential-ordering_number'] ) { |
|
461 | - update_option( '_give_reset_sequential_number', 1 ); |
|
460 | + } elseif ($update_options['sequential-ordering_number'] !== $old_options['sequential-ordering_number']) { |
|
461 | + update_option('_give_reset_sequential_number', 1); |
|
462 | 462 | } |
463 | 463 | |
464 | 464 | return true; |
@@ -473,16 +473,16 @@ discard block |
||
473 | 473 | * |
474 | 474 | * @param $field |
475 | 475 | */ |
476 | - public function __render_give_sequential_donation_code_preview( $field ) { |
|
476 | + public function __render_give_sequential_donation_code_preview($field) { |
|
477 | 477 | ?> |
478 | - <tr valign="top" <?php echo ! empty( $field['wrapper_class'] ) ? 'class="' . $field['wrapper_class'] . '"' : '' ?>> |
|
478 | + <tr valign="top" <?php echo ! empty($field['wrapper_class']) ? 'class="'.$field['wrapper_class'].'"' : '' ?>> |
|
479 | 479 | <th scope="row" class="titledesc"> |
480 | 480 | <label |
481 | - for="<?php echo esc_attr( $field['id'] ); ?>"><?php echo esc_html( $field['name'] ) ?></label> |
|
481 | + for="<?php echo esc_attr($field['id']); ?>"><?php echo esc_html($field['name']) ?></label> |
|
482 | 482 | </th> |
483 | 483 | <td class="give-forminp"> |
484 | - <input id="<?php echo esc_attr( $field['id'] ); ?>" class="give-input-field" type="text" disabled> |
|
485 | - <?php echo Give_Admin_Settings::get_field_description( $field ); ?> |
|
484 | + <input id="<?php echo esc_attr($field['id']); ?>" class="give-input-field" type="text" disabled> |
|
485 | + <?php echo Give_Admin_Settings::get_field_description($field); ?> |
|
486 | 486 | </td> |
487 | 487 | </tr> |
488 | 488 | <?php |
@@ -497,16 +497,16 @@ discard block |
||
497 | 497 | * |
498 | 498 | * @param $field |
499 | 499 | */ |
500 | - public function __render_give_unlock_all_settings( $field ) { |
|
500 | + public function __render_give_unlock_all_settings($field) { |
|
501 | 501 | ?> |
502 | - <tr valign="top" <?php echo ! empty( $field['wrapper_class'] ) ? 'class="' . $field['wrapper_class'] . '"' : '' ?>> |
|
502 | + <tr valign="top" <?php echo ! empty($field['wrapper_class']) ? 'class="'.$field['wrapper_class'].'"' : '' ?>> |
|
503 | 503 | <th scope="row" class="titledesc"> |
504 | 504 | <label |
505 | - for="<?php echo esc_attr( $field['id'] ); ?>"><?php echo esc_html( $field['name'] ) ?></label> |
|
505 | + for="<?php echo esc_attr($field['id']); ?>"><?php echo esc_html($field['name']) ?></label> |
|
506 | 506 | </th> |
507 | 507 | <td class="give-forminp"> |
508 | - <?php echo Give_Admin_Settings::get_field_description( $field ); ?> |
|
509 | - <a href="" id="<?php echo $field['id']; ?>" data-message="<?php echo $field['confirmation_msg'] ?>"><?php echo __( 'Unlock all settings', 'give' ); ?></a> |
|
508 | + <?php echo Give_Admin_Settings::get_field_description($field); ?> |
|
509 | + <a href="" id="<?php echo $field['id']; ?>" data-message="<?php echo $field['confirmation_msg'] ?>"><?php echo __('Unlock all settings', 'give'); ?></a> |
|
510 | 510 | </td> |
511 | 511 | </tr> |
512 | 512 | <?php |
@@ -9,11 +9,11 @@ discard block |
||
9 | 9 | * @since 1.8 |
10 | 10 | */ |
11 | 11 | |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if ( ! defined('ABSPATH')) { |
|
13 | 13 | exit; // Exit if accessed directly |
14 | 14 | } |
15 | 15 | |
16 | -if ( ! class_exists( 'Give_Settings_Display' ) ) : |
|
16 | +if ( ! class_exists('Give_Settings_Display')) : |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Give_Settings_Display. |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function __construct() { |
29 | 29 | $this->id = 'display'; |
30 | - $this->label = __( 'Display Options', 'give' ); |
|
30 | + $this->label = __('Display Options', 'give'); |
|
31 | 31 | |
32 | 32 | $this->default_tab = 'display-settings'; |
33 | 33 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $settings = array(); |
45 | 45 | $current_section = give_get_current_setting_section(); |
46 | 46 | |
47 | - switch ( $current_section ) { |
|
47 | + switch ($current_section) { |
|
48 | 48 | case 'display-settings' : |
49 | 49 | $settings = array( |
50 | 50 | // Section 1: Display |
@@ -53,67 +53,67 @@ discard block |
||
53 | 53 | 'type' => 'title', |
54 | 54 | ), |
55 | 55 | array( |
56 | - 'name' => __( 'Default Give Styles', 'give' ), |
|
57 | - 'desc' => __( 'You can disable Give\'s default styles for donation forms and other frontend elements.', 'give' ), |
|
56 | + 'name' => __('Default Give Styles', 'give'), |
|
57 | + 'desc' => __('You can disable Give\'s default styles for donation forms and other frontend elements.', 'give'), |
|
58 | 58 | 'id' => 'css', |
59 | 59 | 'type' => 'radio_inline', |
60 | 60 | 'default' => 'enabled', |
61 | 61 | 'options' => array( |
62 | - 'enabled' => __( 'Enabled', 'give' ), |
|
63 | - 'disabled' => __( 'Disabled', 'give' ), |
|
62 | + 'enabled' => __('Enabled', 'give'), |
|
63 | + 'disabled' => __('Disabled', 'give'), |
|
64 | 64 | ), |
65 | 65 | ), |
66 | 66 | array( |
67 | - 'name' => __( 'Floating Labels', 'give' ), |
|
67 | + 'name' => __('Floating Labels', 'give'), |
|
68 | 68 | /* translators: %s: http://docs.givewp.com/form-floating-labels */ |
69 | - 'desc' => sprintf( wp_kses( __( '<a href="%s" target="_blank">Floating labels</a> allows your labels to be inset within the form fields to provide a cleaner form appearance. Note that if the "Disable CSS" option is enabled, you will need to style the floating labels yourself.', 'give' ), array( |
|
69 | + 'desc' => sprintf(wp_kses(__('<a href="%s" target="_blank">Floating labels</a> allows your labels to be inset within the form fields to provide a cleaner form appearance. Note that if the "Disable CSS" option is enabled, you will need to style the floating labels yourself.', 'give'), array( |
|
70 | 70 | 'a' => array( |
71 | 71 | 'href' => array(), |
72 | 72 | 'target' => array(), |
73 | 73 | ), |
74 | - ) ), esc_url( 'http://docs.givewp.com/form-floating-labels' ) ), |
|
74 | + )), esc_url('http://docs.givewp.com/form-floating-labels')), |
|
75 | 75 | 'id' => 'floatlabels', |
76 | 76 | 'type' => 'radio_inline', |
77 | 77 | 'default' => 'disabled', |
78 | 78 | 'options' => array( |
79 | - 'enabled' => __( 'Enabled', 'give' ), |
|
80 | - 'disabled' => __( 'Disabled', 'give' ), |
|
79 | + 'enabled' => __('Enabled', 'give'), |
|
80 | + 'disabled' => __('Disabled', 'give'), |
|
81 | 81 | ), |
82 | 82 | ), |
83 | 83 | array( |
84 | - 'name' => __( 'Welcome Screen', 'give' ), |
|
84 | + 'name' => __('Welcome Screen', 'give'), |
|
85 | 85 | /* translators: %s: about page URL */ |
86 | - 'desc' => sprintf( wp_kses( __( 'Enable this option if you would like to disable the <a href="%s" target="_blank">Give Welcome screen</a> that displays each time Give is activated or updated.', 'give' ), array( |
|
86 | + 'desc' => sprintf(wp_kses(__('Enable this option if you would like to disable the <a href="%s" target="_blank">Give Welcome screen</a> that displays each time Give is activated or updated.', 'give'), array( |
|
87 | 87 | 'a' => array( |
88 | 88 | 'href' => array(), |
89 | 89 | 'target' => array(), |
90 | 90 | ), |
91 | - ) ), esc_url( admin_url( 'index.php?page=give-about' ) ) ), |
|
91 | + )), esc_url(admin_url('index.php?page=give-about'))), |
|
92 | 92 | 'id' => 'welcome', |
93 | 93 | 'type' => 'radio_inline', |
94 | 94 | 'default' => 'enabled', |
95 | 95 | 'options' => array( |
96 | - 'enabled' => __( 'Enabled', 'give' ), |
|
97 | - 'disabled' => __( 'Disabled', 'give' ), |
|
96 | + 'enabled' => __('Enabled', 'give'), |
|
97 | + 'disabled' => __('Disabled', 'give'), |
|
98 | 98 | ), |
99 | 99 | ), |
100 | 100 | array( |
101 | - 'name' => __( 'Company Donations', 'give' ), |
|
102 | - 'desc' => __( 'Do you want a Company field to appear after First Name and Last Name?', 'give' ), |
|
101 | + 'name' => __('Company Donations', 'give'), |
|
102 | + 'desc' => __('Do you want a Company field to appear after First Name and Last Name?', 'give'), |
|
103 | 103 | 'id' => 'company_field', |
104 | 104 | 'type' => 'radio_inline', |
105 | 105 | 'default' => 'disabled', |
106 | 106 | 'options' => array( |
107 | - 'disabled' => __( 'Disabled', 'give' ), |
|
108 | - 'required' => __( 'Required', 'give' ), |
|
109 | - 'optional' => __( 'Optional', 'give' ), |
|
107 | + 'disabled' => __('Disabled', 'give'), |
|
108 | + 'required' => __('Required', 'give'), |
|
109 | + 'optional' => __('Optional', 'give'), |
|
110 | 110 | ), |
111 | 111 | ), |
112 | 112 | array( |
113 | - 'name' => __( 'Display Settings Docs Link', 'give' ), |
|
113 | + 'name' => __('Display Settings Docs Link', 'give'), |
|
114 | 114 | 'id' => 'display_settings_docs_link', |
115 | - 'url' => esc_url( 'http://docs.givewp.com/form-display-options' ), |
|
116 | - 'title' => __( 'Display Options Settings', 'give' ), |
|
115 | + 'url' => esc_url('http://docs.givewp.com/form-display-options'), |
|
116 | + 'title' => __('Display Options Settings', 'give'), |
|
117 | 117 | 'type' => 'give_docs_link', |
118 | 118 | ), |
119 | 119 | array( |
@@ -130,78 +130,78 @@ discard block |
||
130 | 130 | 'type' => 'title', |
131 | 131 | ), |
132 | 132 | array( |
133 | - 'name' => __( 'Form Single Views', 'give' ), |
|
134 | - 'desc' => __( 'By default, all donation form have single views enabled which creates a specific URL on your website for that form. This option disables the singular posts from being publicly viewable. Note: you will need to embed forms using a shortcode or widget if enabled.', 'give' ), |
|
133 | + 'name' => __('Form Single Views', 'give'), |
|
134 | + 'desc' => __('By default, all donation form have single views enabled which creates a specific URL on your website for that form. This option disables the singular posts from being publicly viewable. Note: you will need to embed forms using a shortcode or widget if enabled.', 'give'), |
|
135 | 135 | 'id' => 'forms_singular', |
136 | 136 | 'type' => 'radio_inline', |
137 | 137 | 'default' => 'enabled', |
138 | 138 | 'options' => array( |
139 | - 'enabled' => __( 'Enabled', 'give' ), |
|
140 | - 'disabled' => __( 'Disabled', 'give' ), |
|
139 | + 'enabled' => __('Enabled', 'give'), |
|
140 | + 'disabled' => __('Disabled', 'give'), |
|
141 | 141 | ), |
142 | 142 | ), |
143 | 143 | array( |
144 | - 'name' => __( 'Form Archives', 'give' ), |
|
145 | - 'desc' => sprintf( wp_kses( __( 'Archives pages list all the donation forms you have created. This option will disable only the form\'s archive page(s). The single form\'s view will remain in place. Note: you will need to <a href="%s">refresh your permalinks</a> after this option has been enabled.', 'give' ), array( |
|
144 | + 'name' => __('Form Archives', 'give'), |
|
145 | + 'desc' => sprintf(wp_kses(__('Archives pages list all the donation forms you have created. This option will disable only the form\'s archive page(s). The single form\'s view will remain in place. Note: you will need to <a href="%s">refresh your permalinks</a> after this option has been enabled.', 'give'), array( |
|
146 | 146 | 'a' => array( |
147 | 147 | 'href' => array(), |
148 | 148 | 'target' => array(), |
149 | 149 | ), |
150 | - ) ), esc_url( admin_url( 'options-permalink.php' ) ) ), |
|
150 | + )), esc_url(admin_url('options-permalink.php'))), |
|
151 | 151 | 'id' => 'forms_archives', |
152 | 152 | 'type' => 'radio_inline', |
153 | 153 | 'default' => 'enabled', |
154 | 154 | 'options' => array( |
155 | - 'enabled' => __( 'Enabled', 'give' ), |
|
156 | - 'disabled' => __( 'Disabled', 'give' ), |
|
155 | + 'enabled' => __('Enabled', 'give'), |
|
156 | + 'disabled' => __('Disabled', 'give'), |
|
157 | 157 | ), |
158 | 158 | ), |
159 | 159 | array( |
160 | - 'name' => __( 'Form Excerpts', 'give' ), |
|
161 | - 'desc' => __( 'The excerpt is an optional summary or description of a donation form; in short, a summary as to why the user should give.', 'give' ), |
|
160 | + 'name' => __('Form Excerpts', 'give'), |
|
161 | + 'desc' => __('The excerpt is an optional summary or description of a donation form; in short, a summary as to why the user should give.', 'give'), |
|
162 | 162 | 'id' => 'forms_excerpt', |
163 | 163 | 'type' => 'radio_inline', |
164 | 164 | 'default' => 'enabled', |
165 | 165 | 'options' => array( |
166 | - 'enabled' => __( 'Enabled', 'give' ), |
|
167 | - 'disabled' => __( 'Disabled', 'give' ), |
|
166 | + 'enabled' => __('Enabled', 'give'), |
|
167 | + 'disabled' => __('Disabled', 'give'), |
|
168 | 168 | ), |
169 | 169 | ), |
170 | 170 | array( |
171 | - 'name' => __( 'Form Featured Image', 'give' ), |
|
172 | - 'desc' => __( 'If you do not wish to use the featured image functionality you can disable it using this option and it will not be displayed for single donation forms.', 'give' ), |
|
171 | + 'name' => __('Form Featured Image', 'give'), |
|
172 | + 'desc' => __('If you do not wish to use the featured image functionality you can disable it using this option and it will not be displayed for single donation forms.', 'give'), |
|
173 | 173 | 'id' => 'form_featured_img', |
174 | 174 | 'type' => 'radio_inline', |
175 | 175 | 'default' => 'enabled', |
176 | 176 | 'options' => array( |
177 | - 'enabled' => __( 'Enabled', 'give' ), |
|
178 | - 'disabled' => __( 'Disabled', 'give' ), |
|
177 | + 'enabled' => __('Enabled', 'give'), |
|
178 | + 'disabled' => __('Disabled', 'give'), |
|
179 | 179 | ), |
180 | 180 | ), |
181 | 181 | array( |
182 | - 'name' => __( 'Featured Image Size', 'give' ), |
|
183 | - 'desc' => __( 'The Featured Image is an image that is chosen as the representative image for a donation form. Some themes may have custom featured image sizes. Please select the size you would like to display for your single donation form\'s featured image.', 'give' ), |
|
182 | + 'name' => __('Featured Image Size', 'give'), |
|
183 | + 'desc' => __('The Featured Image is an image that is chosen as the representative image for a donation form. Some themes may have custom featured image sizes. Please select the size you would like to display for your single donation form\'s featured image.', 'give'), |
|
184 | 184 | 'id' => 'featured_image_size', |
185 | 185 | 'type' => 'select', |
186 | 186 | 'default' => 'large', |
187 | 187 | 'options' => give_get_featured_image_sizes(), |
188 | 188 | ), |
189 | 189 | array( |
190 | - 'name' => __( 'Single Form Sidebar', 'give' ), |
|
191 | - 'desc' => __( 'The sidebar allows you to add additional widgets to the Give single form view. If you don\'t plan on using the sidebar you may disable it with this option.', 'give' ), |
|
190 | + 'name' => __('Single Form Sidebar', 'give'), |
|
191 | + 'desc' => __('The sidebar allows you to add additional widgets to the Give single form view. If you don\'t plan on using the sidebar you may disable it with this option.', 'give'), |
|
192 | 192 | 'id' => 'form_sidebar', |
193 | 193 | 'type' => 'radio_inline', |
194 | 194 | 'default' => 'enabled', |
195 | 195 | 'options' => array( |
196 | - 'enabled' => __( 'Enabled', 'give' ), |
|
197 | - 'disabled' => __( 'Disabled', 'give' ), |
|
196 | + 'enabled' => __('Enabled', 'give'), |
|
197 | + 'disabled' => __('Disabled', 'give'), |
|
198 | 198 | ), |
199 | 199 | ), |
200 | 200 | array( |
201 | - 'name' => __( 'Post Types Docs Link', 'give' ), |
|
201 | + 'name' => __('Post Types Docs Link', 'give'), |
|
202 | 202 | 'id' => 'post_types_settings_docs_link', |
203 | - 'url' => esc_url( 'http://docs.givewp.com/settings-post-types' ), |
|
204 | - 'title' => __( 'Post Types Settings', 'give' ), |
|
203 | + 'url' => esc_url('http://docs.givewp.com/settings-post-types'), |
|
204 | + 'title' => __('Post Types Settings', 'give'), |
|
205 | 205 | 'type' => 'give_docs_link', |
206 | 206 | ), |
207 | 207 | array( |
@@ -218,32 +218,32 @@ discard block |
||
218 | 218 | 'type' => 'title', |
219 | 219 | ), |
220 | 220 | array( |
221 | - 'name' => __( 'Form Categories', 'give' ), |
|
222 | - 'desc' => __( 'Enable Categories for all Give forms.', 'give' ), |
|
221 | + 'name' => __('Form Categories', 'give'), |
|
222 | + 'desc' => __('Enable Categories for all Give forms.', 'give'), |
|
223 | 223 | 'id' => 'categories', |
224 | 224 | 'type' => 'radio_inline', |
225 | 225 | 'default' => 'disabled', |
226 | 226 | 'options' => array( |
227 | - 'enabled' => __( 'Enabled', 'give' ), |
|
228 | - 'disabled' => __( 'Disabled', 'give' ), |
|
227 | + 'enabled' => __('Enabled', 'give'), |
|
228 | + 'disabled' => __('Disabled', 'give'), |
|
229 | 229 | ), |
230 | 230 | ), |
231 | 231 | array( |
232 | - 'name' => __( 'Form Tags', 'give' ), |
|
233 | - 'desc' => __( 'Enable Tags for all Give forms.', 'give' ), |
|
232 | + 'name' => __('Form Tags', 'give'), |
|
233 | + 'desc' => __('Enable Tags for all Give forms.', 'give'), |
|
234 | 234 | 'id' => 'tags', |
235 | 235 | 'type' => 'radio_inline', |
236 | 236 | 'default' => 'disabled', |
237 | 237 | 'options' => array( |
238 | - 'enabled' => __( 'Enabled', 'give' ), |
|
239 | - 'disabled' => __( 'Disabled', 'give' ), |
|
238 | + 'enabled' => __('Enabled', 'give'), |
|
239 | + 'disabled' => __('Disabled', 'give'), |
|
240 | 240 | ), |
241 | 241 | ), |
242 | 242 | array( |
243 | - 'name' => __( 'Taxonomies Docs Link', 'give' ), |
|
243 | + 'name' => __('Taxonomies Docs Link', 'give'), |
|
244 | 244 | 'id' => 'taxonomies_settings_docs_link', |
245 | - 'url' => esc_url( 'http://docs.givewp.com/settings-taxonomies' ), |
|
246 | - 'title' => __( 'Taxonomies Settings', 'give' ), |
|
245 | + 'url' => esc_url('http://docs.givewp.com/settings-taxonomies'), |
|
246 | + 'title' => __('Taxonomies Settings', 'give'), |
|
247 | 247 | 'type' => 'give_docs_link', |
248 | 248 | ), |
249 | 249 | array( |
@@ -260,36 +260,36 @@ discard block |
||
260 | 260 | 'type' => 'title', |
261 | 261 | ), |
262 | 262 | array( |
263 | - 'name' => __( 'Terms and Conditions', 'give' ), |
|
264 | - 'desc' => __( 'Would you like donors to require that donors agree to your terms when donating? Note: You can enable/disable this option and customize the terms per form as well.', 'give' ), |
|
263 | + 'name' => __('Terms and Conditions', 'give'), |
|
264 | + 'desc' => __('Would you like donors to require that donors agree to your terms when donating? Note: You can enable/disable this option and customize the terms per form as well.', 'give'), |
|
265 | 265 | 'id' => 'terms', |
266 | 266 | 'type' => 'radio_inline', |
267 | 267 | 'default' => 'disabled', |
268 | 268 | 'options' => array( |
269 | - 'enabled' => __( 'Enabled', 'give' ), |
|
270 | - 'disabled' => __( 'Disabled', 'give' ), |
|
269 | + 'enabled' => __('Enabled', 'give'), |
|
270 | + 'disabled' => __('Disabled', 'give'), |
|
271 | 271 | ), |
272 | 272 | ), |
273 | 273 | array( |
274 | - 'name' => __( 'Agree to Terms Label', 'give' ), |
|
275 | - 'desc' => __( 'The label shown next to the agree to terms check box. Customize it here or leave blank to use the default placeholder text. Note: You can customize the label per form.', 'give' ), |
|
274 | + 'name' => __('Agree to Terms Label', 'give'), |
|
275 | + 'desc' => __('The label shown next to the agree to terms check box. Customize it here or leave blank to use the default placeholder text. Note: You can customize the label per form.', 'give'), |
|
276 | 276 | 'id' => 'agree_to_terms_label', |
277 | 277 | 'attributes' => array( |
278 | - 'placeholder' => esc_attr__( 'Agree to Terms?', 'give' ), |
|
278 | + 'placeholder' => esc_attr__('Agree to Terms?', 'give'), |
|
279 | 279 | ), |
280 | 280 | 'type' => 'text', |
281 | 281 | ), |
282 | 282 | array( |
283 | - 'name' => __( 'Agreement Text', 'give' ), |
|
284 | - 'desc' => __( 'This is the actual text which the user will be asked to agree to in order to donate. Note: You can customize the content per form as needed.', 'give' ), |
|
283 | + 'name' => __('Agreement Text', 'give'), |
|
284 | + 'desc' => __('This is the actual text which the user will be asked to agree to in order to donate. Note: You can customize the content per form as needed.', 'give'), |
|
285 | 285 | 'id' => 'agreement_text', |
286 | 286 | 'type' => 'wysiwyg', |
287 | 287 | ), |
288 | 288 | array( |
289 | - 'name' => __( 'Terms and Conditions Docs Link', 'give' ), |
|
289 | + 'name' => __('Terms and Conditions Docs Link', 'give'), |
|
290 | 290 | 'id' => 'terms_settings_docs_link', |
291 | - 'url' => esc_url( 'http://docs.givewp.com/settings-terms' ), |
|
292 | - 'title' => __( 'Terms and Conditions Settings', 'give' ), |
|
291 | + 'url' => esc_url('http://docs.givewp.com/settings-terms'), |
|
292 | + 'title' => __('Terms and Conditions Settings', 'give'), |
|
293 | 293 | 'type' => 'give_docs_link', |
294 | 294 | ), |
295 | 295 | array( |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | * Filter the display options settings. |
305 | 305 | * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8 |
306 | 306 | */ |
307 | - $settings = apply_filters( 'give_settings_display', $settings ); |
|
307 | + $settings = apply_filters('give_settings_display', $settings); |
|
308 | 308 | |
309 | 309 | /** |
310 | 310 | * Filter the settings. |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | * |
314 | 314 | * @param array $settings |
315 | 315 | */ |
316 | - $settings = apply_filters( 'give_get_settings_' . $this->id, $settings ); |
|
316 | + $settings = apply_filters('give_get_settings_'.$this->id, $settings); |
|
317 | 317 | |
318 | 318 | // Output. |
319 | 319 | return $settings; |
@@ -327,13 +327,13 @@ discard block |
||
327 | 327 | */ |
328 | 328 | public function get_sections() { |
329 | 329 | $sections = array( |
330 | - 'display-settings' => __( 'Display', 'give' ), |
|
331 | - 'post-types' => __( 'Post Types', 'give' ), |
|
332 | - 'taxonomies' => __( 'Taxonomies', 'give' ), |
|
333 | - 'term-and-conditions' => __( 'Terms and Conditions', 'give' ), |
|
330 | + 'display-settings' => __('Display', 'give'), |
|
331 | + 'post-types' => __('Post Types', 'give'), |
|
332 | + 'taxonomies' => __('Taxonomies', 'give'), |
|
333 | + 'term-and-conditions' => __('Terms and Conditions', 'give'), |
|
334 | 334 | ); |
335 | 335 | |
336 | - return apply_filters( 'give_get_sections_' . $this->id, $sections ); |
|
336 | + return apply_filters('give_get_sections_'.$this->id, $sections); |
|
337 | 337 | } |
338 | 338 | } |
339 | 339 |
@@ -9,11 +9,11 @@ discard block |
||
9 | 9 | * @since 1.8 |
10 | 10 | */ |
11 | 11 | |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if ( ! defined('ABSPATH')) { |
|
13 | 13 | exit; // Exit if accessed directly |
14 | 14 | } |
15 | 15 | |
16 | -if ( ! class_exists( 'Give_Settings_Email' ) ) : |
|
16 | +if ( ! class_exists('Give_Settings_Email')) : |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Give_Settings_Email. |
@@ -27,13 +27,13 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function __construct() { |
29 | 29 | $this->id = 'emails'; |
30 | - $this->label = esc_html__( 'Emails', 'give' ); |
|
30 | + $this->label = esc_html__('Emails', 'give'); |
|
31 | 31 | |
32 | 32 | $this->default_tab = 'email-settings'; |
33 | 33 | |
34 | 34 | parent::__construct(); |
35 | 35 | |
36 | - add_action( 'give_admin_field_email_notification', array( $this, 'email_notification_setting' ) ); |
|
36 | + add_action('give_admin_field_email_notification', array($this, 'email_notification_setting')); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -46,13 +46,13 @@ discard block |
||
46 | 46 | $settings = array(); |
47 | 47 | $current_section = give_get_current_setting_section(); |
48 | 48 | |
49 | - switch ( $current_section ) { |
|
49 | + switch ($current_section) { |
|
50 | 50 | case 'email-settings' : |
51 | 51 | $settings = array( |
52 | 52 | |
53 | 53 | // Section 1: Email Notification Listing. |
54 | 54 | array( |
55 | - 'desc' => __( 'Email notifications sent from Give are listed below. Click on an email to configure it.', 'give' ), |
|
55 | + 'desc' => __('Email notifications sent from Give are listed below. Click on an email to configure it.', 'give'), |
|
56 | 56 | 'type' => 'title', |
57 | 57 | 'id' => 'give_email_notification_settings', |
58 | 58 | 'table_html' => false, |
@@ -67,42 +67,42 @@ discard block |
||
67 | 67 | |
68 | 68 | // Section 2: Email Sender Setting |
69 | 69 | array( |
70 | - 'title' => __( 'Email Sender Options', 'give' ), |
|
70 | + 'title' => __('Email Sender Options', 'give'), |
|
71 | 71 | 'id' => 'give_title_email_settings_1', |
72 | 72 | 'type' => 'title', |
73 | 73 | ), |
74 | 74 | array( |
75 | 75 | 'id' => 'email_template', |
76 | - 'name' => esc_html__( 'Email Template', 'give' ), |
|
77 | - 'desc' => esc_html__( 'Choose your template from the available registered template types.', 'give' ), |
|
76 | + 'name' => esc_html__('Email Template', 'give'), |
|
77 | + 'desc' => esc_html__('Choose your template from the available registered template types.', 'give'), |
|
78 | 78 | 'type' => 'select', |
79 | 79 | 'options' => give_get_email_templates(), |
80 | 80 | ), |
81 | 81 | array( |
82 | 82 | 'id' => 'email_logo', |
83 | - 'name' => esc_html__( 'Logo', 'give' ), |
|
84 | - 'desc' => esc_html__( 'Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only.', 'give' ), |
|
83 | + 'name' => esc_html__('Logo', 'give'), |
|
84 | + 'desc' => esc_html__('Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only.', 'give'), |
|
85 | 85 | 'type' => 'file', |
86 | 86 | ), |
87 | 87 | array( |
88 | 88 | 'id' => 'from_name', |
89 | - 'name' => esc_html__( 'From Name', 'give' ), |
|
90 | - 'desc' => esc_html__( 'The name which appears in the "From" field in all Give donation emails.', 'give' ), |
|
91 | - 'default' => get_bloginfo( 'name' ), |
|
89 | + 'name' => esc_html__('From Name', 'give'), |
|
90 | + 'desc' => esc_html__('The name which appears in the "From" field in all Give donation emails.', 'give'), |
|
91 | + 'default' => get_bloginfo('name'), |
|
92 | 92 | 'type' => 'text', |
93 | 93 | ), |
94 | 94 | array( |
95 | 95 | 'id' => 'from_email', |
96 | - 'name' => esc_html__( 'From Email', 'give' ), |
|
97 | - 'desc' => esc_html__( 'Email address from which all Give emails are sent from. This will act as the "from" and "reply-to" email address.', 'give' ), |
|
98 | - 'default' => get_bloginfo( 'admin_email' ), |
|
96 | + 'name' => esc_html__('From Email', 'give'), |
|
97 | + 'desc' => esc_html__('Email address from which all Give emails are sent from. This will act as the "from" and "reply-to" email address.', 'give'), |
|
98 | + 'default' => get_bloginfo('admin_email'), |
|
99 | 99 | 'type' => 'text', |
100 | 100 | ), |
101 | 101 | array( |
102 | - 'name' => esc_html__( 'Donation Notification Settings Docs Link', 'give' ), |
|
102 | + 'name' => esc_html__('Donation Notification Settings Docs Link', 'give'), |
|
103 | 103 | 'id' => 'donation_notification_settings_docs_link', |
104 | - 'url' => esc_url( 'http://docs.givewp.com/settings-donation-notification' ), |
|
105 | - 'title' => __( 'Donation Notification Settings', 'give' ), |
|
104 | + 'url' => esc_url('http://docs.givewp.com/settings-donation-notification'), |
|
105 | + 'title' => __('Donation Notification Settings', 'give'), |
|
106 | 106 | 'type' => 'give_docs_link', |
107 | 107 | ), |
108 | 108 | array( |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * Filter the emails settings. |
118 | 118 | * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8 |
119 | 119 | */ |
120 | - $settings = apply_filters( 'give_settings_emails', $settings ); |
|
120 | + $settings = apply_filters('give_settings_emails', $settings); |
|
121 | 121 | |
122 | 122 | /** |
123 | 123 | * Filter the settings. |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | * |
127 | 127 | * @param array $settings |
128 | 128 | */ |
129 | - $settings = apply_filters( 'give_get_settings_' . $this->id, $settings ); |
|
129 | + $settings = apply_filters('give_get_settings_'.$this->id, $settings); |
|
130 | 130 | |
131 | 131 | // Output. |
132 | 132 | return $settings; |
@@ -140,10 +140,10 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function get_sections() { |
142 | 142 | $sections = array( |
143 | - 'email-settings' => esc_html__( 'Email Settings', 'give' ), |
|
143 | + 'email-settings' => esc_html__('Email Settings', 'give'), |
|
144 | 144 | ); |
145 | 145 | |
146 | - return apply_filters( 'give_get_sections_' . $this->id, $sections ); |
|
146 | + return apply_filters('give_get_sections_'.$this->id, $sections); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public function email_notification_setting() { |
156 | 156 | // Load email notification table. |
157 | - require_once GIVE_PLUGIN_DIR . 'includes/admin/emails/class-email-notification-table.php'; |
|
157 | + require_once GIVE_PLUGIN_DIR.'includes/admin/emails/class-email-notification-table.php'; |
|
158 | 158 | |
159 | 159 | // Init table. |
160 | 160 | $email_notifications_table = new Give_Email_Notification_Table(); |
@@ -173,13 +173,13 @@ discard block |
||
173 | 173 | * @return void |
174 | 174 | */ |
175 | 175 | public function output() { |
176 | - if ( $this->enable_save ) { |
|
177 | - $GLOBALS['give_hide_save_button'] = apply_filters( 'give_hide_save_button_on_email_admin_setting_page', false ); |
|
176 | + if ($this->enable_save) { |
|
177 | + $GLOBALS['give_hide_save_button'] = apply_filters('give_hide_save_button_on_email_admin_setting_page', false); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | $settings = $this->get_settings(); |
181 | 181 | |
182 | - Give_Admin_Settings::output_fields( $settings, 'give_settings' ); |
|
182 | + Give_Admin_Settings::output_fields($settings, 'give_settings'); |
|
183 | 183 | } |
184 | 184 | } |
185 | 185 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | */ |
10 | 10 | |
11 | 11 | // Exit if accessed directly. |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if ( ! defined('ABSPATH')) { |
|
13 | 13 | exit; |
14 | 14 | } |
15 | 15 | |
@@ -23,10 +23,10 @@ discard block |
||
23 | 23 | */ |
24 | 24 | public function __construct() { |
25 | 25 | |
26 | - $this->shortcode['title'] = __( 'Give Totals', 'give' ); |
|
27 | - $this->shortcode['label'] = __( 'Give Totals', 'give' ); |
|
26 | + $this->shortcode['title'] = __('Give Totals', 'give'); |
|
27 | + $this->shortcode['label'] = __('Give Totals', 'give'); |
|
28 | 28 | |
29 | - parent::__construct( 'give_totals' ); |
|
29 | + parent::__construct('give_totals'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -39,66 +39,66 @@ discard block |
||
39 | 39 | |
40 | 40 | $category_options = array(); |
41 | 41 | $category_lists = array(); |
42 | - $categories = get_terms( 'give_forms_category', apply_filters( 'give_forms_category_dropdown', array() ) ); |
|
43 | - if ( give_is_setting_enabled( give_get_option( 'categories' ) ) && ! is_wp_error( $categories ) ) { |
|
44 | - foreach ( $categories as $category ) { |
|
45 | - $category_options[ absint( $category->term_id ) ] = esc_html( $category->name ); |
|
42 | + $categories = get_terms('give_forms_category', apply_filters('give_forms_category_dropdown', array())); |
|
43 | + if (give_is_setting_enabled(give_get_option('categories')) && ! is_wp_error($categories)) { |
|
44 | + foreach ($categories as $category) { |
|
45 | + $category_options[absint($category->term_id)] = esc_html($category->name); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | $category_lists['type'] = 'listbox'; |
49 | 49 | $category_lists['name'] = 'cats'; |
50 | - $category_lists['label'] = __( 'Select a Donation Form Category:', 'give' ); |
|
51 | - $category_lists['tooltip'] = __( 'Select a Donation Form Category', 'give' ); |
|
50 | + $category_lists['label'] = __('Select a Donation Form Category:', 'give'); |
|
51 | + $category_lists['tooltip'] = __('Select a Donation Form Category', 'give'); |
|
52 | 52 | $category_lists['options'] = $category_options; |
53 | 53 | } |
54 | 54 | |
55 | 55 | $tag_options = array(); |
56 | 56 | $tag_lists = array(); |
57 | - $tags = get_terms( 'give_forms_tag', apply_filters( 'give_forms_tag_dropdown', array() ) ); |
|
58 | - if ( give_is_setting_enabled( give_get_option( 'tags' ) ) && ! is_wp_error( $tags ) ) { |
|
59 | - $tags = get_terms( 'give_forms_tag', apply_filters( 'give_forms_tag_dropdown', array() ) ); |
|
60 | - foreach ( $tags as $tag ) { |
|
61 | - $tag_options[ absint( $tag->term_id ) ] = esc_html( $tag->name ); |
|
57 | + $tags = get_terms('give_forms_tag', apply_filters('give_forms_tag_dropdown', array())); |
|
58 | + if (give_is_setting_enabled(give_get_option('tags')) && ! is_wp_error($tags)) { |
|
59 | + $tags = get_terms('give_forms_tag', apply_filters('give_forms_tag_dropdown', array())); |
|
60 | + foreach ($tags as $tag) { |
|
61 | + $tag_options[absint($tag->term_id)] = esc_html($tag->name); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $tag_lists['type'] = 'listbox'; |
65 | 65 | $tag_lists['name'] = 'tags'; |
66 | - $tag_lists['label'] = __( 'Select a Donation Form Tag:', 'give' ); |
|
67 | - $tag_lists['tooltip'] = __( 'Select a Donation Form Tag', 'give' ); |
|
66 | + $tag_lists['label'] = __('Select a Donation Form Tag:', 'give'); |
|
67 | + $tag_lists['tooltip'] = __('Select a Donation Form Tag', 'give'); |
|
68 | 68 | $tag_lists['options'] = $tag_options; |
69 | 69 | } |
70 | 70 | |
71 | 71 | return array( |
72 | 72 | array( |
73 | 73 | 'type' => 'container', |
74 | - 'html' => sprintf( '<p class="give-totals-shortcode-container-message">%s</p>', |
|
75 | - __( 'This shortcode shows the total amount raised towards a custom goal for one or several forms regardless of whether they have goals enabled or not.', 'give' ) |
|
74 | + 'html' => sprintf('<p class="give-totals-shortcode-container-message">%s</p>', |
|
75 | + __('This shortcode shows the total amount raised towards a custom goal for one or several forms regardless of whether they have goals enabled or not.', 'give') |
|
76 | 76 | ), |
77 | 77 | ), |
78 | 78 | array( |
79 | 79 | 'type' => 'container', |
80 | - 'html' => sprintf( '<p class="strong margin-top">%s</p>', __( 'Shortcode Configuration', 'give' ) ), |
|
80 | + 'html' => sprintf('<p class="strong margin-top">%s</p>', __('Shortcode Configuration', 'give')), |
|
81 | 81 | ), |
82 | 82 | array( |
83 | 83 | 'type' => 'textbox', |
84 | 84 | 'name' => 'ids', |
85 | - 'label' => __( 'Donation Form IDs:', 'give' ), |
|
86 | - 'tooltip' => __( 'Enter the IDs separated by commas for the donation forms you would like to combine within the totals.', 'give' ), |
|
85 | + 'label' => __('Donation Form IDs:', 'give'), |
|
86 | + 'tooltip' => __('Enter the IDs separated by commas for the donation forms you would like to combine within the totals.', 'give'), |
|
87 | 87 | ), |
88 | 88 | $category_lists, |
89 | 89 | $tag_lists, |
90 | 90 | array( |
91 | 91 | 'type' => 'textbox', |
92 | 92 | 'name' => 'total_goal', |
93 | - 'label' => __( 'Total Goal:', 'give' ), |
|
94 | - 'tooltip' => __( 'Enter the total goal amount that you would like to display.', 'give' ), |
|
93 | + 'label' => __('Total Goal:', 'give'), |
|
94 | + 'tooltip' => __('Enter the total goal amount that you would like to display.', 'give'), |
|
95 | 95 | ), |
96 | 96 | array( |
97 | 97 | 'type' => 'textbox', |
98 | 98 | 'name' => 'message', |
99 | - 'label' => __( 'Message:', 'give' ), |
|
100 | - 'tooltip' => __( 'Enter a message to display encouraging donors to support the goal.', 'give' ), |
|
101 | - 'value' => apply_filters( 'give_totals_message', __( 'Hey! We\'ve raised {total} of the {total_goal} we are trying to raise for this campaign!', 'give' ) ), |
|
99 | + 'label' => __('Message:', 'give'), |
|
100 | + 'tooltip' => __('Enter a message to display encouraging donors to support the goal.', 'give'), |
|
101 | + 'value' => apply_filters('give_totals_message', __('Hey! We\'ve raised {total} of the {total_goal} we are trying to raise for this campaign!', 'give')), |
|
102 | 102 | 'multiline' => true, |
103 | 103 | 'minWidth' => 300, |
104 | 104 | 'minHeight' => 60, |
@@ -106,24 +106,24 @@ discard block |
||
106 | 106 | array( |
107 | 107 | 'type' => 'textbox', |
108 | 108 | 'name' => 'link', |
109 | - 'label' => __( 'Link:', 'give' ), |
|
110 | - 'tooltip' => __( 'Enter a link to the main campaign donation form.', 'give' ), |
|
109 | + 'label' => __('Link:', 'give'), |
|
110 | + 'tooltip' => __('Enter a link to the main campaign donation form.', 'give'), |
|
111 | 111 | ), |
112 | 112 | array( |
113 | 113 | 'type' => 'textbox', |
114 | 114 | 'name' => 'link_text', |
115 | - 'label' => __( 'Link Text:', 'give' ), |
|
116 | - 'tooltip' => __( 'Enter hyperlink text for the link to the main campaign donation form.', 'give' ), |
|
117 | - 'value' => __( 'Donate!', 'give' ), |
|
115 | + 'label' => __('Link Text:', 'give'), |
|
116 | + 'tooltip' => __('Enter hyperlink text for the link to the main campaign donation form.', 'give'), |
|
117 | + 'value' => __('Donate!', 'give'), |
|
118 | 118 | ), |
119 | 119 | array( |
120 | 120 | 'type' => 'listbox', |
121 | 121 | 'name' => 'progress_bar', |
122 | - 'label' => __( 'Show Progress Bar:', 'give' ), |
|
123 | - 'tooltip' => __( 'Select whether you would like to show a goal progress bar.', 'give' ), |
|
122 | + 'label' => __('Show Progress Bar:', 'give'), |
|
123 | + 'tooltip' => __('Select whether you would like to show a goal progress bar.', 'give'), |
|
124 | 124 | 'options' => array( |
125 | - 'true' => __( 'Show', 'give' ), |
|
126 | - 'false' => __( 'Hide', 'give' ), |
|
125 | + 'true' => __('Show', 'give'), |
|
126 | + 'false' => __('Hide', 'give'), |
|
127 | 127 | ), |
128 | 128 | 'value' => 'true', |
129 | 129 | ), |