@@ -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 | |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | */ |
25 | 25 | function give_customers_page() { |
26 | 26 | $default_views = give_customer_views(); |
27 | - $requested_view = isset( $_GET['view'] ) ? sanitize_text_field( $_GET['view'] ) : 'customers'; |
|
28 | - if ( array_key_exists( $requested_view, $default_views ) && function_exists( $default_views[ $requested_view ] ) ) { |
|
29 | - give_render_customer_view( $requested_view, $default_views ); |
|
27 | + $requested_view = isset($_GET['view']) ? sanitize_text_field($_GET['view']) : 'customers'; |
|
28 | + if (array_key_exists($requested_view, $default_views) && function_exists($default_views[$requested_view])) { |
|
29 | + give_render_customer_view($requested_view, $default_views); |
|
30 | 30 | } else { |
31 | 31 | give_customers_list(); |
32 | 32 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | $views = array(); |
44 | 44 | |
45 | - return apply_filters( 'give_customer_views', $views ); |
|
45 | + return apply_filters('give_customer_views', $views); |
|
46 | 46 | |
47 | 47 | } |
48 | 48 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | $tabs = array(); |
58 | 58 | |
59 | - return apply_filters( 'give_customer_tabs', $tabs ); |
|
59 | + return apply_filters('give_customer_tabs', $tabs); |
|
60 | 60 | |
61 | 61 | } |
62 | 62 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @return void |
68 | 68 | */ |
69 | 69 | function give_customers_list() { |
70 | - include( dirname( __FILE__ ) . '/class-customer-table.php' ); |
|
70 | + include(dirname(__FILE__).'/class-customer-table.php'); |
|
71 | 71 | |
72 | 72 | $customers_table = new Give_Customer_Reports_Table(); |
73 | 73 | $customers_table->prepare_items(); |
@@ -80,11 +80,11 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @since 1.0 |
82 | 82 | */ |
83 | - do_action( 'give_donors_table_top' ); |
|
83 | + do_action('give_donors_table_top'); |
|
84 | 84 | ?> |
85 | - <form id="give-donors-filter" method="get" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-donors' ); ?>"> |
|
85 | + <form id="give-donors-filter" method="get" action="<?php echo admin_url('edit.php?post_type=give_forms&page=give-donors'); ?>"> |
|
86 | 86 | <?php |
87 | - $customers_table->search_box( esc_html__( 'Search Donors', 'give' ), 'give-donors' ); |
|
87 | + $customers_table->search_box(esc_html__('Search Donors', 'give'), 'give-donors'); |
|
88 | 88 | $customers_table->display(); |
89 | 89 | ?> |
90 | 90 | <input type="hidden" name="post_type" value="give_forms" /> |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * |
98 | 98 | * @since 1.0 |
99 | 99 | */ |
100 | - do_action( 'give_donors_table_bottom' ); |
|
100 | + do_action('give_donors_table_bottom'); |
|
101 | 101 | ?> |
102 | 102 | </div> |
103 | 103 | <?php |
@@ -113,27 +113,27 @@ discard block |
||
113 | 113 | * |
114 | 114 | * @return void |
115 | 115 | */ |
116 | -function give_render_customer_view( $view, $callbacks ) { |
|
116 | +function give_render_customer_view($view, $callbacks) { |
|
117 | 117 | |
118 | 118 | $render = true; |
119 | 119 | |
120 | - $customer_view_role = apply_filters( 'give_view_customers_role', 'view_give_reports' ); |
|
120 | + $customer_view_role = apply_filters('give_view_customers_role', 'view_give_reports'); |
|
121 | 121 | |
122 | - if ( ! current_user_can( $customer_view_role ) ) { |
|
123 | - give_set_error( 'give-no-access', esc_html__( 'You are not permitted to view this data.', 'give' ) ); |
|
122 | + if ( ! current_user_can($customer_view_role)) { |
|
123 | + give_set_error('give-no-access', esc_html__('You are not permitted to view this data.', 'give')); |
|
124 | 124 | $render = false; |
125 | 125 | } |
126 | 126 | |
127 | - if ( ! isset( $_GET['id'] ) || ! is_numeric( $_GET['id'] ) ) { |
|
128 | - give_set_error( 'give-invalid_customer', esc_html__( 'Invalid Donor ID.', 'give' ) ); |
|
127 | + if ( ! isset($_GET['id']) || ! is_numeric($_GET['id'])) { |
|
128 | + give_set_error('give-invalid_customer', esc_html__('Invalid Donor ID.', 'give')); |
|
129 | 129 | $render = false; |
130 | 130 | } |
131 | 131 | |
132 | 132 | $customer_id = (int) $_GET['id']; |
133 | - $customer = new Give_Customer( $customer_id ); |
|
133 | + $customer = new Give_Customer($customer_id); |
|
134 | 134 | |
135 | - if ( empty( $customer->id ) ) { |
|
136 | - give_set_error( 'give-invalid_customer', esc_html__( 'Invalid Donor ID.', 'give' ) ); |
|
135 | + if (empty($customer->id)) { |
|
136 | + give_set_error('give-invalid_customer', esc_html__('Invalid Donor ID.', 'give')); |
|
137 | 137 | $render = false; |
138 | 138 | } |
139 | 139 | |
@@ -142,34 +142,34 @@ discard block |
||
142 | 142 | |
143 | 143 | <div class='wrap'> |
144 | 144 | |
145 | - <?php if ( give_get_errors() ) : ?> |
|
145 | + <?php if (give_get_errors()) : ?> |
|
146 | 146 | <div class="error settings-error"> |
147 | - <?php give_print_errors( 0 ); ?> |
|
147 | + <?php give_print_errors(0); ?> |
|
148 | 148 | </div> |
149 | 149 | <?php endif; ?> |
150 | 150 | |
151 | - <h1 class="screen-reader-text"><?php esc_html_e( 'Donor', 'give' ); ?></h1> |
|
151 | + <h1 class="screen-reader-text"><?php esc_html_e('Donor', 'give'); ?></h1> |
|
152 | 152 | |
153 | - <?php if ( $customer && $render ) : ?> |
|
153 | + <?php if ($customer && $render) : ?> |
|
154 | 154 | |
155 | 155 | <h2 class="nav-tab-wrapper"> |
156 | 156 | <?php |
157 | - foreach ( $customer_tabs as $key => $tab ) : |
|
157 | + foreach ($customer_tabs as $key => $tab) : |
|
158 | 158 | $active = $key === $view ? true : false; |
159 | 159 | $class = $active ? 'nav-tab nav-tab-active' : 'nav-tab'; |
160 | 160 | printf( |
161 | 161 | '<a href="%1$s" class="%2$s"><span class="dashicons %3$s"></span>%4$s</a>'."\n", |
162 | - esc_url( admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=' . $key . '&id=' . $customer->id ) ), |
|
163 | - esc_attr( $class ), |
|
164 | - sanitize_html_class( $tab['dashicon'] ), |
|
165 | - esc_html( $tab['title'] ) |
|
162 | + esc_url(admin_url('edit.php?post_type=give_forms&page=give-donors&view='.$key.'&id='.$customer->id)), |
|
163 | + esc_attr($class), |
|
164 | + sanitize_html_class($tab['dashicon']), |
|
165 | + esc_html($tab['title']) |
|
166 | 166 | ); |
167 | 167 | endforeach; |
168 | 168 | ?> |
169 | 169 | </h2> |
170 | 170 | |
171 | 171 | <div id="give-customer-card-wrapper"> |
172 | - <?php $callbacks[ $view ]( $customer ) ?> |
|
172 | + <?php $callbacks[$view]($customer) ?> |
|
173 | 173 | </div> |
174 | 174 | |
175 | 175 | <?php endif; ?> |
@@ -189,9 +189,9 @@ discard block |
||
189 | 189 | * |
190 | 190 | * @return void |
191 | 191 | */ |
192 | -function give_customers_view( $customer ) { |
|
192 | +function give_customers_view($customer) { |
|
193 | 193 | |
194 | - $customer_edit_role = apply_filters( 'give_edit_customers_role', 'edit_give_payments' ); |
|
194 | + $customer_edit_role = apply_filters('give_edit_customers_role', 'edit_give_payments'); |
|
195 | 195 | |
196 | 196 | /** |
197 | 197 | * Fires in donor profile screen, above the donor card. |
@@ -200,32 +200,32 @@ discard block |
||
200 | 200 | * |
201 | 201 | * @param object $customer The customer object being displayed. |
202 | 202 | */ |
203 | - do_action( 'give_donor_card_top', $customer ); |
|
203 | + do_action('give_donor_card_top', $customer); |
|
204 | 204 | ?> |
205 | 205 | |
206 | 206 | <div id="donor-summary" class="info-wrapper customer-section postbox"> |
207 | 207 | |
208 | - <form id="edit-customer-info" method="post" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $customer->id ); ?>"> |
|
208 | + <form id="edit-customer-info" method="post" action="<?php echo admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$customer->id); ?>"> |
|
209 | 209 | |
210 | 210 | <div class="customer-info"> |
211 | 211 | |
212 | 212 | <div class="donor-bio-header clearfix"> |
213 | 213 | |
214 | 214 | <div class="avatar-wrap left" id="customer-avatar"> |
215 | - <?php echo get_avatar( $customer->email ); ?> |
|
215 | + <?php echo get_avatar($customer->email); ?> |
|
216 | 216 | </div> |
217 | 217 | |
218 | 218 | <div id="customer-name-wrap" class="left"> |
219 | 219 | <span class="customer-id">#<?php echo $customer->id; ?></span> |
220 | - <span class="customer-name info-item edit-item"><input size="15" data-key="name" name="customerinfo[name]" type="text" value="<?php echo esc_attr( $customer->name ); ?>" placeholder="<?php esc_attr_e( 'Donor Name', 'give' ); ?>" /></span> |
|
220 | + <span class="customer-name info-item edit-item"><input size="15" data-key="name" name="customerinfo[name]" type="text" value="<?php echo esc_attr($customer->name); ?>" placeholder="<?php esc_attr_e('Donor Name', 'give'); ?>" /></span> |
|
221 | 221 | <span class="customer-name info-item editable"><span data-key="name"><?php echo $customer->name; ?></span></span> |
222 | 222 | </div> |
223 | 223 | <p class="customer-since info-item"> |
224 | - <?php esc_html_e( 'Donor since', 'give' ); ?> |
|
225 | - <?php echo date_i18n( give_date_format(), strtotime( $customer->date_created ) ) ?> |
|
224 | + <?php esc_html_e('Donor since', 'give'); ?> |
|
225 | + <?php echo date_i18n(give_date_format(), strtotime($customer->date_created)) ?> |
|
226 | 226 | </p> |
227 | - <?php if ( current_user_can( $customer_edit_role ) ): ?> |
|
228 | - <a href="#" id="edit-customer" class="button info-item editable customer-edit-link"><?php esc_html_e( 'Edit Donor', 'give' ); ?></a> |
|
227 | + <?php if (current_user_can($customer_edit_role)): ?> |
|
228 | + <a href="#" id="edit-customer" class="button info-item editable customer-edit-link"><?php esc_html_e('Edit Donor', 'give'); ?></a> |
|
229 | 229 | <?php endif; ?> |
230 | 230 | </div> |
231 | 231 | <!-- /donor-bio-header --> |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | <table class="widefat"> |
236 | 236 | <tbody> |
237 | 237 | <tr class="alternate"> |
238 | - <th scope="col"><label for="tablecell"><?php esc_html_e( 'User ID:', 'give' ); ?></label></th> |
|
238 | + <th scope="col"><label for="tablecell"><?php esc_html_e('User ID:', 'give'); ?></label></th> |
|
239 | 239 | <td class="row-title"> |
240 | 240 | <span class="customer-user-id info-item edit-item"> |
241 | 241 | <?php |
@@ -251,38 +251,38 @@ discard block |
||
251 | 251 | 'data' => $data_atts, |
252 | 252 | ); |
253 | 253 | |
254 | - if ( ! empty( $user_id ) ) { |
|
255 | - $userdata = get_userdata( $user_id ); |
|
254 | + if ( ! empty($user_id)) { |
|
255 | + $userdata = get_userdata($user_id); |
|
256 | 256 | $user_args['value'] = $userdata->user_login; |
257 | 257 | } |
258 | 258 | |
259 | - echo Give()->html->ajax_user_search( $user_args ); |
|
259 | + echo Give()->html->ajax_user_search($user_args); |
|
260 | 260 | ?> |
261 | 261 | <input type="hidden" name="customerinfo[user_id]" data-key="user_id" value="<?php echo $customer->user_id; ?>" /> |
262 | 262 | </span> |
263 | 263 | |
264 | 264 | <span class="customer-user-id info-item editable"> |
265 | - <?php if ( intval( $customer->user_id ) > 0 ) { ?> |
|
265 | + <?php if (intval($customer->user_id) > 0) { ?> |
|
266 | 266 | <span data-key="user_id"><?php echo $customer->user_id; ?></span> |
267 | 267 | <?php } else { ?> |
268 | - <span data-key="user_id"><?php esc_html_e( 'None', 'give' ); ?></span> |
|
268 | + <span data-key="user_id"><?php esc_html_e('None', 'give'); ?></span> |
|
269 | 269 | <?php } ?> |
270 | - <?php if ( current_user_can( $customer_edit_role ) && intval( $customer->user_id ) > 0 ) { ?> |
|
271 | - <span class="disconnect-user"> - <a id="disconnect-customer" href="#disconnect" aria-label="<?php esc_attr_e( 'Disconnects the current user ID from this customer record.', 'give' ); ?>"><?php esc_html_e( 'Disconnect User', 'give' ); ?></a></span> |
|
270 | + <?php if (current_user_can($customer_edit_role) && intval($customer->user_id) > 0) { ?> |
|
271 | + <span class="disconnect-user"> - <a id="disconnect-customer" href="#disconnect" aria-label="<?php esc_attr_e('Disconnects the current user ID from this customer record.', 'give'); ?>"><?php esc_html_e('Disconnect User', 'give'); ?></a></span> |
|
272 | 272 | <?php } ?> |
273 | 273 | </span> |
274 | 274 | </td> |
275 | 275 | </tr> |
276 | - <?php if ( isset( $customer->user_id ) && $customer->user_id > 0 ) : ?> |
|
276 | + <?php if (isset($customer->user_id) && $customer->user_id > 0) : ?> |
|
277 | 277 | |
278 | 278 | <tr> |
279 | - <th scope="col"><?php esc_html_e( 'Address:', 'give' ); ?></th> |
|
279 | + <th scope="col"><?php esc_html_e('Address:', 'give'); ?></th> |
|
280 | 280 | <td class="row-title"> |
281 | 281 | |
282 | 282 | <div class="customer-address-wrapper"> |
283 | 283 | |
284 | 284 | <?php |
285 | - $address = get_user_meta( $customer->user_id, '_give_user_address', true ); |
|
285 | + $address = get_user_meta($customer->user_id, '_give_user_address', true); |
|
286 | 286 | $defaults = array( |
287 | 287 | 'line1' => '', |
288 | 288 | 'line2' => '', |
@@ -292,10 +292,10 @@ discard block |
||
292 | 292 | 'zip' => '' |
293 | 293 | ); |
294 | 294 | |
295 | - $address = wp_parse_args( $address, $defaults ); |
|
295 | + $address = wp_parse_args($address, $defaults); |
|
296 | 296 | ?> |
297 | 297 | |
298 | - <?php if ( ! empty( $address ) ) { ?> |
|
298 | + <?php if ( ! empty($address)) { ?> |
|
299 | 299 | <span class="customer-address info-item editable"> |
300 | 300 | <span class="info-item" data-key="line1"><?php echo $address['line1']; ?></span> |
301 | 301 | <span class="info-item" data-key="line2"><?php echo $address['line2']; ?></span> |
@@ -306,43 +306,43 @@ discard block |
||
306 | 306 | </span> |
307 | 307 | <?php } ?> |
308 | 308 | <span class="customer-address info-item edit-item"> |
309 | - <input class="info-item" type="text" data-key="line1" name="customerinfo[line1]" placeholder="<?php esc_attr_e( 'Address 1', 'give' ); ?>" value="<?php echo $address['line1']; ?>" /> |
|
310 | - <input class="info-item" type="text" data-key="line2" name="customerinfo[line2]" placeholder="<?php esc_attr_e( 'Address 2', 'give' ); ?>" value="<?php echo $address['line2']; ?>" /> |
|
311 | - <input class="info-item" type="text" data-key="city" name="customerinfo[city]" placeholder="<?php esc_attr_e( 'City', 'give' ); ?>" value="<?php echo $address['city']; ?>" /> |
|
309 | + <input class="info-item" type="text" data-key="line1" name="customerinfo[line1]" placeholder="<?php esc_attr_e('Address 1', 'give'); ?>" value="<?php echo $address['line1']; ?>" /> |
|
310 | + <input class="info-item" type="text" data-key="line2" name="customerinfo[line2]" placeholder="<?php esc_attr_e('Address 2', 'give'); ?>" value="<?php echo $address['line2']; ?>" /> |
|
311 | + <input class="info-item" type="text" data-key="city" name="customerinfo[city]" placeholder="<?php esc_attr_e('City', 'give'); ?>" value="<?php echo $address['city']; ?>" /> |
|
312 | 312 | <select data-key="country" name="customerinfo[country]" id="billing_country" class="billing_country give-select edit-item"> |
313 | 313 | <?php |
314 | 314 | |
315 | 315 | $selected_country = $address['country']; |
316 | 316 | |
317 | 317 | $countries = give_get_country_list(); |
318 | - foreach ( $countries as $country_code => $country ) { |
|
319 | - echo '<option value="' . esc_attr( $country_code ) . '"' . selected( $country_code, $selected_country, false ) . '>' . $country . '</option>'; |
|
318 | + foreach ($countries as $country_code => $country) { |
|
319 | + echo '<option value="'.esc_attr($country_code).'"'.selected($country_code, $selected_country, false).'>'.$country.'</option>'; |
|
320 | 320 | } |
321 | 321 | ?> |
322 | 322 | </select> |
323 | 323 | <?php |
324 | 324 | $selected_state = give_get_state(); |
325 | - $states = give_get_states( $selected_country ); |
|
325 | + $states = give_get_states($selected_country); |
|
326 | 326 | |
327 | - $selected_state = isset( $address['state'] ) ? $address['state'] : $selected_state; |
|
327 | + $selected_state = isset($address['state']) ? $address['state'] : $selected_state; |
|
328 | 328 | |
329 | - if ( ! empty( $states ) ) { |
|
329 | + if ( ! empty($states)) { |
|
330 | 330 | ?> |
331 | 331 | <select data-key="state" name="customerinfo[state]" id="card_state" class="card_state give-select info-item"> |
332 | 332 | <?php |
333 | - foreach ( $states as $state_code => $state ) { |
|
334 | - echo '<option value="' . $state_code . '"' . selected( $state_code, $selected_state, false ) . '>' . $state . '</option>'; |
|
333 | + foreach ($states as $state_code => $state) { |
|
334 | + echo '<option value="'.$state_code.'"'.selected($state_code, $selected_state, false).'>'.$state.'</option>'; |
|
335 | 335 | } |
336 | 336 | ?> |
337 | 337 | </select> |
338 | 338 | <?php |
339 | 339 | } else { |
340 | 340 | ?> |
341 | - <input type="text" size="6" data-key="state" name="customerinfo[state]" id="card_state" class="card_state give-input info-item" placeholder="<?php esc_attr_e( 'State / Province', 'give' ); ?>" /> |
|
341 | + <input type="text" size="6" data-key="state" name="customerinfo[state]" id="card_state" class="card_state give-input info-item" placeholder="<?php esc_attr_e('State / Province', 'give'); ?>" /> |
|
342 | 342 | <?php |
343 | 343 | } |
344 | 344 | ?> |
345 | - <input class="info-item" type="text" data-key="zip" name="customerinfo[zip]" placeholder="<?php esc_attr_e( 'Zip / Postal Code', 'give' ); ?>" value="<?php echo $address['zip']; ?>" /> |
|
345 | + <input class="info-item" type="text" data-key="zip" name="customerinfo[zip]" placeholder="<?php esc_attr_e('Zip / Postal Code', 'give'); ?>" value="<?php echo $address['zip']; ?>" /> |
|
346 | 346 | </span> |
347 | 347 | |
348 | 348 | </div> |
@@ -358,10 +358,10 @@ discard block |
||
358 | 358 | |
359 | 359 | <span id="customer-edit-actions" class="edit-item"> |
360 | 360 | <input type="hidden" data-key="id" name="customerinfo[id]" value="<?php echo $customer->id; ?>" /> |
361 | - <?php wp_nonce_field( 'edit-customer', '_wpnonce', false, true ); ?> |
|
361 | + <?php wp_nonce_field('edit-customer', '_wpnonce', false, true); ?> |
|
362 | 362 | <input type="hidden" name="give_action" value="edit-customer" /> |
363 | - <input type="submit" id="give-edit-customer-save" class="button-secondary" value="<?php esc_attr_e( 'Update Donor', 'give' ); ?>" /> |
|
364 | - <a id="give-edit-customer-cancel" href="" class="delete"><?php esc_html_e( 'Cancel', 'give' ); ?></a> |
|
363 | + <input type="submit" id="give-edit-customer-save" class="button-secondary" value="<?php esc_attr_e('Update Donor', 'give'); ?>" /> |
|
364 | + <a id="give-edit-customer-cancel" href="" class="delete"><?php esc_html_e('Cancel', 'give'); ?></a> |
|
365 | 365 | </span> |
366 | 366 | |
367 | 367 | </form> |
@@ -376,24 +376,24 @@ discard block |
||
376 | 376 | * |
377 | 377 | * @param object $customer The customer object being displayed. |
378 | 378 | */ |
379 | - do_action( 'give_donor_before_stats', $customer ); |
|
379 | + do_action('give_donor_before_stats', $customer); |
|
380 | 380 | ?> |
381 | 381 | |
382 | 382 | <div id="customer-stats-wrapper" class="customer-section postbox clear"> |
383 | 383 | <ul> |
384 | 384 | <li> |
385 | - <a href="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $customer->email ) ); ?>"> |
|
385 | + <a href="<?php echo admin_url('edit.php?post_type=give_forms&page=give-payment-history&user='.urlencode($customer->email)); ?>"> |
|
386 | 386 | <span class="dashicons dashicons-heart"></span> |
387 | 387 | <?php |
388 | 388 | //Completed Donations |
389 | - $completed_donations_text = sprintf( _n( '%d Completed Donation', '%d Completed Donations', $customer->purchase_count, 'give' ), $customer->purchase_count ); |
|
390 | - echo apply_filters( 'give_donor_completed_donations', $completed_donations_text, $customer ); |
|
389 | + $completed_donations_text = sprintf(_n('%d Completed Donation', '%d Completed Donations', $customer->purchase_count, 'give'), $customer->purchase_count); |
|
390 | + echo apply_filters('give_donor_completed_donations', $completed_donations_text, $customer); |
|
391 | 391 | ?> |
392 | 392 | </a> |
393 | 393 | </li> |
394 | 394 | <li> |
395 | 395 | <span class="dashicons dashicons-chart-area"></span> |
396 | - <?php echo give_currency_filter( give_format_amount( $customer->purchase_value ) ); ?> <?php esc_html_e( 'Lifetime Donations', 'give' ); ?> |
|
396 | + <?php echo give_currency_filter(give_format_amount($customer->purchase_value)); ?> <?php esc_html_e('Lifetime Donations', 'give'); ?> |
|
397 | 397 | </li> |
398 | 398 | <?php |
399 | 399 | /** |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | * |
406 | 406 | * @param object $customer The customer object being displayed. |
407 | 407 | */ |
408 | - do_action( 'give_donor_stats_list', $customer ); |
|
408 | + do_action('give_donor_stats_list', $customer); |
|
409 | 409 | ?> |
410 | 410 | </ul> |
411 | 411 | </div> |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | * |
419 | 419 | * @param object $customer The customer object being displayed. |
420 | 420 | */ |
421 | - do_action( 'give_donor_before_tables_wrapper', $customer ); |
|
421 | + do_action('give_donor_before_tables_wrapper', $customer); |
|
422 | 422 | ?> |
423 | 423 | |
424 | 424 | <div id="customer-tables-wrapper" class="customer-section"> |
@@ -431,40 +431,40 @@ discard block |
||
431 | 431 | * |
432 | 432 | * @param object $customer The customer object being displayed. |
433 | 433 | */ |
434 | - do_action( 'give_donor_before_tables', $customer ); |
|
434 | + do_action('give_donor_before_tables', $customer); |
|
435 | 435 | ?> |
436 | 436 | |
437 | - <h3><?php _e( 'Donor Emails', 'give' ); ?></h3> |
|
437 | + <h3><?php _e('Donor Emails', 'give'); ?></h3> |
|
438 | 438 | |
439 | 439 | <table class="wp-list-table widefat striped emails"> |
440 | 440 | <thead> |
441 | 441 | <tr> |
442 | - <th><?php _e( 'Email', 'give' ); ?></th> |
|
443 | - <th><?php _e( 'Actions', 'give' ); ?></th> |
|
442 | + <th><?php _e('Email', 'give'); ?></th> |
|
443 | + <th><?php _e('Actions', 'give'); ?></th> |
|
444 | 444 | </tr> |
445 | 445 | </thead> |
446 | 446 | |
447 | 447 | <tbody> |
448 | - <?php if ( ! empty( $customer->emails ) ) { ?> |
|
448 | + <?php if ( ! empty($customer->emails)) { ?> |
|
449 | 449 | |
450 | - <?php foreach ( $customer->emails as $key => $email ) : ?> |
|
450 | + <?php foreach ($customer->emails as $key => $email) : ?> |
|
451 | 451 | <tr data-key="<?php echo $key; ?>"> |
452 | 452 | <td> |
453 | 453 | <?php echo $email; ?> |
454 | - <?php if ( 'primary' === $key ) : ?> |
|
454 | + <?php if ('primary' === $key) : ?> |
|
455 | 455 | <span class="dashicons dashicons-star-filled primary-email-icon"></span> |
456 | 456 | <?php endif; ?> |
457 | 457 | </td> |
458 | 458 | <td> |
459 | - <?php if ( 'primary' !== $key ) : ?> |
|
459 | + <?php if ('primary' !== $key) : ?> |
|
460 | 460 | <?php |
461 | - $base_url = admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $customer->id ); |
|
462 | - $promote_url = wp_nonce_url( add_query_arg( array( 'email' => rawurlencode( $email ), 'give_action' => 'set_donor_primary_email'), $base_url ), 'give-set-donor-primary-email' ); |
|
463 | - $remove_url = wp_nonce_url( add_query_arg( array( 'email' => rawurlencode( $email ), 'give_action' => 'remove_donor_email' ), $base_url ), 'give-remove-donor-email' ); |
|
461 | + $base_url = admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$customer->id); |
|
462 | + $promote_url = wp_nonce_url(add_query_arg(array('email' => rawurlencode($email), 'give_action' => 'set_donor_primary_email'), $base_url), 'give-set-donor-primary-email'); |
|
463 | + $remove_url = wp_nonce_url(add_query_arg(array('email' => rawurlencode($email), 'give_action' => 'remove_donor_email'), $base_url), 'give-remove-donor-email'); |
|
464 | 464 | ?> |
465 | - <a href="<?php echo $promote_url; ?>"><?php _e( 'Make Primary', 'give' ); ?></a> |
|
465 | + <a href="<?php echo $promote_url; ?>"><?php _e('Make Primary', 'give'); ?></a> |
|
466 | 466 | | |
467 | - <a href="<?php echo $remove_url; ?>" class="delete"><?php _e( 'Remove', 'give' ); ?></a> |
|
467 | + <a href="<?php echo $remove_url; ?>" class="delete"><?php _e('Remove', 'give'); ?></a> |
|
468 | 468 | <?php endif; ?> |
469 | 469 | </td> |
470 | 470 | </tr> |
@@ -474,56 +474,56 @@ discard block |
||
474 | 474 | <td colspan="2" class="add-customer-email-td"> |
475 | 475 | <div class="add-customer-email-wrapper"> |
476 | 476 | <input type="hidden" name="customer-id" value="<?php echo $customer->id; ?>" /> |
477 | - <?php wp_nonce_field( 'give_add_donor_email', 'add_email_nonce', false, true ); ?> |
|
478 | - <input type="email" name="additional-email" value="" placeholder="<?php _e( 'Email Address', 'give' ); ?>" /> |
|
479 | - <input type="checkbox" name="make-additional-primary" value="1" id="make-additional-primary" /> <label for="make-additional-primary"><?php _e( 'Make Primary', 'give' ); ?></label> |
|
480 | - <button class="button-secondary give-add-customer-email" id="add-customer-email"><?php _e( 'Add Email', 'give' ); ?></button> |
|
477 | + <?php wp_nonce_field('give_add_donor_email', 'add_email_nonce', false, true); ?> |
|
478 | + <input type="email" name="additional-email" value="" placeholder="<?php _e('Email Address', 'give'); ?>" /> |
|
479 | + <input type="checkbox" name="make-additional-primary" value="1" id="make-additional-primary" /> <label for="make-additional-primary"><?php _e('Make Primary', 'give'); ?></label> |
|
480 | + <button class="button-secondary give-add-customer-email" id="add-customer-email"><?php _e('Add Email', 'give'); ?></button> |
|
481 | 481 | <span class="spinner"></span> |
482 | 482 | </div> |
483 | 483 | <div class="notice-wrap"></div> |
484 | 484 | </td> |
485 | 485 | </tr> |
486 | 486 | <?php } else { ?> |
487 | - <tr><td colspan="2"><?php _e( 'No Emails Found', 'easy-digital-downloads' ); ?></td></tr> |
|
487 | + <tr><td colspan="2"><?php _e('No Emails Found', 'easy-digital-downloads'); ?></td></tr> |
|
488 | 488 | <?php } ?> |
489 | 489 | </tbody> |
490 | 490 | </table> |
491 | 491 | |
492 | - <h3><?php esc_html_e( 'Recent Donations', 'give' ); ?></h3> |
|
492 | + <h3><?php esc_html_e('Recent Donations', 'give'); ?></h3> |
|
493 | 493 | <?php |
494 | - $payment_ids = explode( ',', $customer->payment_ids ); |
|
495 | - $payments = give_get_payments( array( 'post__in' => $payment_ids ) ); |
|
496 | - $payments = array_slice( $payments, 0, 10 ); |
|
494 | + $payment_ids = explode(',', $customer->payment_ids); |
|
495 | + $payments = give_get_payments(array('post__in' => $payment_ids)); |
|
496 | + $payments = array_slice($payments, 0, 10); |
|
497 | 497 | ?> |
498 | 498 | <table class="wp-list-table widefat striped payments"> |
499 | 499 | <thead> |
500 | 500 | <tr> |
501 | - <th scope="col"><?php esc_html_e( 'ID', 'give' ); ?></th> |
|
502 | - <th scope="col"><?php esc_html_e( 'Amount', 'give' ); ?></th> |
|
503 | - <th scope="col"><?php esc_html_e( 'Date', 'give' ); ?></th> |
|
504 | - <th scope="col"><?php esc_html_e( 'Status', 'give' ); ?></th> |
|
505 | - <th scope="col"><?php esc_html_e( 'Actions', 'give' ); ?></th> |
|
501 | + <th scope="col"><?php esc_html_e('ID', 'give'); ?></th> |
|
502 | + <th scope="col"><?php esc_html_e('Amount', 'give'); ?></th> |
|
503 | + <th scope="col"><?php esc_html_e('Date', 'give'); ?></th> |
|
504 | + <th scope="col"><?php esc_html_e('Status', 'give'); ?></th> |
|
505 | + <th scope="col"><?php esc_html_e('Actions', 'give'); ?></th> |
|
506 | 506 | </tr> |
507 | 507 | </thead> |
508 | 508 | <tbody> |
509 | - <?php if ( ! empty( $payments ) ) { ?> |
|
510 | - <?php foreach ( $payments as $payment ) : ?> |
|
509 | + <?php if ( ! empty($payments)) { ?> |
|
510 | + <?php foreach ($payments as $payment) : ?> |
|
511 | 511 | <tr> |
512 | 512 | <td><?php echo $payment->ID; ?></td> |
513 | - <td><?php echo give_payment_amount( $payment->ID ); ?></td> |
|
514 | - <td><?php echo date_i18n( give_date_format(), strtotime( $payment->post_date ) ); ?></td> |
|
515 | - <td><?php echo give_get_payment_status( $payment, true ); ?></td> |
|
513 | + <td><?php echo give_payment_amount($payment->ID); ?></td> |
|
514 | + <td><?php echo date_i18n(give_date_format(), strtotime($payment->post_date)); ?></td> |
|
515 | + <td><?php echo give_get_payment_status($payment, true); ?></td> |
|
516 | 516 | <td> |
517 | 517 | <?php |
518 | 518 | printf( |
519 | 519 | '<a href="%1$s" aria-label="%2$s">%3$s</a>', |
520 | - admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&id=' . $payment->ID ), |
|
520 | + admin_url('edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&id='.$payment->ID), |
|
521 | 521 | sprintf( |
522 | 522 | /* translators: %s: Donation ID */ |
523 | - esc_attr__( 'View Donation %s.', 'give' ), |
|
523 | + esc_attr__('View Donation %s.', 'give'), |
|
524 | 524 | $payment->ID |
525 | 525 | ), |
526 | - esc_html__( 'View Donation', 'give' ) |
|
526 | + esc_html__('View Donation', 'give') |
|
527 | 527 | ); |
528 | 528 | ?> |
529 | 529 | |
@@ -538,46 +538,46 @@ discard block |
||
538 | 538 | * @param object $customer The customer object being displayed. |
539 | 539 | * @param object $payment The payment object being displayed. |
540 | 540 | */ |
541 | - do_action( 'give_donor_recent_purchases_actions', $customer, $payment ); |
|
541 | + do_action('give_donor_recent_purchases_actions', $customer, $payment); |
|
542 | 542 | ?> |
543 | 543 | </td> |
544 | 544 | </tr> |
545 | 545 | <?php endforeach; ?> |
546 | 546 | <?php } else { ?> |
547 | 547 | <tr> |
548 | - <td colspan="5"><?php esc_html_e( 'No donations found.', 'give' ); ?></td> |
|
548 | + <td colspan="5"><?php esc_html_e('No donations found.', 'give'); ?></td> |
|
549 | 549 | </tr> |
550 | 550 | <?php } ?> |
551 | 551 | </tbody> |
552 | 552 | </table> |
553 | 553 | |
554 | - <h3><?php esc_html_e( 'Completed Forms', 'give' ); ?></h3> |
|
554 | + <h3><?php esc_html_e('Completed Forms', 'give'); ?></h3> |
|
555 | 555 | <?php |
556 | - $donations = give_get_users_completed_donations( $customer->email ); |
|
556 | + $donations = give_get_users_completed_donations($customer->email); |
|
557 | 557 | ?> |
558 | 558 | <table class="wp-list-table widefat striped donations"> |
559 | 559 | <thead> |
560 | 560 | <tr> |
561 | - <th scope="col"><?php esc_html_e( 'Form', 'give' ); ?></th> |
|
562 | - <th scope="col" width="120px"><?php esc_html_e( 'Actions', 'give' ); ?></th> |
|
561 | + <th scope="col"><?php esc_html_e('Form', 'give'); ?></th> |
|
562 | + <th scope="col" width="120px"><?php esc_html_e('Actions', 'give'); ?></th> |
|
563 | 563 | </tr> |
564 | 564 | </thead> |
565 | 565 | <tbody> |
566 | - <?php if ( ! empty( $donations ) ) { ?> |
|
567 | - <?php foreach ( $donations as $donation ) : ?> |
|
566 | + <?php if ( ! empty($donations)) { ?> |
|
567 | + <?php foreach ($donations as $donation) : ?> |
|
568 | 568 | <tr> |
569 | 569 | <td><?php echo $donation->post_title; ?></td> |
570 | 570 | <td> |
571 | 571 | <?php |
572 | 572 | printf( |
573 | 573 | '<a href="%1$s" aria-label="%2$s">%3$s</a>', |
574 | - esc_url( admin_url( 'post.php?action=edit&post=' . $donation->ID ) ), |
|
574 | + esc_url(admin_url('post.php?action=edit&post='.$donation->ID)), |
|
575 | 575 | sprintf( |
576 | 576 | /* translators: %s: form name */ |
577 | - esc_attr__( 'View Form %s.', 'give' ), |
|
577 | + esc_attr__('View Form %s.', 'give'), |
|
578 | 578 | $donation->post_title |
579 | 579 | ), |
580 | - esc_html__( 'View Form', 'give' ) |
|
580 | + esc_html__('View Form', 'give') |
|
581 | 581 | ); |
582 | 582 | ?> |
583 | 583 | </td> |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | <?php endforeach; ?> |
586 | 586 | <?php } else { ?> |
587 | 587 | <tr> |
588 | - <td colspan="2"><?php esc_html_e( 'No completed donations found.', 'give' ); ?></td> |
|
588 | + <td colspan="2"><?php esc_html_e('No completed donations found.', 'give'); ?></td> |
|
589 | 589 | </tr> |
590 | 590 | <?php } ?> |
591 | 591 | </tbody> |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | * |
600 | 600 | * @param object $customer The customer object being displayed. |
601 | 601 | */ |
602 | - do_action( 'give_donor_after_tables', $customer ); |
|
602 | + do_action('give_donor_after_tables', $customer); |
|
603 | 603 | ?> |
604 | 604 | |
605 | 605 | </div> |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | * |
613 | 613 | * @param object $customer The customer object being displayed. |
614 | 614 | */ |
615 | - do_action( 'give_donor_card_bottom', $customer ); |
|
615 | + do_action('give_donor_card_bottom', $customer); |
|
616 | 616 | |
617 | 617 | } |
618 | 618 | |
@@ -625,30 +625,30 @@ discard block |
||
625 | 625 | * |
626 | 626 | * @return void |
627 | 627 | */ |
628 | -function give_customer_notes_view( $customer ) { |
|
628 | +function give_customer_notes_view($customer) { |
|
629 | 629 | |
630 | - $paged = isset( $_GET['paged'] ) && is_numeric( $_GET['paged'] ) ? $_GET['paged'] : 1; |
|
631 | - $paged = absint( $paged ); |
|
630 | + $paged = isset($_GET['paged']) && is_numeric($_GET['paged']) ? $_GET['paged'] : 1; |
|
631 | + $paged = absint($paged); |
|
632 | 632 | $note_count = $customer->get_notes_count(); |
633 | - $per_page = apply_filters( 'give_customer_notes_per_page', 20 ); |
|
634 | - $total_pages = ceil( $note_count / $per_page ); |
|
635 | - $customer_notes = $customer->get_notes( $per_page, $paged ); |
|
633 | + $per_page = apply_filters('give_customer_notes_per_page', 20); |
|
634 | + $total_pages = ceil($note_count / $per_page); |
|
635 | + $customer_notes = $customer->get_notes($per_page, $paged); |
|
636 | 636 | ?> |
637 | 637 | |
638 | 638 | <div id="customer-notes-wrapper"> |
639 | 639 | <div class="customer-notes-header"> |
640 | - <?php echo get_avatar( $customer->email, 30 ); ?> <span><?php echo $customer->name; ?></span> |
|
640 | + <?php echo get_avatar($customer->email, 30); ?> <span><?php echo $customer->name; ?></span> |
|
641 | 641 | </div> |
642 | - <h3><?php esc_html_e( 'Notes', 'give' ); ?></h3> |
|
642 | + <h3><?php esc_html_e('Notes', 'give'); ?></h3> |
|
643 | 643 | |
644 | - <?php if ( 1 == $paged ) : ?> |
|
644 | + <?php if (1 == $paged) : ?> |
|
645 | 645 | <div style="display: block; margin-bottom: 55px;"> |
646 | - <form id="give-add-customer-note" method="post" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=notes&id=' . $customer->id ); ?>"> |
|
646 | + <form id="give-add-customer-note" method="post" action="<?php echo admin_url('edit.php?post_type=give_forms&page=give-donors&view=notes&id='.$customer->id); ?>"> |
|
647 | 647 | <textarea id="customer-note" name="customer_note" class="customer-note-input" rows="10"></textarea> |
648 | 648 | <br /> |
649 | 649 | <input type="hidden" id="customer-id" name="customer_id" value="<?php echo $customer->id; ?>" /> |
650 | 650 | <input type="hidden" name="give_action" value="add-customer-note" /> |
651 | - <?php wp_nonce_field( 'add-customer-note', 'add_customer_note_nonce', true, true ); ?> |
|
651 | + <?php wp_nonce_field('add-customer-note', 'add_customer_note_nonce', true, true); ?> |
|
652 | 652 | <input id="add-customer-note" class="right button-primary" type="submit" value="Add Note" /> |
653 | 653 | </form> |
654 | 654 | </div> |
@@ -663,26 +663,26 @@ discard block |
||
663 | 663 | 'show_all' => true |
664 | 664 | ); |
665 | 665 | |
666 | - echo paginate_links( $pagination_args ); |
|
666 | + echo paginate_links($pagination_args); |
|
667 | 667 | ?> |
668 | 668 | |
669 | 669 | <div id="give-customer-notes" class="postbox"> |
670 | - <?php if ( count( $customer_notes ) > 0 ) { ?> |
|
671 | - <?php foreach ( $customer_notes as $key => $note ) : ?> |
|
670 | + <?php if (count($customer_notes) > 0) { ?> |
|
671 | + <?php foreach ($customer_notes as $key => $note) : ?> |
|
672 | 672 | <div class="customer-note-wrapper dashboard-comment-wrap comment-item"> |
673 | 673 | <span class="note-content-wrap"> |
674 | - <?php echo stripslashes( $note ); ?> |
|
674 | + <?php echo stripslashes($note); ?> |
|
675 | 675 | </span> |
676 | 676 | </div> |
677 | 677 | <?php endforeach; ?> |
678 | 678 | <?php } else { ?> |
679 | 679 | <div class="give-no-customer-notes"> |
680 | - <?php esc_html_e( 'No donor notes found.', 'give' ); ?> |
|
680 | + <?php esc_html_e('No donor notes found.', 'give'); ?> |
|
681 | 681 | </div> |
682 | 682 | <?php } ?> |
683 | 683 | </div> |
684 | 684 | |
685 | - <?php echo paginate_links( $pagination_args ); ?> |
|
685 | + <?php echo paginate_links($pagination_args); ?> |
|
686 | 686 | |
687 | 687 | </div> |
688 | 688 | |
@@ -698,9 +698,9 @@ discard block |
||
698 | 698 | * |
699 | 699 | * @return void |
700 | 700 | */ |
701 | -function give_customers_delete_view( $customer ) { |
|
701 | +function give_customers_delete_view($customer) { |
|
702 | 702 | |
703 | - $customer_edit_role = apply_filters( 'give_edit_customers_role', 'edit_give_payments' ); |
|
703 | + $customer_edit_role = apply_filters('give_edit_customers_role', 'edit_give_payments'); |
|
704 | 704 | |
705 | 705 | /** |
706 | 706 | * Fires in donor delete screen, above the content. |
@@ -709,15 +709,15 @@ discard block |
||
709 | 709 | * |
710 | 710 | * @param object $customer The customer object being displayed. |
711 | 711 | */ |
712 | - do_action( 'give_customer_delete_top', $customer ); |
|
712 | + do_action('give_customer_delete_top', $customer); |
|
713 | 713 | ?> |
714 | 714 | |
715 | 715 | <div class="info-wrapper customer-section"> |
716 | 716 | |
717 | - <form id="delete-customer" method="post" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=delete&id=' . $customer->id ); ?>"> |
|
717 | + <form id="delete-customer" method="post" action="<?php echo admin_url('edit.php?post_type=give_forms&page=give-donors&view=delete&id='.$customer->id); ?>"> |
|
718 | 718 | |
719 | 719 | <div class="customer-notes-header"> |
720 | - <?php echo get_avatar( $customer->email, 30 ); ?> <span><?php echo $customer->name; ?></span> |
|
720 | + <?php echo get_avatar($customer->email, 30); ?> <span><?php echo $customer->name; ?></span> |
|
721 | 721 | </div> |
722 | 722 | |
723 | 723 | |
@@ -725,16 +725,16 @@ discard block |
||
725 | 725 | |
726 | 726 | <span class="delete-customer-options"> |
727 | 727 | <p> |
728 | - <?php echo Give()->html->checkbox( array( 'name' => 'give-customer-delete-confirm' ) ); ?> |
|
729 | - <label for="give-customer-delete-confirm"><?php esc_html_e( 'Are you sure you want to delete this donor?', 'give' ); ?></label> |
|
728 | + <?php echo Give()->html->checkbox(array('name' => 'give-customer-delete-confirm')); ?> |
|
729 | + <label for="give-customer-delete-confirm"><?php esc_html_e('Are you sure you want to delete this donor?', 'give'); ?></label> |
|
730 | 730 | </p> |
731 | 731 | |
732 | 732 | <p> |
733 | - <?php echo Give()->html->checkbox( array( |
|
733 | + <?php echo Give()->html->checkbox(array( |
|
734 | 734 | 'name' => 'give-customer-delete-records', |
735 | - 'options' => array( 'disabled' => true ) |
|
736 | - ) ); ?> |
|
737 | - <label for="give-customer-delete-records"><?php esc_html_e( 'Delete all associated donations and records?', 'give' ); ?></label> |
|
735 | + 'options' => array('disabled' => true) |
|
736 | + )); ?> |
|
737 | + <label for="give-customer-delete-records"><?php esc_html_e('Delete all associated donations and records?', 'give'); ?></label> |
|
738 | 738 | </p> |
739 | 739 | |
740 | 740 | <?php |
@@ -747,16 +747,16 @@ discard block |
||
747 | 747 | * |
748 | 748 | * @param object $customer The customer object being displayed. |
749 | 749 | */ |
750 | - do_action( 'give_customer_delete_inputs', $customer ); |
|
750 | + do_action('give_customer_delete_inputs', $customer); |
|
751 | 751 | ?> |
752 | 752 | </span> |
753 | 753 | |
754 | 754 | <span id="customer-edit-actions"> |
755 | 755 | <input type="hidden" name="customer_id" value="<?php echo $customer->id; ?>" /> |
756 | - <?php wp_nonce_field( 'delete-customer', '_wpnonce', false, true ); ?> |
|
756 | + <?php wp_nonce_field('delete-customer', '_wpnonce', false, true); ?> |
|
757 | 757 | <input type="hidden" name="give_action" value="delete-customer" /> |
758 | - <input type="submit" disabled="disabled" id="give-delete-customer" class="button-primary" value="<?php esc_attr_e( 'Delete Donor', 'give' ); ?>" /> |
|
759 | - <a id="give-delete-customer-cancel" href="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-donors&view=overview&id=' . $customer->id ); ?>" class="delete"><?php esc_html_e( 'Cancel', 'give' ); ?></a> |
|
758 | + <input type="submit" disabled="disabled" id="give-delete-customer" class="button-primary" value="<?php esc_attr_e('Delete Donor', 'give'); ?>" /> |
|
759 | + <a id="give-delete-customer-cancel" href="<?php echo admin_url('edit.php?post_type=give_forms&page=give-donors&view=overview&id='.$customer->id); ?>" class="delete"><?php esc_html_e('Cancel', 'give'); ?></a> |
|
760 | 760 | </span> |
761 | 761 | |
762 | 762 | </div> |
@@ -772,5 +772,5 @@ discard block |
||
772 | 772 | * |
773 | 773 | * @param object $customer The customer object being displayed. |
774 | 774 | */ |
775 | - do_action( 'give_customer_delete_bottom', $customer ); |
|
775 | + do_action('give_customer_delete_bottom', $customer); |
|
776 | 776 | } |
@@ -173,8 +173,8 @@ |
||
173 | 173 | |
174 | 174 | case 'num_purchases' : |
175 | 175 | $value = '<a href="' . |
176 | - admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] ) |
|
177 | - ) . '">' . esc_html( $item['num_purchases'] ) . '</a>'; |
|
176 | + admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] ) |
|
177 | + ) . '">' . esc_html( $item['num_purchases'] ) . '</a>'; |
|
178 | 178 | break; |
179 | 179 | |
180 | 180 | case 'amount_spent' : |
@@ -10,13 +10,13 @@ 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 | |
17 | 17 | // Load WP_List_Table if not loaded |
18 | -if ( ! class_exists( 'WP_List_Table' ) ) { |
|
19 | - require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; |
|
18 | +if ( ! class_exists('WP_List_Table')) { |
|
19 | + require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | global $status, $page; |
63 | 63 | |
64 | 64 | // Set parent defaults |
65 | - parent::__construct( array( |
|
66 | - 'singular' => esc_html__( 'Donor', 'give' ), // Singular name of the listed records |
|
67 | - 'plural' => esc_html__( 'Donors', 'give' ), // Plural name of the listed records |
|
65 | + parent::__construct(array( |
|
66 | + 'singular' => esc_html__('Donor', 'give'), // Singular name of the listed records |
|
67 | + 'plural' => esc_html__('Donors', 'give'), // Plural name of the listed records |
|
68 | 68 | 'ajax' => false // Does this table support ajax? |
69 | - ) ); |
|
69 | + )); |
|
70 | 70 | |
71 | 71 | } |
72 | 72 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * |
84 | 84 | * @return false |
85 | 85 | */ |
86 | - public function search_box( $text, $input_id ) { |
|
86 | + public function search_box($text, $input_id) { |
|
87 | 87 | return; |
88 | 88 | } |
89 | 89 | |
@@ -98,20 +98,20 @@ discard block |
||
98 | 98 | * |
99 | 99 | * @return void |
100 | 100 | */ |
101 | - public function give_search_box( $text, $input_id ) { |
|
102 | - $input_id = $input_id . '-search-input'; |
|
101 | + public function give_search_box($text, $input_id) { |
|
102 | + $input_id = $input_id.'-search-input'; |
|
103 | 103 | |
104 | - if ( ! empty( $_REQUEST['orderby'] ) ) { |
|
105 | - echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />'; |
|
104 | + if ( ! empty($_REQUEST['orderby'])) { |
|
105 | + echo '<input type="hidden" name="orderby" value="'.esc_attr($_REQUEST['orderby']).'" />'; |
|
106 | 106 | } |
107 | - if ( ! empty( $_REQUEST['order'] ) ) { |
|
108 | - echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />'; |
|
107 | + if ( ! empty($_REQUEST['order'])) { |
|
108 | + echo '<input type="hidden" name="order" value="'.esc_attr($_REQUEST['order']).'" />'; |
|
109 | 109 | } |
110 | 110 | ?> |
111 | 111 | <p class="search-box donor-search" role="search"> |
112 | 112 | <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label> |
113 | 113 | <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" /> |
114 | - <?php submit_button( $text, 'button', false, false, array( 'ID' => 'search-submit' ) ); ?> |
|
114 | + <?php submit_button($text, 'button', false, false, array('ID' => 'search-submit')); ?> |
|
115 | 115 | </p> |
116 | 116 | <?php |
117 | 117 | } |
@@ -124,29 +124,29 @@ discard block |
||
124 | 124 | * |
125 | 125 | * @param string $which |
126 | 126 | */ |
127 | - protected function display_tablenav( $which ) { |
|
127 | + protected function display_tablenav($which) { |
|
128 | 128 | |
129 | - if ( 'top' == $which ) { |
|
130 | - wp_nonce_field( 'bulk-' . $this->_args['plural'] ); |
|
129 | + if ('top' == $which) { |
|
130 | + wp_nonce_field('bulk-'.$this->_args['plural']); |
|
131 | 131 | } |
132 | 132 | ?> |
133 | - <div class="tablenav give-clearfix <?php echo esc_attr( $which ); ?>"> |
|
133 | + <div class="tablenav give-clearfix <?php echo esc_attr($which); ?>"> |
|
134 | 134 | |
135 | - <h3 class="alignleft reports-earnings-title"><span><?php esc_html_e( 'Donors Report', 'give' ); ?></span></h3> |
|
135 | + <h3 class="alignleft reports-earnings-title"><span><?php esc_html_e('Donors Report', 'give'); ?></span></h3> |
|
136 | 136 | |
137 | 137 | <div class="alignright tablenav-right"> |
138 | 138 | <div class="actions bulkactions"> |
139 | 139 | <?php |
140 | - if ( 'top' == $which ) { |
|
141 | - $this->give_search_box( esc_html__( 'Search Donors', 'give' ), 'give-donors-report-search' ); |
|
140 | + if ('top' == $which) { |
|
141 | + $this->give_search_box(esc_html__('Search Donors', 'give'), 'give-donors-report-search'); |
|
142 | 142 | } |
143 | 143 | |
144 | - $this->bulk_actions( $which ); ?> |
|
144 | + $this->bulk_actions($which); ?> |
|
145 | 145 | |
146 | 146 | </div> |
147 | 147 | <?php |
148 | - $this->extra_tablenav( $which ); |
|
149 | - $this->pagination( $which ); |
|
148 | + $this->extra_tablenav($which); |
|
149 | + $this->pagination($which); |
|
150 | 150 | ?> |
151 | 151 | </div> |
152 | 152 | |
@@ -168,25 +168,25 @@ discard block |
||
168 | 168 | * |
169 | 169 | * @return string Column Name |
170 | 170 | */ |
171 | - public function column_default( $item, $column_name ) { |
|
172 | - switch ( $column_name ) { |
|
171 | + public function column_default($item, $column_name) { |
|
172 | + switch ($column_name) { |
|
173 | 173 | |
174 | 174 | case 'num_purchases' : |
175 | - $value = '<a href="' . |
|
176 | - admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . urlencode( $item['email'] ) |
|
177 | - ) . '">' . esc_html( $item['num_purchases'] ) . '</a>'; |
|
175 | + $value = '<a href="'. |
|
176 | + admin_url('edit.php?post_type=give_forms&page=give-payment-history&user='.urlencode($item['email']) |
|
177 | + ).'">'.esc_html($item['num_purchases']).'</a>'; |
|
178 | 178 | break; |
179 | 179 | |
180 | 180 | case 'amount_spent' : |
181 | - $value = give_currency_filter( give_format_amount( $item[ $column_name ] ) ); |
|
181 | + $value = give_currency_filter(give_format_amount($item[$column_name])); |
|
182 | 182 | break; |
183 | 183 | |
184 | 184 | default: |
185 | - $value = isset( $item[ $column_name ] ) ? $item[ $column_name ] : null; |
|
185 | + $value = isset($item[$column_name]) ? $item[$column_name] : null; |
|
186 | 186 | break; |
187 | 187 | } |
188 | 188 | |
189 | - return apply_filters( "give_report_column_{$column_name}", $value, $item['id'] ); |
|
189 | + return apply_filters("give_report_column_{$column_name}", $value, $item['id']); |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
@@ -198,14 +198,14 @@ discard block |
||
198 | 198 | */ |
199 | 199 | public function get_columns() { |
200 | 200 | $columns = array( |
201 | - 'name' => esc_html__( 'Name', 'give' ), |
|
202 | - 'id' => esc_html__( 'ID', 'give' ), |
|
203 | - 'email' => esc_html__( 'Email', 'give' ), |
|
204 | - 'num_purchases' => esc_html__( 'Purchases', 'give' ), |
|
205 | - 'amount_spent' => esc_html__( 'Total Spent', 'give' ) |
|
201 | + 'name' => esc_html__('Name', 'give'), |
|
202 | + 'id' => esc_html__('ID', 'give'), |
|
203 | + 'email' => esc_html__('Email', 'give'), |
|
204 | + 'num_purchases' => esc_html__('Purchases', 'give'), |
|
205 | + 'amount_spent' => esc_html__('Total Spent', 'give') |
|
206 | 206 | ); |
207 | 207 | |
208 | - return apply_filters( 'give_report_donor_columns', $columns ); |
|
208 | + return apply_filters('give_report_donor_columns', $columns); |
|
209 | 209 | |
210 | 210 | } |
211 | 211 | |
@@ -218,10 +218,10 @@ discard block |
||
218 | 218 | */ |
219 | 219 | public function get_sortable_columns() { |
220 | 220 | return array( |
221 | - 'id' => array( 'id', true ), |
|
222 | - 'name' => array( 'name', true ), |
|
223 | - 'num_purchases' => array( 'purchase_count', false ), |
|
224 | - 'amount_spent' => array( 'purchase_value', false ), |
|
221 | + 'id' => array('id', true), |
|
222 | + 'name' => array('name', true), |
|
223 | + 'num_purchases' => array('purchase_count', false), |
|
224 | + 'amount_spent' => array('purchase_value', false), |
|
225 | 225 | ); |
226 | 226 | } |
227 | 227 | |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | * @since 1.0 |
233 | 233 | * @return void |
234 | 234 | */ |
235 | - public function bulk_actions( $which = '' ) { |
|
235 | + public function bulk_actions($which = '') { |
|
236 | 236 | // These aren't really bulk actions but this outputs the markup in the right place |
237 | 237 | give_report_views(); |
238 | 238 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | * @return int Current page number |
246 | 246 | */ |
247 | 247 | public function get_paged() { |
248 | - return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1; |
|
248 | + return isset($_GET['paged']) ? absint($_GET['paged']) : 1; |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | /** |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | * @return mixed string If search is present, false otherwise |
257 | 257 | */ |
258 | 258 | public function get_search() { |
259 | - return ! empty( $_GET['s'] ) ? urldecode( trim( $_GET['s'] ) ) : false; |
|
259 | + return ! empty($_GET['s']) ? urldecode(trim($_GET['s'])) : false; |
|
260 | 260 | } |
261 | 261 | |
262 | 262 | /** |
@@ -273,10 +273,10 @@ discard block |
||
273 | 273 | |
274 | 274 | $data = array(); |
275 | 275 | $paged = $this->get_paged(); |
276 | - $offset = $this->per_page * ( $paged - 1 ); |
|
276 | + $offset = $this->per_page * ($paged - 1); |
|
277 | 277 | $search = $this->get_search(); |
278 | - $order = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : 'DESC'; |
|
279 | - $orderby = isset( $_GET['orderby'] ) ? sanitize_text_field( $_GET['orderby'] ) : 'id'; |
|
278 | + $order = isset($_GET['order']) ? sanitize_text_field($_GET['order']) : 'DESC'; |
|
279 | + $orderby = isset($_GET['orderby']) ? sanitize_text_field($_GET['orderby']) : 'id'; |
|
280 | 280 | |
281 | 281 | $args = array( |
282 | 282 | 'number' => $this->per_page, |
@@ -285,21 +285,21 @@ discard block |
||
285 | 285 | 'orderby' => $orderby |
286 | 286 | ); |
287 | 287 | |
288 | - if ( is_email( $search ) ) { |
|
288 | + if (is_email($search)) { |
|
289 | 289 | $args['email'] = $search; |
290 | - } elseif ( is_numeric( $search ) ) { |
|
290 | + } elseif (is_numeric($search)) { |
|
291 | 291 | $args['id'] = $search; |
292 | 292 | } |
293 | 293 | |
294 | - $donors = Give()->customers->get_customers( $args ); |
|
294 | + $donors = Give()->customers->get_customers($args); |
|
295 | 295 | |
296 | - if ( $donors ) { |
|
296 | + if ($donors) { |
|
297 | 297 | |
298 | - $this->count = count( $donors ); |
|
298 | + $this->count = count($donors); |
|
299 | 299 | |
300 | - foreach ( $donors as $donor ) { |
|
300 | + foreach ($donors as $donor) { |
|
301 | 301 | |
302 | - $user_id = ! empty( $donor->user_id ) ? absint( $donor->user_id ) : 0; |
|
302 | + $user_id = ! empty($donor->user_id) ? absint($donor->user_id) : 0; |
|
303 | 303 | |
304 | 304 | $data[] = array( |
305 | 305 | 'id' => $donor->id, |
@@ -332,16 +332,16 @@ discard block |
||
332 | 332 | $hidden = array(); // No hidden columns |
333 | 333 | $sortable = $this->get_sortable_columns(); |
334 | 334 | |
335 | - $this->_column_headers = array( $columns, $hidden, $sortable ); |
|
335 | + $this->_column_headers = array($columns, $hidden, $sortable); |
|
336 | 336 | |
337 | 337 | $this->items = $this->reports_data(); |
338 | 338 | |
339 | 339 | $this->total = give_count_total_customers(); |
340 | 340 | |
341 | - $this->set_pagination_args( array( |
|
341 | + $this->set_pagination_args(array( |
|
342 | 342 | 'total_items' => $this->total, |
343 | 343 | 'per_page' => $this->per_page, |
344 | - 'total_pages' => ceil( $this->total / $this->per_page ) |
|
345 | - ) ); |
|
344 | + 'total_pages' => ceil($this->total / $this->per_page) |
|
345 | + )); |
|
346 | 346 | } |
347 | 347 | } |
348 | 348 | \ No newline at end of file |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | // Exit if accessed directly. |
14 | -if ( ! defined( 'ABSPATH' ) ) { |
|
14 | +if ( ! defined('ABSPATH')) { |
|
15 | 15 | exit; |
16 | 16 | } |
17 | 17 | |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | * @since 1.0 |
36 | 36 | */ |
37 | 37 | public function __construct() { |
38 | - add_action( 'admin_menu', array( $this, 'admin_menus' ) ); |
|
39 | - add_action( 'admin_head', array( $this, 'admin_head' ) ); |
|
40 | - add_action( 'admin_init', array( $this, 'welcome' ) ); |
|
38 | + add_action('admin_menu', array($this, 'admin_menus')); |
|
39 | + add_action('admin_head', array($this, 'admin_head')); |
|
40 | + add_action('admin_init', array($this, 'welcome')); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -49,45 +49,45 @@ discard block |
||
49 | 49 | * @return void |
50 | 50 | */ |
51 | 51 | public function admin_menus() { |
52 | - list( $display_version ) = explode( '-', GIVE_VERSION ); |
|
52 | + list($display_version) = explode('-', GIVE_VERSION); |
|
53 | 53 | |
54 | 54 | // About Page |
55 | 55 | add_dashboard_page( |
56 | 56 | /* translators: %s: Give version */ |
57 | - sprintf( esc_html__( 'Welcome to Give %s', 'give' ), $display_version ), |
|
58 | - esc_html__( 'Welcome to Give', 'give' ), |
|
57 | + sprintf(esc_html__('Welcome to Give %s', 'give'), $display_version), |
|
58 | + esc_html__('Welcome to Give', 'give'), |
|
59 | 59 | $this->minimum_capability, |
60 | 60 | 'give-about', |
61 | - array( $this, 'about_screen' ) |
|
61 | + array($this, 'about_screen') |
|
62 | 62 | ); |
63 | 63 | |
64 | 64 | // Changelog Page |
65 | 65 | add_dashboard_page( |
66 | - esc_html__( 'Give Changelog', 'give' ), |
|
67 | - esc_html__( 'Give Changelog', 'give' ), |
|
66 | + esc_html__('Give Changelog', 'give'), |
|
67 | + esc_html__('Give Changelog', 'give'), |
|
68 | 68 | $this->minimum_capability, |
69 | 69 | 'give-changelog', |
70 | - array( $this, 'changelog_screen' ) |
|
70 | + array($this, 'changelog_screen') |
|
71 | 71 | ); |
72 | 72 | |
73 | 73 | // Getting Started Page |
74 | 74 | add_dashboard_page( |
75 | 75 | /* translators: %s: Give version */ |
76 | - sprintf( esc_html__( 'Give %s - Getting Started Guide', 'give' ), $display_version ), |
|
77 | - esc_html__( 'Getting started with Give', 'give' ), |
|
76 | + sprintf(esc_html__('Give %s - Getting Started Guide', 'give'), $display_version), |
|
77 | + esc_html__('Getting started with Give', 'give'), |
|
78 | 78 | $this->minimum_capability, |
79 | 79 | 'give-getting-started', |
80 | - array( $this, 'getting_started_screen' ) |
|
80 | + array($this, 'getting_started_screen') |
|
81 | 81 | ); |
82 | 82 | |
83 | 83 | // Credits Page |
84 | 84 | add_dashboard_page( |
85 | 85 | /* translators: %s: Give version */ |
86 | - sprintf( esc_html__( 'Give %s - Credits', 'give' ), $display_version ), |
|
87 | - esc_html__( 'The people that build Give', 'give' ), |
|
86 | + sprintf(esc_html__('Give %s - Credits', 'give'), $display_version), |
|
87 | + esc_html__('The people that build Give', 'give'), |
|
88 | 88 | $this->minimum_capability, |
89 | 89 | 'give-credits', |
90 | - array( $this, 'credits_screen' ) |
|
90 | + array($this, 'credits_screen') |
|
91 | 91 | ); |
92 | 92 | } |
93 | 93 | |
@@ -100,13 +100,13 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function admin_head() { |
102 | 102 | |
103 | - remove_submenu_page( 'index.php', 'give-about' ); |
|
104 | - remove_submenu_page( 'index.php', 'give-changelog' ); |
|
105 | - remove_submenu_page( 'index.php', 'give-getting-started' ); |
|
106 | - remove_submenu_page( 'index.php', 'give-credits' ); |
|
103 | + remove_submenu_page('index.php', 'give-about'); |
|
104 | + remove_submenu_page('index.php', 'give-changelog'); |
|
105 | + remove_submenu_page('index.php', 'give-getting-started'); |
|
106 | + remove_submenu_page('index.php', 'give-credits'); |
|
107 | 107 | |
108 | 108 | // Badge for welcome page |
109 | - $badge_url = GIVE_PLUGIN_URL . 'assets/images/give-badge.png'; |
|
109 | + $badge_url = GIVE_PLUGIN_URL.'assets/images/give-badge.png'; |
|
110 | 110 | |
111 | 111 | ?> |
112 | 112 | <style type="text/css" media="screen"> |
@@ -186,20 +186,20 @@ discard block |
||
186 | 186 | * @return void |
187 | 187 | */ |
188 | 188 | public function tabs() { |
189 | - $selected = isset( $_GET['page'] ) ? $_GET['page'] : 'give-about'; |
|
189 | + $selected = isset($_GET['page']) ? $_GET['page'] : 'give-about'; |
|
190 | 190 | ?> |
191 | 191 | <h2 class="nav-tab-wrapper"> |
192 | - <a class="nav-tab <?php echo $selected == 'give-about' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-about' ), 'index.php' ) ) ); ?>"> |
|
193 | - <?php esc_html_e( 'About Give', 'give' ); ?> |
|
192 | + <a class="nav-tab <?php echo $selected == 'give-about' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-about'), 'index.php'))); ?>"> |
|
193 | + <?php esc_html_e('About Give', 'give'); ?> |
|
194 | 194 | </a> |
195 | - <a class="nav-tab <?php echo $selected == 'give-getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-getting-started' ), 'index.php' ) ) ); ?>"> |
|
196 | - <?php esc_html_e( 'Getting Started', 'give' ); ?> |
|
195 | + <a class="nav-tab <?php echo $selected == 'give-getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-getting-started'), 'index.php'))); ?>"> |
|
196 | + <?php esc_html_e('Getting Started', 'give'); ?> |
|
197 | 197 | </a> |
198 | - <a class="nav-tab <?php echo $selected == 'give-credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-credits' ), 'index.php' ) ) ); ?>"> |
|
199 | - <?php esc_html_e( 'Credits', 'give' ); ?> |
|
198 | + <a class="nav-tab <?php echo $selected == 'give-credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-credits'), 'index.php'))); ?>"> |
|
199 | + <?php esc_html_e('Credits', 'give'); ?> |
|
200 | 200 | </a> |
201 | - <a class="nav-tab <?php echo $selected == 'give-add-ons' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( 'edit.php?post_type=give_forms&page=give-addons' ) ); ?>"> |
|
202 | - <?php esc_html_e( 'Add-ons', 'give' ); ?> |
|
201 | + <a class="nav-tab <?php echo $selected == 'give-add-ons' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url(admin_url('edit.php?post_type=give_forms&page=give-addons')); ?>"> |
|
202 | + <?php esc_html_e('Add-ons', 'give'); ?> |
|
203 | 203 | </a> |
204 | 204 | </h2> |
205 | 205 | <?php |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | * @return void |
214 | 214 | */ |
215 | 215 | public function about_screen() { |
216 | - list( $display_version ) = explode( '-', GIVE_VERSION ); |
|
216 | + list($display_version) = explode('-', GIVE_VERSION); |
|
217 | 217 | ?> |
218 | 218 | <div class="wrap about-wrap"> |
219 | 219 | <h1 class="welcome-h1"><?php echo get_admin_page_title(); ?></h1> |
@@ -223,8 +223,8 @@ discard block |
||
223 | 223 | <p class="about-text"><?php |
224 | 224 | printf( |
225 | 225 | /* translators: %s: https://givewp.com/documenation/ */ |
226 | - __( 'Thank you for activating or updating to the latest version of Give! If you\'re a first time user, welcome! You\'re well on your way to empowering your cause. We encourage you to check out the <a href="%s" target="_blank">plugin documentation</a> and getting started guide below.', 'give' ), |
|
227 | - esc_url( 'https://givewp.com/documenation/' ) |
|
226 | + __('Thank you for activating or updating to the latest version of Give! If you\'re a first time user, welcome! You\'re well on your way to empowering your cause. We encourage you to check out the <a href="%s" target="_blank">plugin documentation</a> and getting started guide below.', 'give'), |
|
227 | + esc_url('https://givewp.com/documenation/') |
|
228 | 228 | ); |
229 | 229 | ?></p> |
230 | 230 | |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | <div class="give-badge"><?php |
234 | 234 | printf( |
235 | 235 | /* translators: %s: Give version */ |
236 | - esc_html__( 'Version %s', 'give' ), |
|
236 | + esc_html__('Version %s', 'give'), |
|
237 | 237 | $display_version |
238 | 238 | ); |
239 | 239 | ?></div> |
@@ -243,16 +243,16 @@ discard block |
||
243 | 243 | <div class="feature-section clearfix introduction"> |
244 | 244 | |
245 | 245 | <div class="video feature-section-item"> |
246 | - <img src="<?php echo GIVE_PLUGIN_URL . '/assets/images/give-form-mockup.png' ?>" alt="<?php esc_attr_e( 'A Give donation form', 'give' ); ?>"> |
|
246 | + <img src="<?php echo GIVE_PLUGIN_URL.'/assets/images/give-form-mockup.png' ?>" alt="<?php esc_attr_e('A Give donation form', 'give'); ?>"> |
|
247 | 247 | </div> |
248 | 248 | |
249 | 249 | <div class="content feature-section-item last-feature"> |
250 | 250 | |
251 | - <h3><?php esc_html_e( 'Give - Democratizing Generosity', 'give' ); ?></h3> |
|
251 | + <h3><?php esc_html_e('Give - Democratizing Generosity', 'give'); ?></h3> |
|
252 | 252 | |
253 | - <p><?php esc_html_e( 'Give empowers you to easily accept donations and setup fundraising campaigns, directly within WordPress. We created Give to provide a better donation experience for you and your users. Robust, flexible, and intuitive, the plugin is built from the ground up to be the goto donation solution for WordPress. Create powerful donation forms, embed them throughout your website, start a campaign, and exceed your fundraising goals with Give. This plugin is actively developed and proudly supported by folks who are dedicated to helping you and your cause.', 'give' ); ?></p> |
|
253 | + <p><?php esc_html_e('Give empowers you to easily accept donations and setup fundraising campaigns, directly within WordPress. We created Give to provide a better donation experience for you and your users. Robust, flexible, and intuitive, the plugin is built from the ground up to be the goto donation solution for WordPress. Create powerful donation forms, embed them throughout your website, start a campaign, and exceed your fundraising goals with Give. This plugin is actively developed and proudly supported by folks who are dedicated to helping you and your cause.', 'give'); ?></p> |
|
254 | 254 | <a href="https://givewp.com" target="_blank" class="button-secondary"> |
255 | - <?php esc_html_e( 'Learn More', 'give' ); ?> |
|
255 | + <?php esc_html_e('Learn More', 'give'); ?> |
|
256 | 256 | <span class="dashicons dashicons-external"></span> |
257 | 257 | </a> |
258 | 258 | |
@@ -265,11 +265,11 @@ discard block |
||
265 | 265 | |
266 | 266 | <div class="content feature-section-item"> |
267 | 267 | |
268 | - <h3><?php esc_html_e( 'Getting to Know Give', 'give' ); ?></h3> |
|
268 | + <h3><?php esc_html_e('Getting to Know Give', 'give'); ?></h3> |
|
269 | 269 | |
270 | - <p><?php esc_html_e( 'Before you get started with Give we suggest you take a look at the online documentation. There you will find the getting started guide which will help you get up and running quickly. If you have an question, issue or bug with the Core plugin please submit an issue on the Give website. We also welcome your feedback and feature requests. Welcome to Give. We hope you much success with your cause.', 'give' ); ?></p> |
|
270 | + <p><?php esc_html_e('Before you get started with Give we suggest you take a look at the online documentation. There you will find the getting started guide which will help you get up and running quickly. If you have an question, issue or bug with the Core plugin please submit an issue on the Give website. We also welcome your feedback and feature requests. Welcome to Give. We hope you much success with your cause.', 'give'); ?></p> |
|
271 | 271 | <a href="https://givewp.com/documentation" target="_blank" class="button-secondary"> |
272 | - <?php esc_html_e( 'View Documentation', 'give' ); ?> |
|
272 | + <?php esc_html_e('View Documentation', 'give'); ?> |
|
273 | 273 | <span class="dashicons dashicons-external"></span> |
274 | 274 | </a> |
275 | 275 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | |
278 | 278 | <div class="content feature-section-item last-feature"> |
279 | 279 | |
280 | - <img src="<?php echo GIVE_PLUGIN_URL . '/assets/images/give-logo-photo-mashup.png' ?>" alt="<?php esc_attr_e( 'Give', 'give' ); ?>"> |
|
280 | + <img src="<?php echo GIVE_PLUGIN_URL.'/assets/images/give-logo-photo-mashup.png' ?>" alt="<?php esc_attr_e('Give', 'give'); ?>"> |
|
281 | 281 | |
282 | 282 | </div> |
283 | 283 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | * @return void |
298 | 298 | */ |
299 | 299 | public function changelog_screen() { |
300 | - list( $display_version ) = explode( '-', GIVE_VERSION ); |
|
300 | + list($display_version) = explode('-', GIVE_VERSION); |
|
301 | 301 | ?> |
302 | 302 | <div class="wrap about-wrap"> |
303 | 303 | <h1><?php echo get_admin_page_title(); ?></h1> |
@@ -305,14 +305,14 @@ discard block |
||
305 | 305 | <p class="about-text"><?php |
306 | 306 | printf( |
307 | 307 | /* translators: %s: Give version */ |
308 | - esc_html__( 'Thank you for updating to the latest version! Give %s is ready to make your online store faster, safer, and better!', 'give' ), |
|
308 | + esc_html__('Thank you for updating to the latest version! Give %s is ready to make your online store faster, safer, and better!', 'give'), |
|
309 | 309 | $display_version |
310 | 310 | ); |
311 | 311 | ?></p> |
312 | 312 | <div class="give-badge"><?php |
313 | 313 | printf( |
314 | 314 | /* translators: %s: Give version */ |
315 | - esc_html__( 'Version %s', 'give' ), |
|
315 | + esc_html__('Version %s', 'give'), |
|
316 | 316 | $display_version |
317 | 317 | ); |
318 | 318 | ?></div> |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | <?php $this->tabs(); ?> |
321 | 321 | |
322 | 322 | <div class="changelog"> |
323 | - <h3><?php esc_html_e( 'Full Changelog', 'give' ); ?></h3> |
|
323 | + <h3><?php esc_html_e('Full Changelog', 'give'); ?></h3> |
|
324 | 324 | |
325 | 325 | <div class="feature-section"> |
326 | 326 | <?php echo $this->parse_readme(); ?> |
@@ -328,10 +328,10 @@ discard block |
||
328 | 328 | </div> |
329 | 329 | |
330 | 330 | <div class="return-to-dashboard"> |
331 | - <a href="<?php echo esc_url( admin_url( add_query_arg( array( |
|
331 | + <a href="<?php echo esc_url(admin_url(add_query_arg(array( |
|
332 | 332 | 'post_type' => 'give_forms', |
333 | 333 | 'page' => 'give-settings' |
334 | - ), 'edit.php' ) ) ); ?>"><?php esc_html_e( 'Give Settings', 'give' ); ?></a> |
|
334 | + ), 'edit.php'))); ?>"><?php esc_html_e('Give Settings', 'give'); ?></a> |
|
335 | 335 | </div> |
336 | 336 | </div> |
337 | 337 | <?php |
@@ -345,37 +345,37 @@ discard block |
||
345 | 345 | * @return void |
346 | 346 | */ |
347 | 347 | public function getting_started_screen() { |
348 | - list( $display_version ) = explode( '-', GIVE_VERSION ); |
|
348 | + list($display_version) = explode('-', GIVE_VERSION); |
|
349 | 349 | ?> |
350 | 350 | <div class="wrap about-wrap get-started"> |
351 | 351 | <h1 class="welcome-h1"><?php echo get_admin_page_title(); ?></h1> |
352 | 352 | |
353 | 353 | <?php give_social_media_elements() ?> |
354 | 354 | |
355 | - <p class="about-text"><?php esc_html_e( 'Welcome to the getting started guide.', 'give' ); ?></p> |
|
355 | + <p class="about-text"><?php esc_html_e('Welcome to the getting started guide.', 'give'); ?></p> |
|
356 | 356 | |
357 | 357 | <?php give_get_newsletter(); ?> |
358 | 358 | |
359 | 359 | <div class="give-badge"><?php |
360 | 360 | printf( |
361 | 361 | /* translators: %s: Give version */ |
362 | - esc_html__( 'Version %s', 'give' ), |
|
362 | + esc_html__('Version %s', 'give'), |
|
363 | 363 | $display_version |
364 | 364 | ); |
365 | 365 | ?></div> |
366 | 366 | |
367 | 367 | <?php $this->tabs(); ?> |
368 | 368 | |
369 | - <p class="about-text"><?php printf( esc_html__( 'Getting started with Give is easy! We put together this quick start guide to help first time users of the plugin. Our goal is to get you up and running in no time. Let\'s begin!', 'give' ), $display_version ); ?></p> |
|
369 | + <p class="about-text"><?php printf(esc_html__('Getting started with Give is easy! We put together this quick start guide to help first time users of the plugin. Our goal is to get you up and running in no time. Let\'s begin!', 'give'), $display_version); ?></p> |
|
370 | 370 | |
371 | 371 | <div class="feature-section clearfix"> |
372 | 372 | |
373 | 373 | <div class="content feature-section-item"> |
374 | - <h3><?php esc_html_e( 'STEP 1: Create a New Form', 'give' ); ?></h3> |
|
374 | + <h3><?php esc_html_e('STEP 1: Create a New Form', 'give'); ?></h3> |
|
375 | 375 | |
376 | - <p><?php esc_html_e( 'Give is driven by it\'s powerful form building features. But it is not simply a "form". From the "Add Form" page you\'ll be able to choose how and where you want to receive your donations. You\'ll be able to set the donation amounts. You even get to choose whether you want to create a whole page for your form, or embed it on a different page of your site.', 'give' ); ?></p> |
|
376 | + <p><?php esc_html_e('Give is driven by it\'s powerful form building features. But it is not simply a "form". From the "Add Form" page you\'ll be able to choose how and where you want to receive your donations. You\'ll be able to set the donation amounts. You even get to choose whether you want to create a whole page for your form, or embed it on a different page of your site.', 'give'); ?></p> |
|
377 | 377 | |
378 | - <p><?php esc_html_e( 'But all of these features begin simply by going to the menu and choosing "Add Form".', 'give' ); ?></p> |
|
378 | + <p><?php esc_html_e('But all of these features begin simply by going to the menu and choosing "Add Form".', 'give'); ?></p> |
|
379 | 379 | </div> |
380 | 380 | |
381 | 381 | <div class="content feature-section-item last-feature"> |
@@ -392,9 +392,9 @@ discard block |
||
392 | 392 | </div> |
393 | 393 | |
394 | 394 | <div class="content feature-section-item last-feature"> |
395 | - <h3><?php esc_html_e( 'STEP 2: Choose Your Levels', 'give' ); ?></h3> |
|
395 | + <h3><?php esc_html_e('STEP 2: Choose Your Levels', 'give'); ?></h3> |
|
396 | 396 | |
397 | - <p><?php esc_html_e( 'Each Form can be set to receive either a pre-determined amount or have multiple suggested levels of giving. Choosing "Multi-level Donation" opens up the levels section where you can add as many levels as you like with your own custom names and amounts.', 'give' ); ?></p> |
|
397 | + <p><?php esc_html_e('Each Form can be set to receive either a pre-determined amount or have multiple suggested levels of giving. Choosing "Multi-level Donation" opens up the levels section where you can add as many levels as you like with your own custom names and amounts.', 'give'); ?></p> |
|
398 | 398 | </div> |
399 | 399 | |
400 | 400 | </div> |
@@ -403,11 +403,11 @@ discard block |
||
403 | 403 | <div class="feature-section clearfix"> |
404 | 404 | |
405 | 405 | <div class="content feature-section-item add-content"> |
406 | - <h3><?php esc_html_e( 'STEP 3: Landing Page or Shortcode Mode?', 'give' ); ?></h3> |
|
406 | + <h3><?php esc_html_e('STEP 3: Landing Page or Shortcode Mode?', 'give'); ?></h3> |
|
407 | 407 | |
408 | - <p><?php esc_html_e( 'Every form you create in Give can either become it\'s own stand-alone page, or it can be inserted into any other page or post throughout your site as a Shortcode.', 'give' ); ?></p> |
|
408 | + <p><?php esc_html_e('Every form you create in Give can either become it\'s own stand-alone page, or it can be inserted into any other page or post throughout your site as a Shortcode.', 'give'); ?></p> |
|
409 | 409 | |
410 | - <p><?php esc_html_e( 'You can choose these different modes by going to the "Form Content" section. From there, you can choose to add content before or after the Donation form on a page, or if you choose "None" perhaps you want to instead use the shortcode. You can find the shortcode in the top right column directly under the Publish/Save button. This feature gives you the most amount of flexibility with controlling your content on your website all within the same page.', 'give' ); ?></p> |
|
410 | + <p><?php esc_html_e('You can choose these different modes by going to the "Form Content" section. From there, you can choose to add content before or after the Donation form on a page, or if you choose "None" perhaps you want to instead use the shortcode. You can find the shortcode in the top right column directly under the Publish/Save button. This feature gives you the most amount of flexibility with controlling your content on your website all within the same page.', 'give'); ?></p> |
|
411 | 411 | </div> |
412 | 412 | |
413 | 413 | <div class="content feature-section-item last-feature"> |
@@ -424,9 +424,9 @@ discard block |
||
424 | 424 | </div> |
425 | 425 | |
426 | 426 | <div class="content feature-section-item last-feature"> |
427 | - <h3><?php esc_html_e( 'STEP 4: Configure Your Display Options', 'give' ); ?></h3> |
|
427 | + <h3><?php esc_html_e('STEP 4: Configure Your Display Options', 'give'); ?></h3> |
|
428 | 428 | |
429 | - <p><?php esc_html_e( 'Lastly, you can present the form in a lot of different ways. With the "Display Options" section you can configure how the credit card field appears, the submit button text, which Gateway you want to use, whether Guests (non-logged in users) can donate or not, and a log-in form.', 'give' ); ?></p> |
|
429 | + <p><?php esc_html_e('Lastly, you can present the form in a lot of different ways. With the "Display Options" section you can configure how the credit card field appears, the submit button text, which Gateway you want to use, whether Guests (non-logged in users) can donate or not, and a log-in form.', 'give'); ?></p> |
|
430 | 430 | </div> |
431 | 431 | |
432 | 432 | |
@@ -446,23 +446,23 @@ discard block |
||
446 | 446 | * @return void |
447 | 447 | */ |
448 | 448 | public function credits_screen() { |
449 | - list( $display_version ) = explode( '-', GIVE_VERSION ); |
|
449 | + list($display_version) = explode('-', GIVE_VERSION); |
|
450 | 450 | ?> |
451 | 451 | <div class="wrap about-wrap"> |
452 | 452 | <h1 class="welcome-h1"><?php echo get_admin_page_title(); ?></h1> |
453 | 453 | |
454 | 454 | <?php give_social_media_elements() ?> |
455 | 455 | |
456 | - <p class="about-text"><?php esc_html_e( 'Thanks to all those who have contributed code directly or indirectly.', 'give' ); ?></p> |
|
456 | + <p class="about-text"><?php esc_html_e('Thanks to all those who have contributed code directly or indirectly.', 'give'); ?></p> |
|
457 | 457 | |
458 | - <p class="about-text"><?php esc_html_e( 'Welcome to the getting started guide.', 'give' ); ?></p> |
|
458 | + <p class="about-text"><?php esc_html_e('Welcome to the getting started guide.', 'give'); ?></p> |
|
459 | 459 | |
460 | 460 | <?php give_get_newsletter(); ?> |
461 | 461 | |
462 | 462 | <div class="give-badge"><?php |
463 | 463 | printf( |
464 | 464 | /* translators: %s: Give version */ |
465 | - esc_html__( 'Version %s', 'give' ), |
|
465 | + esc_html__('Version %s', 'give'), |
|
466 | 466 | $display_version |
467 | 467 | ); |
468 | 468 | ?></div> |
@@ -472,8 +472,8 @@ discard block |
||
472 | 472 | <p class="about-description"><?php |
473 | 473 | printf( |
474 | 474 | /* translators: %s: https://github.com/WordImpress/give */ |
475 | - __( 'Give is created by a dedicated team of developers. If you are interested in contributing please visit the <a href="%s" target="_blank">GitHub Repo</a>.', 'give' ), |
|
476 | - esc_url( 'https://github.com/WordImpress/give' ) |
|
475 | + __('Give is created by a dedicated team of developers. If you are interested in contributing please visit the <a href="%s" target="_blank">GitHub Repo</a>.', 'give'), |
|
476 | + esc_url('https://github.com/WordImpress/give') |
|
477 | 477 | ); |
478 | 478 | ?></p> |
479 | 479 | |
@@ -490,21 +490,21 @@ discard block |
||
490 | 490 | * @return string $readme HTML formatted readme file |
491 | 491 | */ |
492 | 492 | public function parse_readme() { |
493 | - $file = file_exists( GIVE_PLUGIN_DIR . 'readme.txt' ) ? GIVE_PLUGIN_DIR . 'readme.txt' : null; |
|
493 | + $file = file_exists(GIVE_PLUGIN_DIR.'readme.txt') ? GIVE_PLUGIN_DIR.'readme.txt' : null; |
|
494 | 494 | |
495 | - if ( ! $file ) { |
|
496 | - $readme = '<p>' . esc_html__( 'No valid changlog was found.', 'give' ) . '</p>'; |
|
495 | + if ( ! $file) { |
|
496 | + $readme = '<p>'.esc_html__('No valid changlog was found.', 'give').'</p>'; |
|
497 | 497 | } else { |
498 | - $readme = file_get_contents( $file ); |
|
499 | - $readme = nl2br( esc_html( $readme ) ); |
|
500 | - $readme = explode( '== Changelog ==', $readme ); |
|
501 | - $readme = end( $readme ); |
|
502 | - |
|
503 | - $readme = preg_replace( '/`(.*?)`/', '<code>\\1</code>', $readme ); |
|
504 | - $readme = preg_replace( '/[\040]\*\*(.*?)\*\*/', ' <strong>\\1</strong>', $readme ); |
|
505 | - $readme = preg_replace( '/[\040]\*(.*?)\*/', ' <em>\\1</em>', $readme ); |
|
506 | - $readme = preg_replace( '/= (.*?) =/', '<h4>\\1</h4>', $readme ); |
|
507 | - $readme = preg_replace( '/\[(.*?)\]\((.*?)\)/', '<a href="\\2">\\1</a>', $readme ); |
|
498 | + $readme = file_get_contents($file); |
|
499 | + $readme = nl2br(esc_html($readme)); |
|
500 | + $readme = explode('== Changelog ==', $readme); |
|
501 | + $readme = end($readme); |
|
502 | + |
|
503 | + $readme = preg_replace('/`(.*?)`/', '<code>\\1</code>', $readme); |
|
504 | + $readme = preg_replace('/[\040]\*\*(.*?)\*\*/', ' <strong>\\1</strong>', $readme); |
|
505 | + $readme = preg_replace('/[\040]\*(.*?)\*/', ' <em>\\1</em>', $readme); |
|
506 | + $readme = preg_replace('/= (.*?) =/', '<h4>\\1</h4>', $readme); |
|
507 | + $readme = preg_replace('/\[(.*?)\]\((.*?)\)/', '<a href="\\2">\\1</a>', $readme); |
|
508 | 508 | } |
509 | 509 | |
510 | 510 | return $readme; |
@@ -521,24 +521,24 @@ discard block |
||
521 | 521 | public function contributors() { |
522 | 522 | $contributors = $this->get_contributors(); |
523 | 523 | |
524 | - if ( empty( $contributors ) ) { |
|
524 | + if (empty($contributors)) { |
|
525 | 525 | return ''; |
526 | 526 | } |
527 | 527 | |
528 | 528 | $contributor_list = '<ul class="wp-people-group">'; |
529 | 529 | |
530 | - foreach ( $contributors as $contributor ) { |
|
530 | + foreach ($contributors as $contributor) { |
|
531 | 531 | $contributor_list .= '<li class="wp-person">'; |
532 | 532 | $contributor_list .= sprintf( |
533 | 533 | '<a href="%1$s" target="_blank"><img src="%2$s" width="64" height="64" class="gravatar" alt="%3$s" /></a>', |
534 | - esc_url( 'https://github.com/' . $contributor->login ), |
|
535 | - esc_url( $contributor->avatar_url ), |
|
536 | - esc_attr( $contributor->login ) |
|
534 | + esc_url('https://github.com/'.$contributor->login), |
|
535 | + esc_url($contributor->avatar_url), |
|
536 | + esc_attr($contributor->login) |
|
537 | 537 | ); |
538 | 538 | $contributor_list .= sprintf( |
539 | 539 | '<a class="web" target="_blank" href="%1$s">%2$s</a>', |
540 | - esc_url( 'https://github.com/' . $contributor->login ), |
|
541 | - esc_html( $contributor->login ) |
|
540 | + esc_url('https://github.com/'.$contributor->login), |
|
541 | + esc_html($contributor->login) |
|
542 | 542 | ); |
543 | 543 | $contributor_list .= '</li>'; |
544 | 544 | } |
@@ -556,25 +556,25 @@ discard block |
||
556 | 556 | * @return array $contributors List of contributors |
557 | 557 | */ |
558 | 558 | public function get_contributors() { |
559 | - $contributors = get_transient( 'give_contributors' ); |
|
559 | + $contributors = get_transient('give_contributors'); |
|
560 | 560 | |
561 | - if ( false !== $contributors ) { |
|
561 | + if (false !== $contributors) { |
|
562 | 562 | return $contributors; |
563 | 563 | } |
564 | 564 | |
565 | - $response = wp_remote_get( 'https://api.github.com/repos/WordImpress/Give/contributors', array( 'sslverify' => false ) ); |
|
565 | + $response = wp_remote_get('https://api.github.com/repos/WordImpress/Give/contributors', array('sslverify' => false)); |
|
566 | 566 | |
567 | - if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) { |
|
567 | + if (is_wp_error($response) || 200 != wp_remote_retrieve_response_code($response)) { |
|
568 | 568 | return array(); |
569 | 569 | } |
570 | 570 | |
571 | - $contributors = json_decode( wp_remote_retrieve_body( $response ) ); |
|
571 | + $contributors = json_decode(wp_remote_retrieve_body($response)); |
|
572 | 572 | |
573 | - if ( ! is_array( $contributors ) ) { |
|
573 | + if ( ! is_array($contributors)) { |
|
574 | 574 | return array(); |
575 | 575 | } |
576 | 576 | |
577 | - set_transient( 'give_contributors', $contributors, 3600 ); |
|
577 | + set_transient('give_contributors', $contributors, 3600); |
|
578 | 578 | |
579 | 579 | return $contributors; |
580 | 580 | } |
@@ -592,24 +592,24 @@ discard block |
||
592 | 592 | $give_options = give_get_settings(); |
593 | 593 | |
594 | 594 | // Bail if no activation redirect |
595 | - if ( ! get_transient( '_give_activation_redirect' ) ) { |
|
595 | + if ( ! get_transient('_give_activation_redirect')) { |
|
596 | 596 | return; |
597 | 597 | } |
598 | 598 | |
599 | 599 | // Delete the redirect transient |
600 | - delete_transient( '_give_activation_redirect' ); |
|
600 | + delete_transient('_give_activation_redirect'); |
|
601 | 601 | |
602 | 602 | // Bail if activating from network, or bulk |
603 | - if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { |
|
603 | + if (is_network_admin() || isset($_GET['activate-multi'])) { |
|
604 | 604 | return; |
605 | 605 | } |
606 | 606 | |
607 | - $upgrade = get_option( 'give_version_upgraded_from' ); |
|
607 | + $upgrade = get_option('give_version_upgraded_from'); |
|
608 | 608 | |
609 | - if ( ! $upgrade ) { // First time install |
|
610 | - wp_safe_redirect( admin_url( 'index.php?page=give-about' ) ); |
|
609 | + if ( ! $upgrade) { // First time install |
|
610 | + wp_safe_redirect(admin_url('index.php?page=give-about')); |
|
611 | 611 | exit; |
612 | - } elseif( isset( $give_options['disable_welcome'] ) ) { // Welcome is disabled in settings |
|
612 | + } elseif (isset($give_options['disable_welcome'])) { // Welcome is disabled in settings |
|
613 | 613 | |
614 | 614 | } else { // Welcome is NOT disabled in settings |
615 | 615 | wp_safe_redirect(admin_url('index.php?page=give-about')); |
@@ -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 | |
@@ -25,52 +25,52 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @return void |
27 | 27 | */ |
28 | -function give_update_payment_details( $data ) { |
|
28 | +function give_update_payment_details($data) { |
|
29 | 29 | |
30 | - if ( ! current_user_can( 'edit_give_payments', $data['give_payment_id'] ) ) { |
|
31 | - wp_die( esc_html__( 'You do not have permission to edit payments.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
30 | + if ( ! current_user_can('edit_give_payments', $data['give_payment_id'])) { |
|
31 | + wp_die(esc_html__('You do not have permission to edit payments.', 'give'), esc_html__('Error', 'give'), array('response' => 403)); |
|
32 | 32 | } |
33 | 33 | |
34 | - check_admin_referer( 'give_update_payment_details_nonce' ); |
|
34 | + check_admin_referer('give_update_payment_details_nonce'); |
|
35 | 35 | |
36 | 36 | // Retrieve the payment ID. |
37 | - $payment_id = absint( $data['give_payment_id'] ); |
|
37 | + $payment_id = absint($data['give_payment_id']); |
|
38 | 38 | |
39 | 39 | /* @var Give_Payment $payment */ |
40 | - $payment = new Give_Payment( $payment_id ); |
|
40 | + $payment = new Give_Payment($payment_id); |
|
41 | 41 | |
42 | 42 | // Retrieve existing payment meta. |
43 | 43 | $meta = $payment->get_meta(); |
44 | 44 | $user_info = $payment->user_info; |
45 | 45 | |
46 | 46 | $status = $data['give-payment-status']; |
47 | - $date = sanitize_text_field( $data['give-payment-date'] ); |
|
48 | - $hour = sanitize_text_field( $data['give-payment-time-hour'] ); |
|
47 | + $date = sanitize_text_field($data['give-payment-date']); |
|
48 | + $hour = sanitize_text_field($data['give-payment-time-hour']); |
|
49 | 49 | |
50 | 50 | // Restrict to our high and low. |
51 | - if ( $hour > 23 ) { |
|
51 | + if ($hour > 23) { |
|
52 | 52 | $hour = 23; |
53 | - } elseif ( $hour < 0 ) { |
|
53 | + } elseif ($hour < 0) { |
|
54 | 54 | $hour = 00; |
55 | 55 | } |
56 | 56 | |
57 | - $minute = sanitize_text_field( $data['give-payment-time-min'] ); |
|
57 | + $minute = sanitize_text_field($data['give-payment-time-min']); |
|
58 | 58 | |
59 | 59 | // Restrict to our high and low. |
60 | - if ( $minute > 59 ) { |
|
60 | + if ($minute > 59) { |
|
61 | 61 | $minute = 59; |
62 | - } elseif ( $minute < 0 ) { |
|
62 | + } elseif ($minute < 0) { |
|
63 | 63 | $minute = 00; |
64 | 64 | } |
65 | 65 | |
66 | - $address = array_map( 'trim', $data['give-payment-address'][0] ); |
|
66 | + $address = array_map('trim', $data['give-payment-address'][0]); |
|
67 | 67 | |
68 | - $curr_total = give_sanitize_amount( $payment->total ); |
|
69 | - $new_total = give_sanitize_amount( $data['give-payment-total'] ); |
|
70 | - $date = date( 'Y-m-d', strtotime( $date ) ) . ' ' . $hour . ':' . $minute . ':00'; |
|
68 | + $curr_total = give_sanitize_amount($payment->total); |
|
69 | + $new_total = give_sanitize_amount($data['give-payment-total']); |
|
70 | + $date = date('Y-m-d', strtotime($date)).' '.$hour.':'.$minute.':00'; |
|
71 | 71 | |
72 | - $curr_customer_id = sanitize_text_field( $data['give-current-customer'] ); |
|
73 | - $new_customer_id = sanitize_text_field( $data['customer-id'] ); |
|
72 | + $curr_customer_id = sanitize_text_field($data['give-current-customer']); |
|
73 | + $new_customer_id = sanitize_text_field($data['customer-id']); |
|
74 | 74 | |
75 | 75 | /** |
76 | 76 | * Fires before updating edited donation. |
@@ -79,98 +79,98 @@ discard block |
||
79 | 79 | * |
80 | 80 | * @param int $payment_id The ID of the payment. |
81 | 81 | */ |
82 | - do_action( 'give_update_edited_purchase', $payment_id ); |
|
82 | + do_action('give_update_edited_purchase', $payment_id); |
|
83 | 83 | |
84 | 84 | $payment->date = $date; |
85 | 85 | $updated = $payment->save(); |
86 | 86 | |
87 | - if ( 0 === $updated ) { |
|
88 | - wp_die( esc_html__( 'Error Updating Donation.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 400 ) ); |
|
87 | + if (0 === $updated) { |
|
88 | + wp_die(esc_html__('Error Updating Donation.', 'give'), esc_html__('Error', 'give'), array('response' => 400)); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | $customer_changed = false; |
92 | 92 | |
93 | - if ( isset( $data['give-new-customer'] ) && $data['give-new-customer'] == '1' ) { |
|
93 | + if (isset($data['give-new-customer']) && $data['give-new-customer'] == '1') { |
|
94 | 94 | |
95 | - $email = isset( $data['give-new-customer-email'] ) ? sanitize_text_field( $data['give-new-customer-email'] ) : ''; |
|
96 | - $names = isset( $data['give-new-customer-name'] ) ? sanitize_text_field( $data['give-new-customer-name'] ) : ''; |
|
95 | + $email = isset($data['give-new-customer-email']) ? sanitize_text_field($data['give-new-customer-email']) : ''; |
|
96 | + $names = isset($data['give-new-customer-name']) ? sanitize_text_field($data['give-new-customer-name']) : ''; |
|
97 | 97 | |
98 | - if ( empty( $email ) || empty( $names ) ) { |
|
99 | - wp_die( esc_html__( 'New Customers require a name and email address.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 400 ) ); |
|
98 | + if (empty($email) || empty($names)) { |
|
99 | + wp_die(esc_html__('New Customers require a name and email address.', 'give'), esc_html__('Error', 'give'), array('response' => 400)); |
|
100 | 100 | } |
101 | 101 | |
102 | - $customer = new Give_Customer( $email ); |
|
103 | - if ( empty( $customer->id ) ) { |
|
104 | - $customer_data = array( 'name' => $names, 'email' => $email ); |
|
105 | - $user_id = email_exists( $email ); |
|
106 | - if ( false !== $user_id ) { |
|
102 | + $customer = new Give_Customer($email); |
|
103 | + if (empty($customer->id)) { |
|
104 | + $customer_data = array('name' => $names, 'email' => $email); |
|
105 | + $user_id = email_exists($email); |
|
106 | + if (false !== $user_id) { |
|
107 | 107 | $customer_data['user_id'] = $user_id; |
108 | 108 | } |
109 | 109 | |
110 | - if ( ! $customer->create( $customer_data ) ) { |
|
110 | + if ( ! $customer->create($customer_data)) { |
|
111 | 111 | // Failed to crete the new donor, assume the previous donor. |
112 | 112 | $customer_changed = false; |
113 | - $customer = new Give_Customer( $curr_customer_id ); |
|
114 | - give_set_error( 'give-payment-new-customer-fail', esc_html__( 'Error creating new donor.', 'give' ) ); |
|
113 | + $customer = new Give_Customer($curr_customer_id); |
|
114 | + give_set_error('give-payment-new-customer-fail', esc_html__('Error creating new donor.', 'give')); |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
118 | 118 | $new_customer_id = $customer->id; |
119 | 119 | |
120 | - $previous_customer = new Give_Customer( $curr_customer_id ); |
|
120 | + $previous_customer = new Give_Customer($curr_customer_id); |
|
121 | 121 | |
122 | 122 | $customer_changed = true; |
123 | 123 | |
124 | - } elseif ( $curr_customer_id !== $new_customer_id ) { |
|
124 | + } elseif ($curr_customer_id !== $new_customer_id) { |
|
125 | 125 | |
126 | - $customer = new Give_Customer( $new_customer_id ); |
|
126 | + $customer = new Give_Customer($new_customer_id); |
|
127 | 127 | $email = $customer->email; |
128 | 128 | $names = $customer->name; |
129 | 129 | |
130 | - $previous_customer = new Give_Customer( $curr_customer_id ); |
|
130 | + $previous_customer = new Give_Customer($curr_customer_id); |
|
131 | 131 | |
132 | 132 | $customer_changed = true; |
133 | 133 | |
134 | 134 | } else { |
135 | 135 | |
136 | - $customer = new Give_Customer( $curr_customer_id ); |
|
136 | + $customer = new Give_Customer($curr_customer_id); |
|
137 | 137 | $email = $customer->email; |
138 | 138 | $names = $customer->name; |
139 | 139 | |
140 | 140 | } |
141 | 141 | |
142 | 142 | // Setup first and last name from input values. |
143 | - $names = explode( ' ', $names ); |
|
144 | - $first_name = ! empty( $names[0] ) ? $names[0] : ''; |
|
143 | + $names = explode(' ', $names); |
|
144 | + $first_name = ! empty($names[0]) ? $names[0] : ''; |
|
145 | 145 | $last_name = ''; |
146 | - if ( ! empty( $names[1] ) ) { |
|
147 | - unset( $names[0] ); |
|
148 | - $last_name = implode( ' ', $names ); |
|
146 | + if ( ! empty($names[1])) { |
|
147 | + unset($names[0]); |
|
148 | + $last_name = implode(' ', $names); |
|
149 | 149 | } |
150 | 150 | |
151 | - if ( $customer_changed ) { |
|
151 | + if ($customer_changed) { |
|
152 | 152 | |
153 | 153 | // Remove the stats and payment from the previous customer and attach it to the new customer. |
154 | - $previous_customer->remove_payment( $payment_id, false ); |
|
155 | - $customer->attach_payment( $payment_id, false ); |
|
154 | + $previous_customer->remove_payment($payment_id, false); |
|
155 | + $customer->attach_payment($payment_id, false); |
|
156 | 156 | |
157 | - if ( 'publish' == $status ) { |
|
157 | + if ('publish' == $status) { |
|
158 | 158 | |
159 | 159 | // Reduce previous user donation count and amount. |
160 | 160 | $previous_customer->decrease_purchase_count(); |
161 | - $previous_customer->decrease_value( $curr_total ); |
|
161 | + $previous_customer->decrease_value($curr_total); |
|
162 | 162 | |
163 | 163 | // If donation was completed adjust stats of new customers. |
164 | 164 | $customer->increase_purchase_count(); |
165 | - $customer->increase_value( $new_total ); |
|
165 | + $customer->increase_value($new_total); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | $payment->customer_id = $customer->id; |
169 | 169 | } else { |
170 | 170 | |
171 | - if ( 'publish' === $status ) { |
|
171 | + if ('publish' === $status) { |
|
172 | 172 | // Update user donation stat. |
173 | - $customer->update_donation_value( $curr_total, $new_total ); |
|
173 | + $customer->update_donation_value($curr_total, $new_total); |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 | |
@@ -183,10 +183,10 @@ discard block |
||
183 | 183 | $payment->total = $new_total; |
184 | 184 | |
185 | 185 | // Check for payment notes. |
186 | - if ( ! empty( $data['give-payment-note'] ) ) { |
|
186 | + if ( ! empty($data['give-payment-note'])) { |
|
187 | 187 | |
188 | - $note = wp_kses( $data['give-payment-note'], array() ); |
|
189 | - give_insert_payment_note( $payment_id, $note ); |
|
188 | + $note = wp_kses($data['give-payment-note'], array()); |
|
189 | + give_insert_payment_note($payment_id, $note); |
|
190 | 190 | |
191 | 191 | } |
192 | 192 | |
@@ -194,17 +194,17 @@ discard block |
||
194 | 194 | $payment->status = $status; |
195 | 195 | |
196 | 196 | // Adjust total store earnings if the payment total has been changed. |
197 | - if ( $new_total !== $curr_total && 'publish' == $status ) { |
|
197 | + if ($new_total !== $curr_total && 'publish' == $status) { |
|
198 | 198 | |
199 | - if ( $new_total > $curr_total ) { |
|
199 | + if ($new_total > $curr_total) { |
|
200 | 200 | // Increase if our new total is higher. |
201 | 201 | $difference = $new_total - $curr_total; |
202 | - give_increase_total_earnings( $difference ); |
|
202 | + give_increase_total_earnings($difference); |
|
203 | 203 | |
204 | - } elseif ( $curr_total > $new_total ) { |
|
204 | + } elseif ($curr_total > $new_total) { |
|
205 | 205 | // Decrease if our new total is lower. |
206 | 206 | $difference = $curr_total - $new_total; |
207 | - give_decrease_total_earnings( $difference ); |
|
207 | + give_decrease_total_earnings($difference); |
|
208 | 208 | |
209 | 209 | } |
210 | 210 | } |
@@ -212,16 +212,16 @@ discard block |
||
212 | 212 | $payment->save(); |
213 | 213 | |
214 | 214 | // Get new give form ID. |
215 | - $new_form_id = absint( $data['forms'] ); |
|
216 | - $current_form_id = absint( $payment->get_meta( '_give_payment_form_id' ) ); |
|
215 | + $new_form_id = absint($data['forms']); |
|
216 | + $current_form_id = absint($payment->get_meta('_give_payment_form_id')); |
|
217 | 217 | |
218 | 218 | // We are adding payment transfer code in last to remove any conflict with above functionality. |
219 | 219 | // For example: above code will automatically handle form stat (increase/decrease) when payment status changes. |
220 | 220 | // Check if user want to transfer current payment to new give form id. |
221 | - if ( $new_form_id != $current_form_id ) { |
|
221 | + if ($new_form_id != $current_form_id) { |
|
222 | 222 | |
223 | 223 | // Get new give form title. |
224 | - $new_form_title = get_the_title( $new_form_id ); |
|
224 | + $new_form_title = get_the_title($new_form_id); |
|
225 | 225 | |
226 | 226 | // Update new give form data in payment data. |
227 | 227 | $payment_meta = $payment->get_meta(); |
@@ -229,56 +229,56 @@ discard block |
||
229 | 229 | $payment_meta['form_id'] = $new_form_id; |
230 | 230 | |
231 | 231 | // Update price id post meta data for set donation form. |
232 | - if ( ! give_has_variable_prices( $new_form_id ) ) { |
|
232 | + if ( ! give_has_variable_prices($new_form_id)) { |
|
233 | 233 | $payment_meta['price_id'] = ''; |
234 | 234 | } |
235 | 235 | |
236 | 236 | // Update payment give form meta data. |
237 | - $payment->update_meta( '_give_payment_form_id', $new_form_id ); |
|
238 | - $payment->update_meta( '_give_payment_form_title', $new_form_title ); |
|
239 | - $payment->update_meta( '_give_payment_meta', $payment_meta ); |
|
237 | + $payment->update_meta('_give_payment_form_id', $new_form_id); |
|
238 | + $payment->update_meta('_give_payment_form_title', $new_form_title); |
|
239 | + $payment->update_meta('_give_payment_meta', $payment_meta); |
|
240 | 240 | |
241 | 241 | // Update price id payment metadata. |
242 | - if ( ! give_has_variable_prices( $new_form_id ) ) { |
|
243 | - $payment->update_meta( '_give_payment_price_id', '' ); |
|
242 | + if ( ! give_has_variable_prices($new_form_id)) { |
|
243 | + $payment->update_meta('_give_payment_price_id', ''); |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | // If donation was completed, adjust stats of forms. |
247 | - if ( 'publish' == $status ) { |
|
247 | + if ('publish' == $status) { |
|
248 | 248 | |
249 | 249 | // Decrease sale of old give form. For other payment status. |
250 | - $current_form = new Give_Donate_Form( $current_form_id ); |
|
250 | + $current_form = new Give_Donate_Form($current_form_id); |
|
251 | 251 | $current_form->decrease_sales(); |
252 | - $current_form->decrease_earnings( $curr_total ); |
|
252 | + $current_form->decrease_earnings($curr_total); |
|
253 | 253 | |
254 | 254 | // Increase sale of new give form. |
255 | - $new_form = new Give_Donate_Form( $new_form_id ); |
|
255 | + $new_form = new Give_Donate_Form($new_form_id); |
|
256 | 256 | $new_form->increase_sales(); |
257 | - $new_form->increase_earnings( $new_total ); |
|
257 | + $new_form->increase_earnings($new_total); |
|
258 | 258 | } |
259 | 259 | |
260 | 260 | // Re setup payment to update new meta value in object. |
261 | - $payment->update_payment_setup( $payment->ID ); |
|
261 | + $payment->update_payment_setup($payment->ID); |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | // Update price id if current form is variable form. |
265 | - if ( ! empty( $data['give-variable-price'] ) && give_has_variable_prices( $payment->form_id ) ) { |
|
265 | + if ( ! empty($data['give-variable-price']) && give_has_variable_prices($payment->form_id)) { |
|
266 | 266 | |
267 | 267 | // Get payment meta data. |
268 | 268 | $payment_meta = $payment->get_meta(); |
269 | 269 | |
270 | 270 | // Set payment id to empty string if variable price id is negative ( i.e. custom amount feature enabled ). |
271 | - $data['give-variable-price'] = ( 'custom' === $data['give-variable-price'] ) ? 'custom' : ( 0 < $data['give-variable-price'] ) ? $data['give-variable-price'] : ''; |
|
271 | + $data['give-variable-price'] = ('custom' === $data['give-variable-price']) ? 'custom' : (0 < $data['give-variable-price']) ? $data['give-variable-price'] : ''; |
|
272 | 272 | |
273 | 273 | // Update payment meta data. |
274 | 274 | $payment_meta['price_id'] = $data['give-variable-price']; |
275 | 275 | |
276 | 276 | // Update payment give form meta data. |
277 | - $payment->update_meta( '_give_payment_price_id', $data['give-variable-price'] ); |
|
278 | - $payment->update_meta( '_give_payment_meta', $payment_meta ); |
|
277 | + $payment->update_meta('_give_payment_price_id', $data['give-variable-price']); |
|
278 | + $payment->update_meta('_give_payment_meta', $payment_meta); |
|
279 | 279 | |
280 | 280 | // Re setup payment to update new meta value in object. |
281 | - $payment->update_payment_setup( $payment->ID ); |
|
281 | + $payment->update_payment_setup($payment->ID); |
|
282 | 282 | } |
283 | 283 | |
284 | 284 | /** |
@@ -288,13 +288,13 @@ discard block |
||
288 | 288 | * |
289 | 289 | * @param int $payment_id The ID of the payment. |
290 | 290 | */ |
291 | - do_action( 'give_updated_edited_purchase', $payment_id ); |
|
291 | + do_action('give_updated_edited_purchase', $payment_id); |
|
292 | 292 | |
293 | - wp_safe_redirect( admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&give-message=payment-updated&id=' . $payment_id ) ); |
|
293 | + wp_safe_redirect(admin_url('edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&give-message=payment-updated&id='.$payment_id)); |
|
294 | 294 | exit; |
295 | 295 | } |
296 | 296 | |
297 | -add_action( 'give_update_payment_details', 'give_update_payment_details' ); |
|
297 | +add_action('give_update_payment_details', 'give_update_payment_details'); |
|
298 | 298 | |
299 | 299 | /** |
300 | 300 | * Trigger a Donation Deletion |
@@ -305,48 +305,48 @@ discard block |
||
305 | 305 | * |
306 | 306 | * @return void |
307 | 307 | */ |
308 | -function give_trigger_purchase_delete( $data ) { |
|
309 | - if ( wp_verify_nonce( $data['_wpnonce'], 'give_donation_nonce' ) ) { |
|
308 | +function give_trigger_purchase_delete($data) { |
|
309 | + if (wp_verify_nonce($data['_wpnonce'], 'give_donation_nonce')) { |
|
310 | 310 | |
311 | - $payment_id = absint( $data['purchase_id'] ); |
|
311 | + $payment_id = absint($data['purchase_id']); |
|
312 | 312 | |
313 | - if ( ! current_user_can( 'edit_give_payments', $payment_id ) ) { |
|
314 | - wp_die( esc_html__( 'You do not have permission to edit payments.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
313 | + if ( ! current_user_can('edit_give_payments', $payment_id)) { |
|
314 | + wp_die(esc_html__('You do not have permission to edit payments.', 'give'), esc_html__('Error', 'give'), array('response' => 403)); |
|
315 | 315 | } |
316 | 316 | |
317 | - give_delete_purchase( $payment_id ); |
|
318 | - wp_redirect( admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&give-message=donation_deleted' ) ); |
|
317 | + give_delete_purchase($payment_id); |
|
318 | + wp_redirect(admin_url('edit.php?post_type=give_forms&page=give-payment-history&give-message=donation_deleted')); |
|
319 | 319 | give_die(); |
320 | 320 | } |
321 | 321 | } |
322 | 322 | |
323 | -add_action( 'give_delete_payment', 'give_trigger_purchase_delete' ); |
|
323 | +add_action('give_delete_payment', 'give_trigger_purchase_delete'); |
|
324 | 324 | |
325 | 325 | /** |
326 | 326 | * AJAX Store Donation Note |
327 | 327 | */ |
328 | 328 | function give_ajax_store_payment_note() { |
329 | 329 | |
330 | - $payment_id = absint( $_POST['payment_id'] ); |
|
331 | - $note = wp_kses( $_POST['note'], array() ); |
|
330 | + $payment_id = absint($_POST['payment_id']); |
|
331 | + $note = wp_kses($_POST['note'], array()); |
|
332 | 332 | |
333 | - if ( ! current_user_can( 'edit_give_payments', $payment_id ) ) { |
|
334 | - wp_die( esc_html__( 'You do not have permission to edit payments.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
333 | + if ( ! current_user_can('edit_give_payments', $payment_id)) { |
|
334 | + wp_die(esc_html__('You do not have permission to edit payments.', 'give'), esc_html__('Error', 'give'), array('response' => 403)); |
|
335 | 335 | } |
336 | 336 | |
337 | - if ( empty( $payment_id ) ) { |
|
338 | - die( '-1' ); |
|
337 | + if (empty($payment_id)) { |
|
338 | + die('-1'); |
|
339 | 339 | } |
340 | 340 | |
341 | - if ( empty( $note ) ) { |
|
342 | - die( '-1' ); |
|
341 | + if (empty($note)) { |
|
342 | + die('-1'); |
|
343 | 343 | } |
344 | 344 | |
345 | - $note_id = give_insert_payment_note( $payment_id, $note ); |
|
346 | - die( give_get_payment_note_html( $note_id ) ); |
|
345 | + $note_id = give_insert_payment_note($payment_id, $note); |
|
346 | + die(give_get_payment_note_html($note_id)); |
|
347 | 347 | } |
348 | 348 | |
349 | -add_action( 'wp_ajax_give_insert_payment_note', 'give_ajax_store_payment_note' ); |
|
349 | +add_action('wp_ajax_give_insert_payment_note', 'give_ajax_store_payment_note'); |
|
350 | 350 | |
351 | 351 | /** |
352 | 352 | * Triggers a donation note deletion without ajax |
@@ -357,24 +357,24 @@ discard block |
||
357 | 357 | * |
358 | 358 | * @return void |
359 | 359 | */ |
360 | -function give_trigger_payment_note_deletion( $data ) { |
|
360 | +function give_trigger_payment_note_deletion($data) { |
|
361 | 361 | |
362 | - if ( ! wp_verify_nonce( $data['_wpnonce'], 'give_delete_payment_note_' . $data['note_id'] ) ) { |
|
362 | + if ( ! wp_verify_nonce($data['_wpnonce'], 'give_delete_payment_note_'.$data['note_id'])) { |
|
363 | 363 | return; |
364 | 364 | } |
365 | 365 | |
366 | - if ( ! current_user_can( 'edit_give_payments', $data['payment_id'] ) ) { |
|
367 | - wp_die( esc_html__( 'You do not have permission to edit payments.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
366 | + if ( ! current_user_can('edit_give_payments', $data['payment_id'])) { |
|
367 | + wp_die(esc_html__('You do not have permission to edit payments.', 'give'), esc_html__('Error', 'give'), array('response' => 403)); |
|
368 | 368 | } |
369 | 369 | |
370 | - $edit_order_url = admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&give-message=donation-note-deleted&id=' . absint( $data['payment_id'] ) ); |
|
370 | + $edit_order_url = admin_url('edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&give-message=donation-note-deleted&id='.absint($data['payment_id'])); |
|
371 | 371 | |
372 | - give_delete_payment_note( $data['note_id'], $data['payment_id'] ); |
|
372 | + give_delete_payment_note($data['note_id'], $data['payment_id']); |
|
373 | 373 | |
374 | - wp_redirect( $edit_order_url ); |
|
374 | + wp_redirect($edit_order_url); |
|
375 | 375 | } |
376 | 376 | |
377 | -add_action( 'give_delete_payment_note', 'give_trigger_payment_note_deletion' ); |
|
377 | +add_action('give_delete_payment_note', 'give_trigger_payment_note_deletion'); |
|
378 | 378 | |
379 | 379 | /** |
380 | 380 | * Delete a payment note deletion with ajax |
@@ -385,16 +385,16 @@ discard block |
||
385 | 385 | */ |
386 | 386 | function give_ajax_delete_payment_note() { |
387 | 387 | |
388 | - if ( ! current_user_can( 'edit_give_payments', $_POST['payment_id'] ) ) { |
|
389 | - wp_die( esc_html__( 'You do not have permission to edit payments.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
388 | + if ( ! current_user_can('edit_give_payments', $_POST['payment_id'])) { |
|
389 | + wp_die(esc_html__('You do not have permission to edit payments.', 'give'), esc_html__('Error', 'give'), array('response' => 403)); |
|
390 | 390 | } |
391 | 391 | |
392 | - if ( give_delete_payment_note( $_POST['note_id'], $_POST['payment_id'] ) ) { |
|
393 | - die( '1' ); |
|
392 | + if (give_delete_payment_note($_POST['note_id'], $_POST['payment_id'])) { |
|
393 | + die('1'); |
|
394 | 394 | } else { |
395 | - die( '-1' ); |
|
395 | + die('-1'); |
|
396 | 396 | } |
397 | 397 | |
398 | 398 | } |
399 | 399 | |
400 | -add_action( 'wp_ajax_give_delete_payment_note', 'give_ajax_delete_payment_note' ); |
|
400 | +add_action('wp_ajax_give_delete_payment_note', 'give_ajax_delete_payment_note'); |
@@ -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 | |
@@ -25,12 +25,12 @@ discard block |
||
25 | 25 | */ |
26 | 26 | function give_payment_history_page() { |
27 | 27 | |
28 | - $give_payment = get_post_type_object( 'give_payment' ); |
|
28 | + $give_payment = get_post_type_object('give_payment'); |
|
29 | 29 | |
30 | - if ( isset( $_GET['view'] ) && 'view-order-details' == $_GET['view'] ) { |
|
31 | - require_once GIVE_PLUGIN_DIR . 'includes/admin/payments/view-order-details.php'; |
|
30 | + if (isset($_GET['view']) && 'view-order-details' == $_GET['view']) { |
|
31 | + require_once GIVE_PLUGIN_DIR.'includes/admin/payments/view-order-details.php'; |
|
32 | 32 | } else { |
33 | - require_once GIVE_PLUGIN_DIR . 'includes/admin/payments/class-payments-table.php'; |
|
33 | + require_once GIVE_PLUGIN_DIR.'includes/admin/payments/class-payments-table.php'; |
|
34 | 34 | $payments_table = new Give_Payment_History_Table(); |
35 | 35 | $payments_table->prepare_items(); |
36 | 36 | ?> |
@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @since 1.7 |
46 | 46 | */ |
47 | - do_action( 'give_payments_page_top' ); |
|
47 | + do_action('give_payments_page_top'); |
|
48 | 48 | ?> |
49 | 49 | |
50 | - <form id="give-payments-filter" method="get" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-payment-history' ); ?>"> |
|
50 | + <form id="give-payments-filter" method="get" action="<?php echo admin_url('edit.php?post_type=give_forms&page=give-payment-history'); ?>"> |
|
51 | 51 | <input type="hidden" name="post_type" value="give_forms" /> |
52 | 52 | <input type="hidden" name="page" value="give-payment-history" /> |
53 | 53 | <?php $payments_table->views() ?> |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * |
62 | 62 | * @since 1.7 |
63 | 63 | */ |
64 | - do_action( 'give_payments_page_bottom' ); |
|
64 | + do_action('give_payments_page_bottom'); |
|
65 | 65 | ?> |
66 | 66 | |
67 | 67 | </div> |
@@ -78,29 +78,29 @@ discard block |
||
78 | 78 | * @param $title |
79 | 79 | * @return string |
80 | 80 | */ |
81 | -function give_view_order_details_title( $admin_title, $title ) { |
|
81 | +function give_view_order_details_title($admin_title, $title) { |
|
82 | 82 | |
83 | - if ( 'give_forms_page_give-payment-history' != get_current_screen()->base ) { |
|
83 | + if ('give_forms_page_give-payment-history' != get_current_screen()->base) { |
|
84 | 84 | return $admin_title; |
85 | 85 | } |
86 | 86 | |
87 | - if( ! isset( $_GET['give-action'] ) ) { |
|
87 | + if ( ! isset($_GET['give-action'])) { |
|
88 | 88 | return $admin_title; |
89 | 89 | } |
90 | 90 | |
91 | - switch( $_GET['give-action'] ) : |
|
91 | + switch ($_GET['give-action']) : |
|
92 | 92 | |
93 | 93 | case 'view-order-details' : |
94 | 94 | $title = sprintf( |
95 | 95 | /* translators: %s: admin title */ |
96 | - esc_html__( 'View Donation Details - %s', 'give' ), |
|
96 | + esc_html__('View Donation Details - %s', 'give'), |
|
97 | 97 | $admin_title |
98 | 98 | ); |
99 | 99 | break; |
100 | 100 | case 'edit-payment' : |
101 | 101 | $title = sprintf( |
102 | 102 | /* translators: %s: admin title */ |
103 | - esc_html__( 'Edit Donation - %s', 'give' ), |
|
103 | + esc_html__('Edit Donation - %s', 'give'), |
|
104 | 104 | $admin_title |
105 | 105 | ); |
106 | 106 | break; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | return $title; |
113 | 113 | } |
114 | -add_filter( 'admin_title', 'give_view_order_details_title', 10, 2 ); |
|
114 | +add_filter('admin_title', 'give_view_order_details_title', 10, 2); |
|
115 | 115 | |
116 | 116 | /** |
117 | 117 | * Intercept default Edit post links for Give payments and rewrite them to the View Order Details screen |
@@ -123,20 +123,20 @@ discard block |
||
123 | 123 | * @param $context |
124 | 124 | * @return string |
125 | 125 | */ |
126 | -function give_override_edit_post_for_payment_link( $url, $post_id = 0, $context ) { |
|
126 | +function give_override_edit_post_for_payment_link($url, $post_id = 0, $context) { |
|
127 | 127 | |
128 | - $post = get_post( $post_id ); |
|
128 | + $post = get_post($post_id); |
|
129 | 129 | |
130 | - if( ! $post ) { |
|
130 | + if ( ! $post) { |
|
131 | 131 | return $url; |
132 | 132 | } |
133 | 133 | |
134 | - if( 'give_payment' != $post->post_type ) { |
|
134 | + if ('give_payment' != $post->post_type) { |
|
135 | 135 | return $url; |
136 | 136 | } |
137 | 137 | |
138 | - $url = admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&id=' . $post_id ); |
|
138 | + $url = admin_url('edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&id='.$post_id); |
|
139 | 139 | |
140 | 140 | return $url; |
141 | 141 | } |
142 | -add_filter( 'get_edit_post_link', 'give_override_edit_post_for_payment_link', 10, 3 ); |
|
142 | +add_filter('get_edit_post_link', 'give_override_edit_post_for_payment_link', 10, 3); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | // Exit if accessed directly. |
11 | -if ( ! defined( 'ABSPATH' ) ) { |
|
11 | +if ( ! defined('ABSPATH')) { |
|
12 | 12 | exit; |
13 | 13 | } |
14 | 14 | |
@@ -25,13 +25,13 @@ discard block |
||
25 | 25 | * |
26 | 26 | * @param $_banner_details |
27 | 27 | */ |
28 | - function __construct( $_banner_details ) { |
|
28 | + function __construct($_banner_details) { |
|
29 | 29 | |
30 | 30 | $current_user = wp_get_current_user(); |
31 | 31 | |
32 | 32 | $this->banner_details = $_banner_details; |
33 | - $this->test_mode = ( $this->banner_details['testing'] == 'true' ) ? true : false; |
|
34 | - $this->nag_meta_key = 'give_addon_activation_ignore_' . sanitize_title( $this->banner_details['name'] ); |
|
33 | + $this->test_mode = ($this->banner_details['testing'] == 'true') ? true : false; |
|
34 | + $this->nag_meta_key = 'give_addon_activation_ignore_'.sanitize_title($this->banner_details['name']); |
|
35 | 35 | |
36 | 36 | //Get current user |
37 | 37 | $this->user_id = $current_user->ID; |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | public function init() { |
52 | 52 | |
53 | 53 | //Testing? |
54 | - if ( $this->test_mode ) { |
|
55 | - delete_user_meta( $this->user_id, $this->nag_meta_key ); |
|
54 | + if ($this->test_mode) { |
|
55 | + delete_user_meta($this->user_id, $this->nag_meta_key); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | //Get the current page to add the notice to |
59 | - add_action( 'current_screen', array( $this, 'give_addon_notice_ignore' ) ); |
|
60 | - add_action( 'admin_notices', array( $this, 'give_addon_activation_admin_notice' ) ); |
|
59 | + add_action('current_screen', array($this, 'give_addon_notice_ignore')); |
|
60 | + add_action('admin_notices', array($this, 'give_addon_activation_admin_notice')); |
|
61 | 61 | |
62 | 62 | } |
63 | 63 | |
@@ -71,12 +71,12 @@ discard block |
||
71 | 71 | $screen = get_current_screen(); |
72 | 72 | |
73 | 73 | //Make sure we're on the plugins page. |
74 | - if ( $screen->parent_file !== 'plugins.php' ) { |
|
74 | + if ($screen->parent_file !== 'plugins.php') { |
|
75 | 75 | return false; |
76 | 76 | } |
77 | 77 | |
78 | 78 | // If the user hasn't already dismissed the alert, output activation banner. |
79 | - if ( ! get_user_meta( $this->user_id, $this->nag_meta_key ) ) { |
|
79 | + if ( ! get_user_meta($this->user_id, $this->nag_meta_key)) { |
|
80 | 80 | |
81 | 81 | // Output inline styles here because there's no reason |
82 | 82 | // to enqueued them after the alert is dismissed. |
@@ -158,43 +158,43 @@ discard block |
||
158 | 158 | <h3><?php |
159 | 159 | printf( |
160 | 160 | /* translators: %s: Add-on name */ |
161 | - esc_html__( "Thank you for installing Give's %s Add-on!", 'give' ), |
|
162 | - '<span>' . $this->banner_details['name'] . '</span>' |
|
161 | + esc_html__("Thank you for installing Give's %s Add-on!", 'give'), |
|
162 | + '<span>'.$this->banner_details['name'].'</span>' |
|
163 | 163 | ); |
164 | 164 | ?></h3> |
165 | 165 | |
166 | 166 | <a href="<?php |
167 | 167 | //The Dismiss Button. |
168 | - $nag_admin_dismiss_url = 'plugins.php?' . $this->nag_meta_key . '=0'; |
|
169 | - echo admin_url( $nag_admin_dismiss_url ); ?>" class="dismiss"><span |
|
168 | + $nag_admin_dismiss_url = 'plugins.php?'.$this->nag_meta_key.'=0'; |
|
169 | + echo admin_url($nag_admin_dismiss_url); ?>" class="dismiss"><span |
|
170 | 170 | class="dashicons dashicons-dismiss"></span></a> |
171 | 171 | |
172 | 172 | <div class="alert-actions"> |
173 | 173 | |
174 | 174 | <?php //Point them to your settings page. |
175 | - if ( isset( $this->banner_details['settings_url'] ) ) { ?> |
|
175 | + if (isset($this->banner_details['settings_url'])) { ?> |
|
176 | 176 | <a href="<?php echo $this->banner_details['settings_url']; ?>"> |
177 | - <span class="dashicons dashicons-admin-settings"></span><?php esc_html_e( 'Go to Settings', 'give' ); ?></a> |
|
177 | + <span class="dashicons dashicons-admin-settings"></span><?php esc_html_e('Go to Settings', 'give'); ?></a> |
|
178 | 178 | <?php } ?> |
179 | 179 | |
180 | 180 | <?php |
181 | 181 | // Show them how to configure the Addon. |
182 | - if ( isset( $this->banner_details['documentation_url'] ) ) { ?> |
|
182 | + if (isset($this->banner_details['documentation_url'])) { ?> |
|
183 | 183 | <a href="<?php echo $this->banner_details['documentation_url'] ?>" target="_blank"> |
184 | 184 | <span class="dashicons dashicons-media-text"></span><?php |
185 | 185 | printf( |
186 | 186 | /* translators: %s: Add-on name */ |
187 | - esc_html__( 'Documentation: %s Add-on', 'give' ), |
|
187 | + esc_html__('Documentation: %s Add-on', 'give'), |
|
188 | 188 | $this->banner_details['name'] |
189 | 189 | ); |
190 | 190 | ?></a> |
191 | 191 | <?php } ?> |
192 | 192 | <?php |
193 | 193 | //Let them signup for plugin updates |
194 | - if ( isset( $this->banner_details['support_url'] ) ) { ?> |
|
194 | + if (isset($this->banner_details['support_url'])) { ?> |
|
195 | 195 | |
196 | 196 | <a href="<?php echo $this->banner_details['support_url'] ?>" target="_blank"> |
197 | - <span class="dashicons dashicons-sos"></span><?php esc_html_e( 'Get Support', 'give' ); ?> |
|
197 | + <span class="dashicons dashicons-sos"></span><?php esc_html_e('Get Support', 'give'); ?> |
|
198 | 198 | </a> |
199 | 199 | |
200 | 200 | <?php } ?> |
@@ -221,13 +221,13 @@ discard block |
||
221 | 221 | * If user clicks to ignore the notice, add that to their user meta the banner then checks whether this tag exists already or not. |
222 | 222 | * See here: http://codex.wordpress.org/Function_Reference/add_user_meta |
223 | 223 | */ |
224 | - if ( isset( $_GET[ $this->nag_meta_key ] ) && '0' == $_GET[ $this->nag_meta_key ] ) { |
|
224 | + if (isset($_GET[$this->nag_meta_key]) && '0' == $_GET[$this->nag_meta_key]) { |
|
225 | 225 | |
226 | 226 | //Get the global user |
227 | 227 | $current_user = wp_get_current_user(); |
228 | 228 | $user_id = $current_user->ID; |
229 | 229 | |
230 | - add_user_meta( $user_id, $this->nag_meta_key, 'true', true ); |
|
230 | + add_user_meta($user_id, $this->nag_meta_key, 'true', true); |
|
231 | 231 | } |
232 | 232 | } |
233 | 233 |
@@ -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 | |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | */ |
24 | 24 | function give_get_country() { |
25 | 25 | $give_options = give_get_settings(); |
26 | - $country = isset( $give_options['base_country'] ) ? $give_options['base_country'] : 'US'; |
|
26 | + $country = isset($give_options['base_country']) ? $give_options['base_country'] : 'US'; |
|
27 | 27 | |
28 | - return apply_filters( 'give_give_country', $country ); |
|
28 | + return apply_filters('give_give_country', $country); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | */ |
37 | 37 | function give_get_state() { |
38 | 38 | $give_options = give_get_settings(); |
39 | - $state = isset( $give_options['base_state'] ) ? $give_options['base_state'] : false; |
|
39 | + $state = isset($give_options['base_state']) ? $give_options['base_state'] : false; |
|
40 | 40 | |
41 | - return apply_filters( 'give_give_state', $state ); |
|
41 | + return apply_filters('give_give_state', $state); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -50,13 +50,13 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @return mixed|void A list of states for the shop's base country |
52 | 52 | */ |
53 | -function give_get_states( $country = null ) { |
|
53 | +function give_get_states($country = null) { |
|
54 | 54 | |
55 | - if ( empty( $country ) ) { |
|
55 | + if (empty($country)) { |
|
56 | 56 | $country = give_get_country(); |
57 | 57 | } |
58 | 58 | |
59 | - switch ( $country ) : |
|
59 | + switch ($country) : |
|
60 | 60 | |
61 | 61 | case 'US' : |
62 | 62 | $states = give_get_states_list(); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | endswitch; |
108 | 108 | |
109 | - return apply_filters( 'give_give_states', $states ); |
|
109 | + return apply_filters('give_give_states', $states); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | |
@@ -119,253 +119,253 @@ discard block |
||
119 | 119 | function give_get_country_list() { |
120 | 120 | $countries = array( |
121 | 121 | '' => '', |
122 | - 'US' => esc_html__( 'United States', 'give' ), |
|
123 | - 'CA' => esc_html__( 'Canada', 'give' ), |
|
124 | - 'GB' => esc_html__( 'United Kingdom', 'give' ), |
|
125 | - 'AF' => esc_html__( 'Afghanistan', 'give' ), |
|
126 | - 'AL' => esc_html__( 'Albania', 'give' ), |
|
127 | - 'DZ' => esc_html__( 'Algeria', 'give' ), |
|
128 | - 'AS' => esc_html__( 'American Samoa', 'give' ), |
|
129 | - 'AD' => esc_html__( 'Andorra', 'give' ), |
|
130 | - 'AO' => esc_html__( 'Angola', 'give' ), |
|
131 | - 'AI' => esc_html__( 'Anguilla', 'give' ), |
|
132 | - 'AQ' => esc_html__( 'Antarctica', 'give' ), |
|
133 | - 'AG' => esc_html__( 'Antigua and Barbuda', 'give' ), |
|
134 | - 'AR' => esc_html__( 'Argentina', 'give' ), |
|
135 | - 'AM' => esc_html__( 'Armenia', 'give' ), |
|
136 | - 'AW' => esc_html__( 'Aruba', 'give' ), |
|
137 | - 'AU' => esc_html__( 'Australia', 'give' ), |
|
138 | - 'AT' => esc_html__( 'Austria', 'give' ), |
|
139 | - 'AZ' => esc_html__( 'Azerbaijan', 'give' ), |
|
140 | - 'BS' => esc_html__( 'Bahamas', 'give'), |
|
141 | - 'BH' => esc_html__( 'Bahrain', 'give' ), |
|
142 | - 'BD' => esc_html__( 'Bangladesh', 'give' ), |
|
143 | - 'BB' => esc_html__( 'Barbados', 'give' ), |
|
144 | - 'BY' => esc_html__( 'Belarus', 'give' ), |
|
145 | - 'BE' => esc_html__( 'Belgium', 'give' ), |
|
146 | - 'BZ' => esc_html__( 'Belize', 'give' ), |
|
147 | - 'BJ' => esc_html__( 'Benin', 'give' ), |
|
148 | - 'BM' => esc_html__( 'Bermuda', 'give' ), |
|
149 | - 'BT' => esc_html__( 'Bhutan', 'give' ), |
|
150 | - 'BO' => esc_html__( 'Bolivia', 'give' ), |
|
151 | - 'BA' => esc_html__( 'Bosnia and Herzegovina', 'give' ), |
|
152 | - 'BW' => esc_html__( 'Botswana', 'give' ), |
|
153 | - 'BV' => esc_html__( 'Bouvet Island', 'give' ), |
|
154 | - 'BR' => esc_html__( 'Brazil', 'give' ), |
|
155 | - 'IO' => esc_html__( 'British Indian Ocean Territory', 'give' ), |
|
156 | - 'BN' => esc_html__( 'Brunei Darrussalam', 'give' ), |
|
157 | - 'BG' => esc_html__( 'Bulgaria', 'give' ), |
|
158 | - 'BF' => esc_html__( 'Burkina Faso', 'give' ), |
|
159 | - 'BI' => esc_html__( 'Burundi', 'give' ), |
|
160 | - 'KH' => esc_html__( 'Cambodia', 'give' ), |
|
161 | - 'CM' => esc_html__( 'Cameroon', 'give' ), |
|
162 | - 'CV' => esc_html__( 'Cape Verde', 'give' ), |
|
163 | - 'KY' => esc_html__( 'Cayman Islands', 'give' ), |
|
164 | - 'CF' => esc_html__( 'Central African Republic', 'give' ), |
|
165 | - 'TD' => esc_html__( 'Chad', 'give' ), |
|
166 | - 'CL' => esc_html__( 'Chile', 'give' ), |
|
167 | - 'CN' => esc_html__( 'China', 'give' ), |
|
168 | - 'CX' => esc_html__( 'Christmas Island', 'give' ), |
|
169 | - 'CC' => esc_html__( 'Cocos Islands', 'give' ), |
|
170 | - 'CO' => esc_html__( 'Colombia', 'give' ), |
|
171 | - 'KM' => esc_html__( 'Comoros', 'give' ), |
|
172 | - 'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ), |
|
173 | - 'CG' => esc_html__( 'Congo, Republic of', 'give' ), |
|
174 | - 'CK' => esc_html__( 'Cook Islands', 'give' ), |
|
175 | - 'CR' => esc_html__( 'Costa Rica', 'give' ), |
|
176 | - 'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ), |
|
177 | - 'HR' => esc_html__( 'Croatia/Hrvatska', 'give' ), |
|
178 | - 'CU' => esc_html__( 'Cuba', 'give' ), |
|
179 | - 'CY' => esc_html__( 'Cyprus Island', 'give' ), |
|
180 | - 'CZ' => esc_html__( 'Czech Republic', 'give' ), |
|
181 | - 'DK' => esc_html__( 'Denmark', 'give' ), |
|
182 | - 'DJ' => esc_html__( 'Djibouti', 'give' ), |
|
183 | - 'DM' => esc_html__( 'Dominica', 'give' ), |
|
184 | - 'DO' => esc_html__( 'Dominican Republic', 'give' ), |
|
185 | - 'TP' => esc_html__( 'East Timor', 'give' ), |
|
186 | - 'EC' => esc_html__( 'Ecuador', 'give' ), |
|
187 | - 'EG' => esc_html__( 'Egypt', 'give' ), |
|
188 | - 'GQ' => esc_html__( 'Equatorial Guinea', 'give' ), |
|
189 | - 'SV' => esc_html__( 'El Salvador', 'give' ), |
|
190 | - 'ER' => esc_html__( 'Eritrea', 'give' ), |
|
191 | - 'EE' => esc_html__( 'Estonia', 'give' ), |
|
192 | - 'ET' => esc_html__( 'Ethiopia', 'give' ), |
|
193 | - 'FK' => esc_html__( 'Falkland Islands', 'give' ), |
|
194 | - 'FO' => esc_html__( 'Faroe Islands', 'give' ), |
|
195 | - 'FJ' => esc_html__( 'Fiji', 'give' ), |
|
196 | - 'FI' => esc_html__( 'Finland', 'give' ), |
|
197 | - 'FR' => esc_html__( 'France', 'give' ), |
|
198 | - 'GF' => esc_html__( 'French Guiana', 'give' ), |
|
199 | - 'PF' => esc_html__( 'French Polynesia', 'give' ), |
|
200 | - 'TF' => esc_html__( 'French Southern Territories', 'give' ), |
|
201 | - 'GA' => esc_html__( 'Gabon', 'give' ), |
|
202 | - 'GM' => esc_html__( 'Gambia', 'give' ), |
|
203 | - 'GE' => esc_html__( 'Georgia', 'give' ), |
|
204 | - 'DE' => esc_html__( 'Germany', 'give' ), |
|
205 | - 'GR' => esc_html__( 'Greece', 'give' ), |
|
206 | - 'GH' => esc_html__( 'Ghana', 'give' ), |
|
207 | - 'GI' => esc_html__( 'Gibraltar', 'give' ), |
|
208 | - 'GL' => esc_html__( 'Greenland', 'give' ), |
|
209 | - 'GD' => esc_html__( 'Grenada', 'give' ), |
|
210 | - 'GP' => esc_html__( 'Guadeloupe', 'give' ), |
|
211 | - 'GU' => esc_html__( 'Guam', 'give' ), |
|
212 | - 'GT' => esc_html__( 'Guatemala', 'give' ), |
|
213 | - 'GG' => esc_html__( 'Guernsey', 'give' ), |
|
214 | - 'GN' => esc_html__( 'Guinea', 'give' ), |
|
215 | - 'GW' => esc_html__( 'Guinea-Bissau', 'give' ), |
|
216 | - 'GY' => esc_html__( 'Guyana', 'give' ), |
|
217 | - 'HT' => esc_html__( 'Haiti', 'give' ), |
|
218 | - 'HM' => esc_html__( 'Heard and McDonald Islands', 'give' ), |
|
219 | - 'VA' => esc_html__( 'Holy See (City Vatican State)', 'give' ), |
|
220 | - 'HN' => esc_html__( 'Honduras', 'give' ), |
|
221 | - 'HK' => esc_html__( 'Hong Kong', 'give' ), |
|
222 | - 'HU' => esc_html__( 'Hungary', 'give' ), |
|
223 | - 'IS' => esc_html__( 'Iceland', 'give' ), |
|
224 | - 'IN' => esc_html__( 'India', 'give' ), |
|
225 | - 'ID' => esc_html__( 'Indonesia', 'give' ), |
|
226 | - 'IR' => esc_html__( 'Iran', 'give' ), |
|
227 | - 'IQ' => esc_html__( 'Iraq', 'give' ), |
|
228 | - 'IE' => esc_html__( 'Ireland', 'give' ), |
|
229 | - 'IM' => esc_html__( 'Isle of Man', 'give' ), |
|
230 | - 'IL' => esc_html__( 'Israel', 'give' ), |
|
231 | - 'IT' => esc_html__( 'Italy', 'give' ), |
|
232 | - 'JM' => esc_html__( 'Jamaica', 'give' ), |
|
233 | - 'JP' => esc_html__( 'Japan', 'give' ), |
|
234 | - 'JE' => esc_html__( 'Jersey', 'give' ), |
|
235 | - 'JO' => esc_html__( 'Jordan', 'give' ), |
|
236 | - 'KZ' => esc_html__( 'Kazakhstan', 'give' ), |
|
237 | - 'KE' => esc_html__( 'Kenya', 'give' ), |
|
238 | - 'KI' => esc_html__( 'Kiribati', 'give' ), |
|
239 | - 'KW' => esc_html__( 'Kuwait', 'give' ), |
|
240 | - 'KG' => esc_html__( 'Kyrgyzstan', 'give' ), |
|
241 | - 'LA' => esc_html__( 'Lao People\'s Democratic Republic', 'give' ), |
|
242 | - 'LV' => esc_html__( 'Latvia', 'give' ), |
|
243 | - 'LB' => esc_html__( 'Lebanon', 'give' ), |
|
244 | - 'LS' => esc_html__( 'Lesotho', 'give' ), |
|
245 | - 'LR' => esc_html__( 'Liberia', 'give' ), |
|
246 | - 'LY' => esc_html__( 'Libyan Arab Jamahiriya', 'give' ), |
|
247 | - 'LI' => esc_html__( 'Liechtenstein', 'give' ), |
|
248 | - 'LT' => esc_html__( 'Lithuania', 'give' ), |
|
249 | - 'LU' => esc_html__( 'Luxembourg', 'give' ), |
|
250 | - 'MO' => esc_html__( 'Macau', 'give' ), |
|
251 | - 'MK' => esc_html__( 'Macedonia', 'give' ), |
|
252 | - 'MG' => esc_html__( 'Madagascar', 'give' ), |
|
253 | - 'MW' => esc_html__( 'Malawi', 'give' ), |
|
254 | - 'MY' => esc_html__( 'Malaysia', 'give' ), |
|
255 | - 'MV' => esc_html__( 'Maldives', 'give' ), |
|
256 | - 'ML' => esc_html__( 'Mali', 'give' ), |
|
257 | - 'MT' => esc_html__( 'Malta', 'give' ), |
|
258 | - 'MH' => esc_html__( 'Marshall Islands', 'give' ), |
|
259 | - 'MQ' => esc_html__( 'Martinique', 'give' ), |
|
260 | - 'MR' => esc_html__( 'Mauritania', 'give' ), |
|
261 | - 'MU' => esc_html__( 'Mauritius', 'give' ), |
|
262 | - 'YT' => esc_html__( 'Mayotte', 'give' ), |
|
263 | - 'MX' => esc_html__( 'Mexico', 'give' ), |
|
264 | - 'FM' => esc_html__( 'Micronesia', 'give' ), |
|
265 | - 'MD' => esc_html__( 'Moldova, Republic of', 'give' ), |
|
266 | - 'MC' => esc_html__( 'Monaco', 'give' ), |
|
267 | - 'MN' => esc_html__( 'Mongolia', 'give' ), |
|
268 | - 'ME' => esc_html__( 'Montenegro', 'give' ), |
|
269 | - 'MS' => esc_html__( 'Montserrat', 'give' ), |
|
270 | - 'MA' => esc_html__( 'Morocco', 'give' ), |
|
271 | - 'MZ' => esc_html__( 'Mozambique', 'give' ), |
|
272 | - 'MM' => esc_html__( 'Myanmar', 'give' ), |
|
273 | - 'NA' => esc_html__( 'Namibia', 'give' ), |
|
274 | - 'NR' => esc_html__( 'Nauru', 'give' ), |
|
275 | - 'NP' => esc_html__( 'Nepal', 'give' ), |
|
276 | - 'NL' => esc_html__( 'Netherlands', 'give' ), |
|
277 | - 'AN' => esc_html__( 'Netherlands Antilles', 'give' ), |
|
278 | - 'NC' => esc_html__( 'New Caledonia', 'give' ), |
|
279 | - 'NZ' => esc_html__( 'New Zealand', 'give' ), |
|
280 | - 'NI' => esc_html__( 'Nicaragua', 'give' ), |
|
281 | - 'NE' => esc_html__( 'Niger', 'give' ), |
|
282 | - 'NG' => esc_html__( 'Nigeria', 'give' ), |
|
283 | - 'NU' => esc_html__( 'Niue', 'give' ), |
|
284 | - 'NF' => esc_html__( 'Norfolk Island', 'give' ), |
|
285 | - 'KP' => esc_html__( 'North Korea', 'give' ), |
|
286 | - 'MP' => esc_html__( 'Northern Mariana Islands', 'give' ), |
|
287 | - 'NO' => esc_html__( 'Norway', 'give' ), |
|
288 | - 'OM' => esc_html__( 'Oman', 'give' ), |
|
289 | - 'PK' => esc_html__( 'Pakistan', 'give' ), |
|
290 | - 'PW' => esc_html__( 'Palau', 'give' ), |
|
291 | - 'PS' => esc_html__( 'Palestinian Territories', 'give' ), |
|
292 | - 'PA' => esc_html__( 'Panama', 'give' ), |
|
293 | - 'PG' => esc_html__( 'Papua New Guinea', 'give' ), |
|
294 | - 'PY' => esc_html__( 'Paraguay', 'give' ), |
|
295 | - 'PE' => esc_html__( 'Peru', 'give' ), |
|
296 | - 'PH' => esc_html__( 'Phillipines', 'give' ), |
|
297 | - 'PN' => esc_html__( 'Pitcairn Island', 'give' ), |
|
298 | - 'PL' => esc_html__( 'Poland', 'give' ), |
|
299 | - 'PT' => esc_html__( 'Portugal', 'give' ), |
|
300 | - 'PR' => esc_html__( 'Puerto Rico', 'give' ), |
|
301 | - 'QA' => esc_html__( 'Qatar', 'give' ), |
|
302 | - 'RE' => esc_html__( 'Reunion Island', 'give' ), |
|
303 | - 'RO' => esc_html__( 'Romania', 'give' ), |
|
304 | - 'RU' => esc_html__( 'Russian Federation', 'give' ), |
|
305 | - 'RW' => esc_html__( 'Rwanda', 'give' ), |
|
306 | - 'SH' => esc_html__( 'Saint Helena', 'give' ), |
|
307 | - 'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ), |
|
308 | - 'LC' => esc_html__( 'Saint Lucia', 'give' ), |
|
309 | - 'PM' => esc_html__( 'Saint Pierre and Miquelon', 'give' ), |
|
310 | - 'VC' => esc_html__( 'Saint Vincent and the Grenadines', 'give' ), |
|
311 | - 'SM' => esc_html__( 'San Marino', 'give' ), |
|
312 | - 'ST' => esc_html__( 'Sao Tome and Principe', 'give' ), |
|
313 | - 'SA' => esc_html__( 'Saudi Arabia', 'give' ), |
|
314 | - 'SN' => esc_html__( 'Senegal', 'give' ), |
|
315 | - 'RS' => esc_html__( 'Serbia', 'give' ), |
|
316 | - 'SC' => esc_html__( 'Seychelles', 'give' ), |
|
317 | - 'SL' => esc_html__( 'Sierra Leone', 'give' ), |
|
318 | - 'SG' => esc_html__( 'Singapore', 'give' ), |
|
319 | - 'SK' => esc_html__( 'Slovak Republic', 'give' ), |
|
320 | - 'SI' => esc_html__( 'Slovenia', 'give' ), |
|
321 | - 'SB' => esc_html__( 'Solomon Islands', 'give' ), |
|
322 | - 'SO' => esc_html__( 'Somalia', 'give' ), |
|
323 | - 'ZA' => esc_html__( 'South Africa', 'give' ), |
|
324 | - 'GS' => esc_html__( 'South Georgia', 'give' ), |
|
325 | - 'KR' => esc_html__( 'South Korea', 'give' ), |
|
326 | - 'ES' => esc_html__( 'Spain', 'give' ), |
|
327 | - 'LK' => esc_html__( 'Sri Lanka', 'give' ), |
|
328 | - 'SD' => esc_html__( 'Sudan', 'give' ), |
|
329 | - 'SR' => esc_html__( 'Suriname', 'give' ), |
|
330 | - 'SJ' => esc_html__( 'Svalbard and Jan Mayen Islands', 'give' ), |
|
331 | - 'SZ' => esc_html__( 'Swaziland', 'give' ), |
|
332 | - 'SE' => esc_html__( 'Sweden', 'give' ), |
|
333 | - 'CH' => esc_html__( 'Switzerland', 'give' ), |
|
334 | - 'SY' => esc_html__( 'Syrian Arab Republic', 'give' ), |
|
335 | - 'TW' => esc_html__( 'Taiwan', 'give' ), |
|
336 | - 'TJ' => esc_html__( 'Tajikistan', 'give' ), |
|
337 | - 'TZ' => esc_html__( 'Tanzania', 'give' ), |
|
338 | - 'TG' => esc_html__( 'Togo', 'give' ), |
|
339 | - 'TK' => esc_html__( 'Tokelau', 'give' ), |
|
340 | - 'TO' => esc_html__( 'Tonga', 'give' ), |
|
341 | - 'TH' => esc_html__( 'Thailand', 'give' ), |
|
342 | - 'TT' => esc_html__( 'Trinidad and Tobago', 'give' ), |
|
343 | - 'TN' => esc_html__( 'Tunisia', 'give' ), |
|
344 | - 'TR' => esc_html__( 'Turkey', 'give' ), |
|
345 | - 'TM' => esc_html__( 'Turkmenistan', 'give' ), |
|
346 | - 'TC' => esc_html__( 'Turks and Caicos Islands', 'give' ), |
|
347 | - 'TV' => esc_html__( 'Tuvalu', 'give' ), |
|
348 | - 'UG' => esc_html__( 'Uganda', 'give' ), |
|
349 | - 'UA' => esc_html__( 'Ukraine', 'give' ), |
|
350 | - 'AE' => esc_html__( 'United Arab Emirates', 'give' ), |
|
351 | - 'UY' => esc_html__( 'Uruguay', 'give' ), |
|
352 | - 'UM' => esc_html__( 'US Minor Outlying Islands', 'give' ), |
|
353 | - 'UZ' => esc_html__( 'Uzbekistan', 'give' ), |
|
354 | - 'VU' => esc_html__( 'Vanuatu', 'give' ), |
|
355 | - 'VE' => esc_html__( 'Venezuela', 'give' ), |
|
356 | - 'VN' => esc_html__( 'Vietnam', 'give' ), |
|
357 | - 'VG' => esc_html__( 'Virgin Islands (British)', 'give' ), |
|
358 | - 'VI' => esc_html__( 'Virgin Islands (USA)', 'give' ), |
|
359 | - 'WF' => esc_html__( 'Wallis and Futuna Islands', 'give' ), |
|
360 | - 'EH' => esc_html__( 'Western Sahara', 'give' ), |
|
361 | - 'WS' => esc_html__( 'Western Samoa', 'give' ), |
|
362 | - 'YE' => esc_html__( 'Yemen', 'give' ), |
|
363 | - 'YU' => esc_html__( 'Yugoslavia', 'give' ), |
|
364 | - 'ZM' => esc_html__( 'Zambia', 'give' ), |
|
365 | - 'ZW' => esc_html__( 'Zimbabwe', 'give' ) |
|
122 | + 'US' => esc_html__('United States', 'give'), |
|
123 | + 'CA' => esc_html__('Canada', 'give'), |
|
124 | + 'GB' => esc_html__('United Kingdom', 'give'), |
|
125 | + 'AF' => esc_html__('Afghanistan', 'give'), |
|
126 | + 'AL' => esc_html__('Albania', 'give'), |
|
127 | + 'DZ' => esc_html__('Algeria', 'give'), |
|
128 | + 'AS' => esc_html__('American Samoa', 'give'), |
|
129 | + 'AD' => esc_html__('Andorra', 'give'), |
|
130 | + 'AO' => esc_html__('Angola', 'give'), |
|
131 | + 'AI' => esc_html__('Anguilla', 'give'), |
|
132 | + 'AQ' => esc_html__('Antarctica', 'give'), |
|
133 | + 'AG' => esc_html__('Antigua and Barbuda', 'give'), |
|
134 | + 'AR' => esc_html__('Argentina', 'give'), |
|
135 | + 'AM' => esc_html__('Armenia', 'give'), |
|
136 | + 'AW' => esc_html__('Aruba', 'give'), |
|
137 | + 'AU' => esc_html__('Australia', 'give'), |
|
138 | + 'AT' => esc_html__('Austria', 'give'), |
|
139 | + 'AZ' => esc_html__('Azerbaijan', 'give'), |
|
140 | + 'BS' => esc_html__('Bahamas', 'give'), |
|
141 | + 'BH' => esc_html__('Bahrain', 'give'), |
|
142 | + 'BD' => esc_html__('Bangladesh', 'give'), |
|
143 | + 'BB' => esc_html__('Barbados', 'give'), |
|
144 | + 'BY' => esc_html__('Belarus', 'give'), |
|
145 | + 'BE' => esc_html__('Belgium', 'give'), |
|
146 | + 'BZ' => esc_html__('Belize', 'give'), |
|
147 | + 'BJ' => esc_html__('Benin', 'give'), |
|
148 | + 'BM' => esc_html__('Bermuda', 'give'), |
|
149 | + 'BT' => esc_html__('Bhutan', 'give'), |
|
150 | + 'BO' => esc_html__('Bolivia', 'give'), |
|
151 | + 'BA' => esc_html__('Bosnia and Herzegovina', 'give'), |
|
152 | + 'BW' => esc_html__('Botswana', 'give'), |
|
153 | + 'BV' => esc_html__('Bouvet Island', 'give'), |
|
154 | + 'BR' => esc_html__('Brazil', 'give'), |
|
155 | + 'IO' => esc_html__('British Indian Ocean Territory', 'give'), |
|
156 | + 'BN' => esc_html__('Brunei Darrussalam', 'give'), |
|
157 | + 'BG' => esc_html__('Bulgaria', 'give'), |
|
158 | + 'BF' => esc_html__('Burkina Faso', 'give'), |
|
159 | + 'BI' => esc_html__('Burundi', 'give'), |
|
160 | + 'KH' => esc_html__('Cambodia', 'give'), |
|
161 | + 'CM' => esc_html__('Cameroon', 'give'), |
|
162 | + 'CV' => esc_html__('Cape Verde', 'give'), |
|
163 | + 'KY' => esc_html__('Cayman Islands', 'give'), |
|
164 | + 'CF' => esc_html__('Central African Republic', 'give'), |
|
165 | + 'TD' => esc_html__('Chad', 'give'), |
|
166 | + 'CL' => esc_html__('Chile', 'give'), |
|
167 | + 'CN' => esc_html__('China', 'give'), |
|
168 | + 'CX' => esc_html__('Christmas Island', 'give'), |
|
169 | + 'CC' => esc_html__('Cocos Islands', 'give'), |
|
170 | + 'CO' => esc_html__('Colombia', 'give'), |
|
171 | + 'KM' => esc_html__('Comoros', 'give'), |
|
172 | + 'CD' => esc_html__('Congo, Democratic People\'s Republic', 'give'), |
|
173 | + 'CG' => esc_html__('Congo, Republic of', 'give'), |
|
174 | + 'CK' => esc_html__('Cook Islands', 'give'), |
|
175 | + 'CR' => esc_html__('Costa Rica', 'give'), |
|
176 | + 'CI' => esc_html__('Cote d\'Ivoire', 'give'), |
|
177 | + 'HR' => esc_html__('Croatia/Hrvatska', 'give'), |
|
178 | + 'CU' => esc_html__('Cuba', 'give'), |
|
179 | + 'CY' => esc_html__('Cyprus Island', 'give'), |
|
180 | + 'CZ' => esc_html__('Czech Republic', 'give'), |
|
181 | + 'DK' => esc_html__('Denmark', 'give'), |
|
182 | + 'DJ' => esc_html__('Djibouti', 'give'), |
|
183 | + 'DM' => esc_html__('Dominica', 'give'), |
|
184 | + 'DO' => esc_html__('Dominican Republic', 'give'), |
|
185 | + 'TP' => esc_html__('East Timor', 'give'), |
|
186 | + 'EC' => esc_html__('Ecuador', 'give'), |
|
187 | + 'EG' => esc_html__('Egypt', 'give'), |
|
188 | + 'GQ' => esc_html__('Equatorial Guinea', 'give'), |
|
189 | + 'SV' => esc_html__('El Salvador', 'give'), |
|
190 | + 'ER' => esc_html__('Eritrea', 'give'), |
|
191 | + 'EE' => esc_html__('Estonia', 'give'), |
|
192 | + 'ET' => esc_html__('Ethiopia', 'give'), |
|
193 | + 'FK' => esc_html__('Falkland Islands', 'give'), |
|
194 | + 'FO' => esc_html__('Faroe Islands', 'give'), |
|
195 | + 'FJ' => esc_html__('Fiji', 'give'), |
|
196 | + 'FI' => esc_html__('Finland', 'give'), |
|
197 | + 'FR' => esc_html__('France', 'give'), |
|
198 | + 'GF' => esc_html__('French Guiana', 'give'), |
|
199 | + 'PF' => esc_html__('French Polynesia', 'give'), |
|
200 | + 'TF' => esc_html__('French Southern Territories', 'give'), |
|
201 | + 'GA' => esc_html__('Gabon', 'give'), |
|
202 | + 'GM' => esc_html__('Gambia', 'give'), |
|
203 | + 'GE' => esc_html__('Georgia', 'give'), |
|
204 | + 'DE' => esc_html__('Germany', 'give'), |
|
205 | + 'GR' => esc_html__('Greece', 'give'), |
|
206 | + 'GH' => esc_html__('Ghana', 'give'), |
|
207 | + 'GI' => esc_html__('Gibraltar', 'give'), |
|
208 | + 'GL' => esc_html__('Greenland', 'give'), |
|
209 | + 'GD' => esc_html__('Grenada', 'give'), |
|
210 | + 'GP' => esc_html__('Guadeloupe', 'give'), |
|
211 | + 'GU' => esc_html__('Guam', 'give'), |
|
212 | + 'GT' => esc_html__('Guatemala', 'give'), |
|
213 | + 'GG' => esc_html__('Guernsey', 'give'), |
|
214 | + 'GN' => esc_html__('Guinea', 'give'), |
|
215 | + 'GW' => esc_html__('Guinea-Bissau', 'give'), |
|
216 | + 'GY' => esc_html__('Guyana', 'give'), |
|
217 | + 'HT' => esc_html__('Haiti', 'give'), |
|
218 | + 'HM' => esc_html__('Heard and McDonald Islands', 'give'), |
|
219 | + 'VA' => esc_html__('Holy See (City Vatican State)', 'give'), |
|
220 | + 'HN' => esc_html__('Honduras', 'give'), |
|
221 | + 'HK' => esc_html__('Hong Kong', 'give'), |
|
222 | + 'HU' => esc_html__('Hungary', 'give'), |
|
223 | + 'IS' => esc_html__('Iceland', 'give'), |
|
224 | + 'IN' => esc_html__('India', 'give'), |
|
225 | + 'ID' => esc_html__('Indonesia', 'give'), |
|
226 | + 'IR' => esc_html__('Iran', 'give'), |
|
227 | + 'IQ' => esc_html__('Iraq', 'give'), |
|
228 | + 'IE' => esc_html__('Ireland', 'give'), |
|
229 | + 'IM' => esc_html__('Isle of Man', 'give'), |
|
230 | + 'IL' => esc_html__('Israel', 'give'), |
|
231 | + 'IT' => esc_html__('Italy', 'give'), |
|
232 | + 'JM' => esc_html__('Jamaica', 'give'), |
|
233 | + 'JP' => esc_html__('Japan', 'give'), |
|
234 | + 'JE' => esc_html__('Jersey', 'give'), |
|
235 | + 'JO' => esc_html__('Jordan', 'give'), |
|
236 | + 'KZ' => esc_html__('Kazakhstan', 'give'), |
|
237 | + 'KE' => esc_html__('Kenya', 'give'), |
|
238 | + 'KI' => esc_html__('Kiribati', 'give'), |
|
239 | + 'KW' => esc_html__('Kuwait', 'give'), |
|
240 | + 'KG' => esc_html__('Kyrgyzstan', 'give'), |
|
241 | + 'LA' => esc_html__('Lao People\'s Democratic Republic', 'give'), |
|
242 | + 'LV' => esc_html__('Latvia', 'give'), |
|
243 | + 'LB' => esc_html__('Lebanon', 'give'), |
|
244 | + 'LS' => esc_html__('Lesotho', 'give'), |
|
245 | + 'LR' => esc_html__('Liberia', 'give'), |
|
246 | + 'LY' => esc_html__('Libyan Arab Jamahiriya', 'give'), |
|
247 | + 'LI' => esc_html__('Liechtenstein', 'give'), |
|
248 | + 'LT' => esc_html__('Lithuania', 'give'), |
|
249 | + 'LU' => esc_html__('Luxembourg', 'give'), |
|
250 | + 'MO' => esc_html__('Macau', 'give'), |
|
251 | + 'MK' => esc_html__('Macedonia', 'give'), |
|
252 | + 'MG' => esc_html__('Madagascar', 'give'), |
|
253 | + 'MW' => esc_html__('Malawi', 'give'), |
|
254 | + 'MY' => esc_html__('Malaysia', 'give'), |
|
255 | + 'MV' => esc_html__('Maldives', 'give'), |
|
256 | + 'ML' => esc_html__('Mali', 'give'), |
|
257 | + 'MT' => esc_html__('Malta', 'give'), |
|
258 | + 'MH' => esc_html__('Marshall Islands', 'give'), |
|
259 | + 'MQ' => esc_html__('Martinique', 'give'), |
|
260 | + 'MR' => esc_html__('Mauritania', 'give'), |
|
261 | + 'MU' => esc_html__('Mauritius', 'give'), |
|
262 | + 'YT' => esc_html__('Mayotte', 'give'), |
|
263 | + 'MX' => esc_html__('Mexico', 'give'), |
|
264 | + 'FM' => esc_html__('Micronesia', 'give'), |
|
265 | + 'MD' => esc_html__('Moldova, Republic of', 'give'), |
|
266 | + 'MC' => esc_html__('Monaco', 'give'), |
|
267 | + 'MN' => esc_html__('Mongolia', 'give'), |
|
268 | + 'ME' => esc_html__('Montenegro', 'give'), |
|
269 | + 'MS' => esc_html__('Montserrat', 'give'), |
|
270 | + 'MA' => esc_html__('Morocco', 'give'), |
|
271 | + 'MZ' => esc_html__('Mozambique', 'give'), |
|
272 | + 'MM' => esc_html__('Myanmar', 'give'), |
|
273 | + 'NA' => esc_html__('Namibia', 'give'), |
|
274 | + 'NR' => esc_html__('Nauru', 'give'), |
|
275 | + 'NP' => esc_html__('Nepal', 'give'), |
|
276 | + 'NL' => esc_html__('Netherlands', 'give'), |
|
277 | + 'AN' => esc_html__('Netherlands Antilles', 'give'), |
|
278 | + 'NC' => esc_html__('New Caledonia', 'give'), |
|
279 | + 'NZ' => esc_html__('New Zealand', 'give'), |
|
280 | + 'NI' => esc_html__('Nicaragua', 'give'), |
|
281 | + 'NE' => esc_html__('Niger', 'give'), |
|
282 | + 'NG' => esc_html__('Nigeria', 'give'), |
|
283 | + 'NU' => esc_html__('Niue', 'give'), |
|
284 | + 'NF' => esc_html__('Norfolk Island', 'give'), |
|
285 | + 'KP' => esc_html__('North Korea', 'give'), |
|
286 | + 'MP' => esc_html__('Northern Mariana Islands', 'give'), |
|
287 | + 'NO' => esc_html__('Norway', 'give'), |
|
288 | + 'OM' => esc_html__('Oman', 'give'), |
|
289 | + 'PK' => esc_html__('Pakistan', 'give'), |
|
290 | + 'PW' => esc_html__('Palau', 'give'), |
|
291 | + 'PS' => esc_html__('Palestinian Territories', 'give'), |
|
292 | + 'PA' => esc_html__('Panama', 'give'), |
|
293 | + 'PG' => esc_html__('Papua New Guinea', 'give'), |
|
294 | + 'PY' => esc_html__('Paraguay', 'give'), |
|
295 | + 'PE' => esc_html__('Peru', 'give'), |
|
296 | + 'PH' => esc_html__('Phillipines', 'give'), |
|
297 | + 'PN' => esc_html__('Pitcairn Island', 'give'), |
|
298 | + 'PL' => esc_html__('Poland', 'give'), |
|
299 | + 'PT' => esc_html__('Portugal', 'give'), |
|
300 | + 'PR' => esc_html__('Puerto Rico', 'give'), |
|
301 | + 'QA' => esc_html__('Qatar', 'give'), |
|
302 | + 'RE' => esc_html__('Reunion Island', 'give'), |
|
303 | + 'RO' => esc_html__('Romania', 'give'), |
|
304 | + 'RU' => esc_html__('Russian Federation', 'give'), |
|
305 | + 'RW' => esc_html__('Rwanda', 'give'), |
|
306 | + 'SH' => esc_html__('Saint Helena', 'give'), |
|
307 | + 'KN' => esc_html__('Saint Kitts and Nevis', 'give'), |
|
308 | + 'LC' => esc_html__('Saint Lucia', 'give'), |
|
309 | + 'PM' => esc_html__('Saint Pierre and Miquelon', 'give'), |
|
310 | + 'VC' => esc_html__('Saint Vincent and the Grenadines', 'give'), |
|
311 | + 'SM' => esc_html__('San Marino', 'give'), |
|
312 | + 'ST' => esc_html__('Sao Tome and Principe', 'give'), |
|
313 | + 'SA' => esc_html__('Saudi Arabia', 'give'), |
|
314 | + 'SN' => esc_html__('Senegal', 'give'), |
|
315 | + 'RS' => esc_html__('Serbia', 'give'), |
|
316 | + 'SC' => esc_html__('Seychelles', 'give'), |
|
317 | + 'SL' => esc_html__('Sierra Leone', 'give'), |
|
318 | + 'SG' => esc_html__('Singapore', 'give'), |
|
319 | + 'SK' => esc_html__('Slovak Republic', 'give'), |
|
320 | + 'SI' => esc_html__('Slovenia', 'give'), |
|
321 | + 'SB' => esc_html__('Solomon Islands', 'give'), |
|
322 | + 'SO' => esc_html__('Somalia', 'give'), |
|
323 | + 'ZA' => esc_html__('South Africa', 'give'), |
|
324 | + 'GS' => esc_html__('South Georgia', 'give'), |
|
325 | + 'KR' => esc_html__('South Korea', 'give'), |
|
326 | + 'ES' => esc_html__('Spain', 'give'), |
|
327 | + 'LK' => esc_html__('Sri Lanka', 'give'), |
|
328 | + 'SD' => esc_html__('Sudan', 'give'), |
|
329 | + 'SR' => esc_html__('Suriname', 'give'), |
|
330 | + 'SJ' => esc_html__('Svalbard and Jan Mayen Islands', 'give'), |
|
331 | + 'SZ' => esc_html__('Swaziland', 'give'), |
|
332 | + 'SE' => esc_html__('Sweden', 'give'), |
|
333 | + 'CH' => esc_html__('Switzerland', 'give'), |
|
334 | + 'SY' => esc_html__('Syrian Arab Republic', 'give'), |
|
335 | + 'TW' => esc_html__('Taiwan', 'give'), |
|
336 | + 'TJ' => esc_html__('Tajikistan', 'give'), |
|
337 | + 'TZ' => esc_html__('Tanzania', 'give'), |
|
338 | + 'TG' => esc_html__('Togo', 'give'), |
|
339 | + 'TK' => esc_html__('Tokelau', 'give'), |
|
340 | + 'TO' => esc_html__('Tonga', 'give'), |
|
341 | + 'TH' => esc_html__('Thailand', 'give'), |
|
342 | + 'TT' => esc_html__('Trinidad and Tobago', 'give'), |
|
343 | + 'TN' => esc_html__('Tunisia', 'give'), |
|
344 | + 'TR' => esc_html__('Turkey', 'give'), |
|
345 | + 'TM' => esc_html__('Turkmenistan', 'give'), |
|
346 | + 'TC' => esc_html__('Turks and Caicos Islands', 'give'), |
|
347 | + 'TV' => esc_html__('Tuvalu', 'give'), |
|
348 | + 'UG' => esc_html__('Uganda', 'give'), |
|
349 | + 'UA' => esc_html__('Ukraine', 'give'), |
|
350 | + 'AE' => esc_html__('United Arab Emirates', 'give'), |
|
351 | + 'UY' => esc_html__('Uruguay', 'give'), |
|
352 | + 'UM' => esc_html__('US Minor Outlying Islands', 'give'), |
|
353 | + 'UZ' => esc_html__('Uzbekistan', 'give'), |
|
354 | + 'VU' => esc_html__('Vanuatu', 'give'), |
|
355 | + 'VE' => esc_html__('Venezuela', 'give'), |
|
356 | + 'VN' => esc_html__('Vietnam', 'give'), |
|
357 | + 'VG' => esc_html__('Virgin Islands (British)', 'give'), |
|
358 | + 'VI' => esc_html__('Virgin Islands (USA)', 'give'), |
|
359 | + 'WF' => esc_html__('Wallis and Futuna Islands', 'give'), |
|
360 | + 'EH' => esc_html__('Western Sahara', 'give'), |
|
361 | + 'WS' => esc_html__('Western Samoa', 'give'), |
|
362 | + 'YE' => esc_html__('Yemen', 'give'), |
|
363 | + 'YU' => esc_html__('Yugoslavia', 'give'), |
|
364 | + 'ZM' => esc_html__('Zambia', 'give'), |
|
365 | + 'ZW' => esc_html__('Zimbabwe', 'give') |
|
366 | 366 | ); |
367 | 367 | |
368 | - return apply_filters( 'give_countries', $countries ); |
|
368 | + return apply_filters('give_countries', $countries); |
|
369 | 369 | } |
370 | 370 | |
371 | 371 | /** |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | 'AP' => 'Armed Forces - Pacific' |
447 | 447 | ); |
448 | 448 | |
449 | - return apply_filters( 'give_us_states', $states ); |
|
449 | + return apply_filters('give_us_states', $states); |
|
450 | 450 | } |
451 | 451 | |
452 | 452 | /** |
@@ -459,22 +459,22 @@ discard block |
||
459 | 459 | function give_get_provinces_list() { |
460 | 460 | $provinces = array( |
461 | 461 | '' => '', |
462 | - 'AB' => esc_html__('Alberta', 'give' ), |
|
463 | - 'BC' => esc_html__('British Columbia', 'give' ), |
|
464 | - 'MB' => esc_html__('Manitoba', 'give' ), |
|
465 | - 'NB' => esc_html__('New Brunswick', 'give' ), |
|
466 | - 'NL' => esc_html__('Newfoundland and Labrador', 'give' ), |
|
467 | - 'NS' => esc_html__('Nova Scotia', 'give' ), |
|
468 | - 'NT' => esc_html__('Northwest Territories', 'give' ), |
|
469 | - 'NU' => esc_html__('Nunavut', 'give' ), |
|
470 | - 'ON' => esc_html__('Ontario', 'give' ), |
|
471 | - 'PE' => esc_html__('Prince Edward Island', 'give' ), |
|
472 | - 'QC' => esc_html__('Quebec', 'give' ), |
|
473 | - 'SK' => esc_html__('Saskatchewan', 'give' ), |
|
474 | - 'YT' => esc_html__('Yukon', 'give' ) |
|
462 | + 'AB' => esc_html__('Alberta', 'give'), |
|
463 | + 'BC' => esc_html__('British Columbia', 'give'), |
|
464 | + 'MB' => esc_html__('Manitoba', 'give'), |
|
465 | + 'NB' => esc_html__('New Brunswick', 'give'), |
|
466 | + 'NL' => esc_html__('Newfoundland and Labrador', 'give'), |
|
467 | + 'NS' => esc_html__('Nova Scotia', 'give'), |
|
468 | + 'NT' => esc_html__('Northwest Territories', 'give'), |
|
469 | + 'NU' => esc_html__('Nunavut', 'give'), |
|
470 | + 'ON' => esc_html__('Ontario', 'give'), |
|
471 | + 'PE' => esc_html__('Prince Edward Island', 'give'), |
|
472 | + 'QC' => esc_html__('Quebec', 'give'), |
|
473 | + 'SK' => esc_html__('Saskatchewan', 'give'), |
|
474 | + 'YT' => esc_html__('Yukon', 'give') |
|
475 | 475 | ); |
476 | 476 | |
477 | - return apply_filters( 'give_canada_provinces', $provinces ); |
|
477 | + return apply_filters('give_canada_provinces', $provinces); |
|
478 | 478 | } |
479 | 479 | |
480 | 480 | /** |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | 'WA' => 'Western Australia' |
497 | 497 | ); |
498 | 498 | |
499 | - return apply_filters( 'give_australian_states', $states ); |
|
499 | + return apply_filters('give_australian_states', $states); |
|
500 | 500 | } |
501 | 501 | |
502 | 502 | /** |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | 'TO' => 'Tocantins' |
538 | 538 | ); |
539 | 539 | |
540 | - return apply_filters( 'give_brazil_states', $states ); |
|
540 | + return apply_filters('give_brazil_states', $states); |
|
541 | 541 | } |
542 | 542 | |
543 | 543 | /** |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | 'NEW TERRITORIES' => 'New Territories' |
555 | 555 | ); |
556 | 556 | |
557 | - return apply_filters( 'give_hong_kong_states', $states ); |
|
557 | + return apply_filters('give_hong_kong_states', $states); |
|
558 | 558 | } |
559 | 559 | |
560 | 560 | /** |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | 'ZA' => 'Zala' |
589 | 589 | ); |
590 | 590 | |
591 | - return apply_filters( 'give_hungary_states', $states ); |
|
591 | + return apply_filters('give_hungary_states', $states); |
|
592 | 592 | } |
593 | 593 | |
594 | 594 | /** |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | 'CN32' => 'Xinjiang / 新疆' |
635 | 635 | ); |
636 | 636 | |
637 | - return apply_filters( 'give_chinese_states', $states ); |
|
637 | + return apply_filters('give_chinese_states', $states); |
|
638 | 638 | } |
639 | 639 | |
640 | 640 | /** |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | 'WC' => 'West Coast' |
664 | 664 | ); |
665 | 665 | |
666 | - return apply_filters( 'give_new_zealand_states', $states ); |
|
666 | + return apply_filters('give_new_zealand_states', $states); |
|
667 | 667 | } |
668 | 668 | |
669 | 669 | /** |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | 'PB' => 'Papua Barat' |
712 | 712 | ); |
713 | 713 | |
714 | - return apply_filters( 'give_indonesia_states', $states ); |
|
714 | + return apply_filters('give_indonesia_states', $states); |
|
715 | 715 | } |
716 | 716 | |
717 | 717 | /** |
@@ -761,7 +761,7 @@ discard block |
||
761 | 761 | 'PY' => 'Pondicherry (Puducherry)' |
762 | 762 | ); |
763 | 763 | |
764 | - return apply_filters( 'give_indian_states', $states ); |
|
764 | + return apply_filters('give_indian_states', $states); |
|
765 | 765 | } |
766 | 766 | |
767 | 767 | /** |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | 'PJY' => 'W.P. Putrajaya' |
792 | 792 | ); |
793 | 793 | |
794 | - return apply_filters( 'give_malaysian_states', $states ); |
|
794 | + return apply_filters('give_malaysian_states', $states); |
|
795 | 795 | } |
796 | 796 | |
797 | 797 | /** |
@@ -814,7 +814,7 @@ discard block |
||
814 | 814 | 'WC' => 'Western Cape' |
815 | 815 | ); |
816 | 816 | |
817 | - return apply_filters( 'give_south_african_states', $states ); |
|
817 | + return apply_filters('give_south_african_states', $states); |
|
818 | 818 | } |
819 | 819 | |
820 | 820 | /** |
@@ -905,7 +905,7 @@ discard block |
||
905 | 905 | 'TH-35' => 'Yasothon (ยโสธร)' |
906 | 906 | ); |
907 | 907 | |
908 | - return apply_filters( 'give_thailand_states', $states ); |
|
908 | + return apply_filters('give_thailand_states', $states); |
|
909 | 909 | } |
910 | 910 | |
911 | 911 | /** |
@@ -917,59 +917,59 @@ discard block |
||
917 | 917 | function give_get_spain_states_list() { |
918 | 918 | $states = array( |
919 | 919 | '' => '', |
920 | - 'C' => esc_html__( 'A Coruña', 'give' ), |
|
921 | - 'VI' => esc_html__( 'Álava', 'give' ), |
|
922 | - 'AB' => esc_html__( 'Albacete', 'give' ), |
|
923 | - 'A' => esc_html__( 'Alicante', 'give' ), |
|
924 | - 'AL' => esc_html__( 'Almería', 'give' ), |
|
925 | - 'O' => esc_html__( 'Asturias', 'give' ), |
|
926 | - 'AV' => esc_html__( 'Ávila', 'give' ), |
|
927 | - 'BA' => esc_html__( 'Badajoz', 'give' ), |
|
928 | - 'PM' => esc_html__( 'Baleares', 'give' ), |
|
929 | - 'B' => esc_html__( 'Barcelona', 'give' ), |
|
930 | - 'BU' => esc_html__( 'Burgos', 'give' ), |
|
931 | - 'CC' => esc_html__( 'Cáceres', 'give' ), |
|
932 | - 'CA' => esc_html__( 'Cádiz', 'give' ), |
|
933 | - 'S' => esc_html__( 'Cantabria', 'give' ), |
|
934 | - 'CS' => esc_html__( 'Castellón', 'give' ), |
|
935 | - 'CE' => esc_html__( 'Ceuta', 'give' ), |
|
936 | - 'CR' => esc_html__( 'Ciudad Real', 'give' ), |
|
937 | - 'CO' => esc_html__( 'Córdoba', 'give' ), |
|
938 | - 'CU' => esc_html__( 'Cuenca', 'give' ), |
|
939 | - 'GI' => esc_html__( 'Girona', 'give' ), |
|
940 | - 'GR' => esc_html__( 'Granada', 'give' ), |
|
941 | - 'GU' => esc_html__( 'Guadalajara', 'give' ), |
|
942 | - 'SS' => esc_html__( 'Gipuzkoa', 'give' ), |
|
943 | - 'H' => esc_html__( 'Huelva', 'give' ), |
|
944 | - 'HU' => esc_html__( 'Huesca', 'give' ), |
|
945 | - 'J' => esc_html__( 'Jaén', 'give' ), |
|
946 | - 'LO' => esc_html__( 'La Rioja', 'give' ), |
|
947 | - 'GC' => esc_html__( 'Las Palmas', 'give' ), |
|
948 | - 'LE' => esc_html__( 'León', 'give' ), |
|
949 | - 'L' => esc_html__( 'Lleida', 'give' ), |
|
950 | - 'LU' => esc_html__( 'Lugo', 'give' ), |
|
951 | - 'M' => esc_html__( 'Madrid', 'give' ), |
|
952 | - 'MA' => esc_html__( 'Málaga', 'give' ), |
|
953 | - 'ML' => esc_html__( 'Melilla', 'give' ), |
|
954 | - 'MU' => esc_html__( 'Murcia', 'give' ), |
|
955 | - 'NA' => esc_html__( 'Navarra', 'give' ), |
|
956 | - 'OR' => esc_html__( 'Ourense', 'give' ), |
|
957 | - 'P' => esc_html__( 'Palencia', 'give' ), |
|
958 | - 'PO' => esc_html__( 'Pontevedra', 'give' ), |
|
959 | - 'SA' => esc_html__( 'Salamanca', 'give' ), |
|
960 | - 'TF' => esc_html__( 'Santa Cruz de Tenerife', 'give' ), |
|
961 | - 'SG' => esc_html__( 'Segovia', 'give' ), |
|
962 | - 'SE' => esc_html__( 'Sevilla', 'give' ), |
|
963 | - 'SO' => esc_html__( 'Soria', 'give' ), |
|
964 | - 'T' => esc_html__( 'Tarragona', 'give' ), |
|
965 | - 'TE' => esc_html__( 'Teruel', 'give' ), |
|
966 | - 'TO' => esc_html__( 'Toledo', 'give' ), |
|
967 | - 'V' => esc_html__( 'Valencia', 'give' ), |
|
968 | - 'VA' => esc_html__( 'Valladolid', 'give' ), |
|
969 | - 'BI' => esc_html__( 'Bizkaia', 'give' ), |
|
970 | - 'ZA' => esc_html__( 'Zamora', 'give' ), |
|
971 | - 'Z' => esc_html__( 'Zaragoza', 'give' ) |
|
920 | + 'C' => esc_html__('A Coruña', 'give'), |
|
921 | + 'VI' => esc_html__('Álava', 'give'), |
|
922 | + 'AB' => esc_html__('Albacete', 'give'), |
|
923 | + 'A' => esc_html__('Alicante', 'give'), |
|
924 | + 'AL' => esc_html__('Almería', 'give'), |
|
925 | + 'O' => esc_html__('Asturias', 'give'), |
|
926 | + 'AV' => esc_html__('Ávila', 'give'), |
|
927 | + 'BA' => esc_html__('Badajoz', 'give'), |
|
928 | + 'PM' => esc_html__('Baleares', 'give'), |
|
929 | + 'B' => esc_html__('Barcelona', 'give'), |
|
930 | + 'BU' => esc_html__('Burgos', 'give'), |
|
931 | + 'CC' => esc_html__('Cáceres', 'give'), |
|
932 | + 'CA' => esc_html__('Cádiz', 'give'), |
|
933 | + 'S' => esc_html__('Cantabria', 'give'), |
|
934 | + 'CS' => esc_html__('Castellón', 'give'), |
|
935 | + 'CE' => esc_html__('Ceuta', 'give'), |
|
936 | + 'CR' => esc_html__('Ciudad Real', 'give'), |
|
937 | + 'CO' => esc_html__('Córdoba', 'give'), |
|
938 | + 'CU' => esc_html__('Cuenca', 'give'), |
|
939 | + 'GI' => esc_html__('Girona', 'give'), |
|
940 | + 'GR' => esc_html__('Granada', 'give'), |
|
941 | + 'GU' => esc_html__('Guadalajara', 'give'), |
|
942 | + 'SS' => esc_html__('Gipuzkoa', 'give'), |
|
943 | + 'H' => esc_html__('Huelva', 'give'), |
|
944 | + 'HU' => esc_html__('Huesca', 'give'), |
|
945 | + 'J' => esc_html__('Jaén', 'give'), |
|
946 | + 'LO' => esc_html__('La Rioja', 'give'), |
|
947 | + 'GC' => esc_html__('Las Palmas', 'give'), |
|
948 | + 'LE' => esc_html__('León', 'give'), |
|
949 | + 'L' => esc_html__('Lleida', 'give'), |
|
950 | + 'LU' => esc_html__('Lugo', 'give'), |
|
951 | + 'M' => esc_html__('Madrid', 'give'), |
|
952 | + 'MA' => esc_html__('Málaga', 'give'), |
|
953 | + 'ML' => esc_html__('Melilla', 'give'), |
|
954 | + 'MU' => esc_html__('Murcia', 'give'), |
|
955 | + 'NA' => esc_html__('Navarra', 'give'), |
|
956 | + 'OR' => esc_html__('Ourense', 'give'), |
|
957 | + 'P' => esc_html__('Palencia', 'give'), |
|
958 | + 'PO' => esc_html__('Pontevedra', 'give'), |
|
959 | + 'SA' => esc_html__('Salamanca', 'give'), |
|
960 | + 'TF' => esc_html__('Santa Cruz de Tenerife', 'give'), |
|
961 | + 'SG' => esc_html__('Segovia', 'give'), |
|
962 | + 'SE' => esc_html__('Sevilla', 'give'), |
|
963 | + 'SO' => esc_html__('Soria', 'give'), |
|
964 | + 'T' => esc_html__('Tarragona', 'give'), |
|
965 | + 'TE' => esc_html__('Teruel', 'give'), |
|
966 | + 'TO' => esc_html__('Toledo', 'give'), |
|
967 | + 'V' => esc_html__('Valencia', 'give'), |
|
968 | + 'VA' => esc_html__('Valladolid', 'give'), |
|
969 | + 'BI' => esc_html__('Bizkaia', 'give'), |
|
970 | + 'ZA' => esc_html__('Zamora', 'give'), |
|
971 | + 'Z' => esc_html__('Zaragoza', 'give') |
|
972 | 972 | ); |
973 | 973 | |
974 | - return apply_filters( 'give_spain_states', $states ); |
|
974 | + return apply_filters('give_spain_states', $states); |
|
975 | 975 | } |
@@ -4,8 +4,8 @@ discard block |
||
4 | 4 | */ |
5 | 5 | $give_map_deprecated_actions = give_deprecated_actions(); |
6 | 6 | |
7 | -foreach ( $give_map_deprecated_actions as $new => $old ) { |
|
8 | - add_action( $new, 'give_deprecated_action_mapping', 10, 4 ); |
|
7 | +foreach ($give_map_deprecated_actions as $new => $old) { |
|
8 | + add_action($new, 'give_deprecated_action_mapping', 10, 4); |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | /** |
@@ -59,20 +59,20 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return mixed|void |
61 | 61 | */ |
62 | -function give_deprecated_action_mapping( $data, $arg_1 = '', $arg_2 = '', $arg_3 = '' ) { |
|
62 | +function give_deprecated_action_mapping($data, $arg_1 = '', $arg_2 = '', $arg_3 = '') { |
|
63 | 63 | $give_map_deprecated_actions = give_deprecated_actions(); |
64 | 64 | $action = current_filter(); |
65 | 65 | |
66 | - if ( isset( $give_map_deprecated_actions[ $action ] ) ) { |
|
67 | - if ( has_action( $give_map_deprecated_actions[ $action ] ) ) { |
|
68 | - do_action( $give_map_deprecated_actions[ $action ], $data, $arg_1, $arg_2, $arg_3 ); |
|
66 | + if (isset($give_map_deprecated_actions[$action])) { |
|
67 | + if (has_action($give_map_deprecated_actions[$action])) { |
|
68 | + do_action($give_map_deprecated_actions[$action], $data, $arg_1, $arg_2, $arg_3); |
|
69 | 69 | |
70 | - if ( ! defined( 'DOING_AJAX' ) ) { |
|
70 | + if ( ! defined('DOING_AJAX')) { |
|
71 | 71 | // translators: %s: action name. |
72 | 72 | _give_deprecated_function( |
73 | 73 | sprintf( |
74 | - __( 'The %s action' ), |
|
75 | - $give_map_deprecated_actions[ $action ] |
|
74 | + __('The %s action'), |
|
75 | + $give_map_deprecated_actions[$action] |
|
76 | 76 | ), |
77 | 77 | '1.7', |
78 | 78 | $action |
@@ -4,8 +4,8 @@ discard block |
||
4 | 4 | */ |
5 | 5 | $give_map_deprecated_filters = give_deprecated_filters(); |
6 | 6 | |
7 | -foreach ( $give_map_deprecated_filters as $new => $old ) { |
|
8 | - add_filter( $new, 'give_deprecated_filter_mapping', 10, 4 ); |
|
7 | +foreach ($give_map_deprecated_filters as $new => $old) { |
|
8 | + add_filter($new, 'give_deprecated_filter_mapping', 10, 4); |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | /** |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | ); |
29 | 29 | |
30 | 30 | // Dynamic filters. |
31 | - switch ( true ) { |
|
32 | - case ( ! empty( $_GET['payment-confirmation'] ) ) : |
|
31 | + switch (true) { |
|
32 | + case ( ! empty($_GET['payment-confirmation'])) : |
|
33 | 33 | $give_deprecated_filters["give_donation_confirm_{$_GET['payment-confirmation']}"] = "give_payment_confirm_{$_GET['payment-confirmation']}"; |
34 | 34 | } |
35 | 35 | |
@@ -46,20 +46,20 @@ discard block |
||
46 | 46 | * |
47 | 47 | * @return mixed|void |
48 | 48 | */ |
49 | -function give_deprecated_filter_mapping( $data, $arg_1 = '', $arg_2 = '', $arg_3 = '' ) { |
|
49 | +function give_deprecated_filter_mapping($data, $arg_1 = '', $arg_2 = '', $arg_3 = '') { |
|
50 | 50 | $give_map_deprecated_filters = give_deprecated_filters(); |
51 | 51 | $filter = current_filter(); |
52 | 52 | |
53 | - if ( isset( $give_map_deprecated_filters[ $filter ] ) ) { |
|
54 | - if ( has_filter( $give_map_deprecated_filters[ $filter ] ) ) { |
|
55 | - $data = apply_filters( $give_map_deprecated_filters[ $filter ], $data, $arg_1, $arg_2, $arg_3 ); |
|
53 | + if (isset($give_map_deprecated_filters[$filter])) { |
|
54 | + if (has_filter($give_map_deprecated_filters[$filter])) { |
|
55 | + $data = apply_filters($give_map_deprecated_filters[$filter], $data, $arg_1, $arg_2, $arg_3); |
|
56 | 56 | |
57 | - if ( ! defined( 'DOING_AJAX' ) ) { |
|
57 | + if ( ! defined('DOING_AJAX')) { |
|
58 | 58 | _give_deprecated_function( |
59 | 59 | sprintf( |
60 | 60 | /* translators: %s: filter name */ |
61 | - __( 'The %s filter' ), |
|
62 | - $give_map_deprecated_filters[ $filter ] |
|
61 | + __('The %s filter'), |
|
62 | + $give_map_deprecated_filters[$filter] |
|
63 | 63 | ), |
64 | 64 | '1.7', |
65 | 65 | $filter |