@@ -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 | |
@@ -18,30 +18,30 @@ discard block |
||
18 | 18 | ?> |
19 | 19 | <div class="wrap" id="poststuff"> |
20 | 20 | <div id="give-updates"> |
21 | - <h1 id="give-updates-h1"><?php esc_html_e( 'Give - Updates', 'give' ); ?></h1> |
|
21 | + <h1 id="give-updates-h1"><?php esc_html_e('Give - Updates', 'give'); ?></h1> |
|
22 | 22 | <div class="give-update-panel-content"> |
23 | - <p><?php printf( __( 'Give regularly receives new features, bug fixes, and enhancements. It is important to always stay up-to-date with latest version of Give core and its add-ons. Please create a backup of your site before updating. To update add-ons be sure your <a href="%1$s">license keys</a> are activated.', 'give' ), 'https://givewp.com/my-account/' ); ?></p> |
|
23 | + <p><?php printf(__('Give regularly receives new features, bug fixes, and enhancements. It is important to always stay up-to-date with latest version of Give core and its add-ons. Please create a backup of your site before updating. To update add-ons be sure your <a href="%1$s">license keys</a> are activated.', 'give'), 'https://givewp.com/my-account/'); ?></p> |
|
24 | 24 | </div> |
25 | 25 | |
26 | 26 | <?php $update_counter = 1; ?> |
27 | 27 | |
28 | 28 | <?php $db_updates = $give_updates->get_db_update_count(); ?> |
29 | - <?php if ( ! empty( $db_updates ) ) : ?> |
|
30 | - <?php $db_update_url = add_query_arg( array( |
|
29 | + <?php if ( ! empty($db_updates)) : ?> |
|
30 | + <?php $db_update_url = add_query_arg(array( |
|
31 | 31 | 'type' => 'database', |
32 | - ) ); ?> |
|
32 | + )); ?> |
|
33 | 33 | <div id="give-db-updates"> |
34 | 34 | <div class="postbox-container"> |
35 | 35 | <div class="postbox"> |
36 | - <h2 class="hndle"><?php _e( 'Database Updates', 'give' ); ?></h2> |
|
36 | + <h2 class="hndle"><?php _e('Database Updates', 'give'); ?></h2> |
|
37 | 37 | <div class="inside"> |
38 | 38 | <div class="panel-content"> |
39 | - <p><?php echo sprintf( __( 'Give needs to update the database. <a href="%s">Update now ></a>', 'give' ), $db_update_url ); ?></p> |
|
39 | + <p><?php echo sprintf(__('Give needs to update the database. <a href="%s">Update now ></a>', 'give'), $db_update_url); ?></p> |
|
40 | 40 | </div> |
41 | 41 | <div class="progress-container give-hidden"> |
42 | 42 | <p class="update-message" data-update-count="<?php echo $db_updates; ?>" |
43 | 43 | data-resume-update="<?php echo $give_updates->resume_updates(); ?>"> |
44 | - <strong><?php echo sprintf( __( 'Update 1 of %s', 'give' ), $db_updates ); ?></strong></p> |
|
44 | + <strong><?php echo sprintf(__('Update 1 of %s', 'give'), $db_updates); ?></strong></p> |
|
45 | 45 | <div class="progress-content"></div> |
46 | 46 | </div> |
47 | 47 | </div> |
@@ -52,17 +52,17 @@ discard block |
||
52 | 52 | <?php endif; ?> |
53 | 53 | |
54 | 54 | <?php $plugin_updates = $give_updates->get_plugin_update_count(); ?> |
55 | - <?php if ( ! empty( $plugin_updates ) ) : ?> |
|
56 | - <?php $plugin_update_url = add_query_arg( array( |
|
55 | + <?php if ( ! empty($plugin_updates)) : ?> |
|
56 | + <?php $plugin_update_url = add_query_arg(array( |
|
57 | 57 | 's' => 'Give', |
58 | - ), admin_url( '/plugins.php' ) ); ?> |
|
58 | + ), admin_url('/plugins.php')); ?> |
|
59 | 59 | <div id="give-plugin-updates"> |
60 | 60 | <div class="postbox-container"> |
61 | 61 | <div class="postbox"> |
62 | - <h2 class="hndle"><?php _e( 'Add-on Updates', 'give' ); ?></h2> |
|
62 | + <h2 class="hndle"><?php _e('Add-on Updates', 'give'); ?></h2> |
|
63 | 63 | <div class="inside"> |
64 | 64 | <div class="panel-content"> |
65 | - <p><?php echo sprintf( __( 'There are %1$s Give %2$s that need to be updated. <a href="%3$s">Update now ></a>', 'give' ), $plugin_updates, _n( 'add-on', 'add-ons', $plugin_updates, 'give' ), $plugin_update_url ); ?></p> |
|
65 | + <p><?php echo sprintf(__('There are %1$s Give %2$s that need to be updated. <a href="%3$s">Update now ></a>', 'give'), $plugin_updates, _n('add-on', 'add-ons', $plugin_updates, 'give'), $plugin_update_url); ?></p> |
|
66 | 66 | <?php include_once 'plugins-update-section.php'; ?> |
67 | 67 | </div> |
68 | 68 | </div> |
@@ -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 | |
@@ -93,19 +93,19 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function get_predefined_dates() { |
95 | 95 | $predefined = array( |
96 | - 'today' => esc_html__( 'Today', 'give' ), |
|
97 | - 'yesterday' => esc_html__( 'Yesterday', 'give' ), |
|
98 | - 'this_week' => esc_html__( 'This Week', 'give' ), |
|
99 | - 'last_week' => esc_html__( 'Last Week', 'give' ), |
|
100 | - 'this_month' => esc_html__( 'This Month', 'give' ), |
|
101 | - 'last_month' => esc_html__( 'Last Month', 'give' ), |
|
102 | - 'this_quarter' => esc_html__( 'This Quarter', 'give' ), |
|
103 | - 'last_quarter' => esc_html__( 'Last Quarter', 'give' ), |
|
104 | - 'this_year' => esc_html__( 'This Year', 'give' ), |
|
105 | - 'last_year' => esc_html__( 'Last Year', 'give' ) |
|
96 | + 'today' => esc_html__('Today', 'give'), |
|
97 | + 'yesterday' => esc_html__('Yesterday', 'give'), |
|
98 | + 'this_week' => esc_html__('This Week', 'give'), |
|
99 | + 'last_week' => esc_html__('Last Week', 'give'), |
|
100 | + 'this_month' => esc_html__('This Month', 'give'), |
|
101 | + 'last_month' => esc_html__('Last Month', 'give'), |
|
102 | + 'this_quarter' => esc_html__('This Quarter', 'give'), |
|
103 | + 'last_quarter' => esc_html__('Last Quarter', 'give'), |
|
104 | + 'this_year' => esc_html__('This Year', 'give'), |
|
105 | + 'last_year' => esc_html__('Last Year', 'give') |
|
106 | 106 | ); |
107 | 107 | |
108 | - return apply_filters( 'give_stats_predefined_dates', $predefined ); |
|
108 | + return apply_filters('give_stats_predefined_dates', $predefined); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
@@ -121,18 +121,18 @@ discard block |
||
121 | 121 | * |
122 | 122 | * @return void |
123 | 123 | */ |
124 | - public function setup_dates( $_start_date = 'this_month', $_end_date = false ) { |
|
124 | + public function setup_dates($_start_date = 'this_month', $_end_date = false) { |
|
125 | 125 | |
126 | - if ( empty( $_start_date ) ) { |
|
126 | + if (empty($_start_date)) { |
|
127 | 127 | $_start_date = 'this_month'; |
128 | 128 | } |
129 | 129 | |
130 | - if ( empty( $_end_date ) ) { |
|
130 | + if (empty($_end_date)) { |
|
131 | 131 | $_end_date = $_start_date; |
132 | 132 | } |
133 | 133 | |
134 | - $this->start_date = $this->convert_date( $_start_date ); |
|
135 | - $this->end_date = $this->convert_date( $_end_date, true ); |
|
134 | + $this->start_date = $this->convert_date($_start_date); |
|
135 | + $this->end_date = $this->convert_date($_end_date, true); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
@@ -148,26 +148,26 @@ discard block |
||
148 | 148 | * |
149 | 149 | * @return array|WP_Error If the date is invalid, a WP_Error object will be returned. |
150 | 150 | */ |
151 | - public function convert_date( $date, $end_date = false ) { |
|
151 | + public function convert_date($date, $end_date = false) { |
|
152 | 152 | |
153 | 153 | $this->timestamp = false; |
154 | 154 | $second = $end_date ? 59 : 0; |
155 | 155 | $minute = $end_date ? 59 : 0; |
156 | 156 | $hour = $end_date ? 23 : 0; |
157 | 157 | $day = 1; |
158 | - $month = date( 'n', current_time( 'timestamp' ) ); |
|
159 | - $year = date( 'Y', current_time( 'timestamp' ) ); |
|
158 | + $month = date('n', current_time('timestamp')); |
|
159 | + $year = date('Y', current_time('timestamp')); |
|
160 | 160 | |
161 | - if ( array_key_exists( (string) $date, $this->get_predefined_dates() ) ) { |
|
161 | + if (array_key_exists((string) $date, $this->get_predefined_dates())) { |
|
162 | 162 | |
163 | 163 | // This is a predefined date rate, such as last_week |
164 | - switch ( $date ) { |
|
164 | + switch ($date) { |
|
165 | 165 | |
166 | 166 | case 'this_month' : |
167 | 167 | |
168 | - if ( $end_date ) { |
|
168 | + if ($end_date) { |
|
169 | 169 | |
170 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
170 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
171 | 171 | $hour = 23; |
172 | 172 | $minute = 59; |
173 | 173 | $second = 59; |
@@ -177,28 +177,28 @@ discard block |
||
177 | 177 | |
178 | 178 | case 'last_month' : |
179 | 179 | |
180 | - if ( $month == 1 ) { |
|
180 | + if ($month == 1) { |
|
181 | 181 | |
182 | 182 | $month = 12; |
183 | - $year --; |
|
183 | + $year--; |
|
184 | 184 | |
185 | 185 | } else { |
186 | 186 | |
187 | - $month --; |
|
187 | + $month--; |
|
188 | 188 | |
189 | 189 | } |
190 | 190 | |
191 | - if ( $end_date ) { |
|
192 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
191 | + if ($end_date) { |
|
192 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | break; |
196 | 196 | |
197 | 197 | case 'today' : |
198 | 198 | |
199 | - $day = date( 'd', current_time( 'timestamp' ) ); |
|
199 | + $day = date('d', current_time('timestamp')); |
|
200 | 200 | |
201 | - if ( $end_date ) { |
|
201 | + if ($end_date) { |
|
202 | 202 | $hour = 23; |
203 | 203 | $minute = 59; |
204 | 204 | $second = 59; |
@@ -208,23 +208,23 @@ discard block |
||
208 | 208 | |
209 | 209 | case 'yesterday' : |
210 | 210 | |
211 | - $day = date( 'd', current_time( 'timestamp' ) ) - 1; |
|
211 | + $day = date('d', current_time('timestamp')) - 1; |
|
212 | 212 | |
213 | 213 | // Check if Today is the first day of the month (meaning subtracting one will get us 0) |
214 | - if ( $day < 1 ) { |
|
214 | + if ($day < 1) { |
|
215 | 215 | |
216 | 216 | // If current month is 1 |
217 | - if ( 1 == $month ) { |
|
217 | + if (1 == $month) { |
|
218 | 218 | |
219 | 219 | $year -= 1; // Today is January 1, so skip back to last day of December |
220 | 220 | $month = 12; |
221 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
221 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
222 | 222 | |
223 | 223 | } else { |
224 | 224 | |
225 | 225 | // Go back one month and get the last day of the month |
226 | 226 | $month -= 1; |
227 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
227 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
228 | 228 | |
229 | 229 | } |
230 | 230 | } |
@@ -233,12 +233,12 @@ discard block |
||
233 | 233 | |
234 | 234 | case 'this_week' : |
235 | 235 | |
236 | - $days_to_week_start = ( date( 'w', current_time( 'timestamp' ) ) - 1 ) * 60 * 60 * 24; |
|
237 | - $today = date( 'd', current_time( 'timestamp' ) ) * 60 * 60 * 24; |
|
236 | + $days_to_week_start = (date('w', current_time('timestamp')) - 1) * 60 * 60 * 24; |
|
237 | + $today = date('d', current_time('timestamp')) * 60 * 60 * 24; |
|
238 | 238 | |
239 | - if ( $today < $days_to_week_start ) { |
|
239 | + if ($today < $days_to_week_start) { |
|
240 | 240 | |
241 | - if ( $month > 1 ) { |
|
241 | + if ($month > 1) { |
|
242 | 242 | $month -= 1; |
243 | 243 | } else { |
244 | 244 | $month = 12; |
@@ -246,19 +246,19 @@ discard block |
||
246 | 246 | |
247 | 247 | } |
248 | 248 | |
249 | - if ( ! $end_date ) { |
|
249 | + if ( ! $end_date) { |
|
250 | 250 | |
251 | 251 | // Getting the start day |
252 | 252 | |
253 | - $day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 1; |
|
254 | - $day += get_option( 'start_of_week' ); |
|
253 | + $day = date('d', current_time('timestamp') - $days_to_week_start) - 1; |
|
254 | + $day += get_option('start_of_week'); |
|
255 | 255 | |
256 | 256 | } else { |
257 | 257 | |
258 | 258 | // Getting the end day |
259 | 259 | |
260 | - $day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 1; |
|
261 | - $day += get_option( 'start_of_week' ) + 6; |
|
260 | + $day = date('d', current_time('timestamp') - $days_to_week_start) - 1; |
|
261 | + $day += get_option('start_of_week') + 6; |
|
262 | 262 | |
263 | 263 | } |
264 | 264 | |
@@ -266,12 +266,12 @@ discard block |
||
266 | 266 | |
267 | 267 | case 'last_week' : |
268 | 268 | |
269 | - $days_to_week_start = ( date( 'w', current_time( 'timestamp' ) ) - 1 ) * 60 * 60 * 24; |
|
270 | - $today = date( 'd', current_time( 'timestamp' ) ) * 60 * 60 * 24; |
|
269 | + $days_to_week_start = (date('w', current_time('timestamp')) - 1) * 60 * 60 * 24; |
|
270 | + $today = date('d', current_time('timestamp')) * 60 * 60 * 24; |
|
271 | 271 | |
272 | - if ( $today < $days_to_week_start ) { |
|
272 | + if ($today < $days_to_week_start) { |
|
273 | 273 | |
274 | - if ( $month > 1 ) { |
|
274 | + if ($month > 1) { |
|
275 | 275 | $month -= 1; |
276 | 276 | } else { |
277 | 277 | $month = 12; |
@@ -279,19 +279,19 @@ discard block |
||
279 | 279 | |
280 | 280 | } |
281 | 281 | |
282 | - if ( ! $end_date ) { |
|
282 | + if ( ! $end_date) { |
|
283 | 283 | |
284 | 284 | // Getting the start day |
285 | 285 | |
286 | - $day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 8; |
|
287 | - $day += get_option( 'start_of_week' ); |
|
286 | + $day = date('d', current_time('timestamp') - $days_to_week_start) - 8; |
|
287 | + $day += get_option('start_of_week'); |
|
288 | 288 | |
289 | 289 | } else { |
290 | 290 | |
291 | 291 | // Getting the end day |
292 | 292 | |
293 | - $day = date( 'd', current_time( 'timestamp' ) - $days_to_week_start ) - 8; |
|
294 | - $day += get_option( 'start_of_week' ) + 6; |
|
293 | + $day = date('d', current_time('timestamp') - $days_to_week_start) - 8; |
|
294 | + $day += get_option('start_of_week') + 6; |
|
295 | 295 | |
296 | 296 | } |
297 | 297 | |
@@ -299,39 +299,39 @@ discard block |
||
299 | 299 | |
300 | 300 | case 'this_quarter' : |
301 | 301 | |
302 | - $month_now = date( 'n', current_time( 'timestamp' ) ); |
|
302 | + $month_now = date('n', current_time('timestamp')); |
|
303 | 303 | |
304 | - if ( $month_now <= 3 ) { |
|
304 | + if ($month_now <= 3) { |
|
305 | 305 | |
306 | - if ( ! $end_date ) { |
|
306 | + if ( ! $end_date) { |
|
307 | 307 | $month = 1; |
308 | 308 | } else { |
309 | 309 | $month = 3; |
310 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
310 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
311 | 311 | $hour = 23; |
312 | 312 | $minute = 59; |
313 | 313 | $second = 59; |
314 | 314 | } |
315 | 315 | |
316 | - } else if ( $month_now <= 6 ) { |
|
316 | + } else if ($month_now <= 6) { |
|
317 | 317 | |
318 | - if ( ! $end_date ) { |
|
318 | + if ( ! $end_date) { |
|
319 | 319 | $month = 4; |
320 | 320 | } else { |
321 | 321 | $month = 6; |
322 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
322 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
323 | 323 | $hour = 23; |
324 | 324 | $minute = 59; |
325 | 325 | $second = 59; |
326 | 326 | } |
327 | 327 | |
328 | - } else if ( $month_now <= 9 ) { |
|
328 | + } else if ($month_now <= 9) { |
|
329 | 329 | |
330 | - if ( ! $end_date ) { |
|
330 | + if ( ! $end_date) { |
|
331 | 331 | $month = 7; |
332 | 332 | } else { |
333 | 333 | $month = 9; |
334 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
334 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
335 | 335 | $hour = 23; |
336 | 336 | $minute = 59; |
337 | 337 | $second = 59; |
@@ -339,11 +339,11 @@ discard block |
||
339 | 339 | |
340 | 340 | } else { |
341 | 341 | |
342 | - if ( ! $end_date ) { |
|
342 | + if ( ! $end_date) { |
|
343 | 343 | $month = 10; |
344 | 344 | } else { |
345 | 345 | $month = 12; |
346 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
346 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
347 | 347 | $hour = 23; |
348 | 348 | $minute = 59; |
349 | 349 | $second = 59; |
@@ -355,40 +355,40 @@ discard block |
||
355 | 355 | |
356 | 356 | case 'last_quarter' : |
357 | 357 | |
358 | - $month_now = date( 'n', current_time( 'timestamp' ) ); |
|
358 | + $month_now = date('n', current_time('timestamp')); |
|
359 | 359 | |
360 | - if ( $month_now <= 3 ) { |
|
360 | + if ($month_now <= 3) { |
|
361 | 361 | |
362 | - if ( ! $end_date ) { |
|
362 | + if ( ! $end_date) { |
|
363 | 363 | $month = 10; |
364 | 364 | } else { |
365 | 365 | $year -= 1; |
366 | 366 | $month = 12; |
367 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
367 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
368 | 368 | $hour = 23; |
369 | 369 | $minute = 59; |
370 | 370 | $second = 59; |
371 | 371 | } |
372 | 372 | |
373 | - } else if ( $month_now <= 6 ) { |
|
373 | + } else if ($month_now <= 6) { |
|
374 | 374 | |
375 | - if ( ! $end_date ) { |
|
375 | + if ( ! $end_date) { |
|
376 | 376 | $month = 1; |
377 | 377 | } else { |
378 | 378 | $month = 3; |
379 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
379 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
380 | 380 | $hour = 23; |
381 | 381 | $minute = 59; |
382 | 382 | $second = 59; |
383 | 383 | } |
384 | 384 | |
385 | - } else if ( $month_now <= 9 ) { |
|
385 | + } else if ($month_now <= 9) { |
|
386 | 386 | |
387 | - if ( ! $end_date ) { |
|
387 | + if ( ! $end_date) { |
|
388 | 388 | $month = 4; |
389 | 389 | } else { |
390 | 390 | $month = 6; |
391 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
391 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
392 | 392 | $hour = 23; |
393 | 393 | $minute = 59; |
394 | 394 | $second = 59; |
@@ -396,11 +396,11 @@ discard block |
||
396 | 396 | |
397 | 397 | } else { |
398 | 398 | |
399 | - if ( ! $end_date ) { |
|
399 | + if ( ! $end_date) { |
|
400 | 400 | $month = 7; |
401 | 401 | } else { |
402 | 402 | $month = 9; |
403 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
403 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
404 | 404 | $hour = 23; |
405 | 405 | $minute = 59; |
406 | 406 | $second = 59; |
@@ -412,11 +412,11 @@ discard block |
||
412 | 412 | |
413 | 413 | case 'this_year' : |
414 | 414 | |
415 | - if ( ! $end_date ) { |
|
415 | + if ( ! $end_date) { |
|
416 | 416 | $month = 1; |
417 | 417 | } else { |
418 | 418 | $month = 12; |
419 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
419 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
420 | 420 | $hour = 23; |
421 | 421 | $minute = 59; |
422 | 422 | $second = 59; |
@@ -427,11 +427,11 @@ discard block |
||
427 | 427 | case 'last_year' : |
428 | 428 | |
429 | 429 | $year -= 1; |
430 | - if ( ! $end_date ) { |
|
430 | + if ( ! $end_date) { |
|
431 | 431 | $month = 1; |
432 | 432 | } else { |
433 | 433 | $month = 12; |
434 | - $day = cal_days_in_month( CAL_GREGORIAN, $month, $year ); |
|
434 | + $day = cal_days_in_month(CAL_GREGORIAN, $month, $year); |
|
435 | 435 | $hour = 23; |
436 | 436 | $minute = 59; |
437 | 437 | $second = 59; |
@@ -442,30 +442,30 @@ discard block |
||
442 | 442 | } |
443 | 443 | |
444 | 444 | |
445 | - } else if ( is_numeric( $date ) ) { |
|
445 | + } else if (is_numeric($date)) { |
|
446 | 446 | |
447 | 447 | // return $date unchanged since it is a timestamp |
448 | 448 | $this->timestamp = true; |
449 | 449 | |
450 | - } else if ( false !== strtotime( $date ) ) { |
|
450 | + } else if (false !== strtotime($date)) { |
|
451 | 451 | |
452 | - $date = strtotime( $date, current_time( 'timestamp' ) ); |
|
453 | - $year = date( 'Y', $date ); |
|
454 | - $month = date( 'm', $date ); |
|
455 | - $day = date( 'd', $date ); |
|
452 | + $date = strtotime($date, current_time('timestamp')); |
|
453 | + $year = date('Y', $date); |
|
454 | + $month = date('m', $date); |
|
455 | + $day = date('d', $date); |
|
456 | 456 | |
457 | 457 | } else { |
458 | 458 | |
459 | - return new WP_Error( 'invalid_date', esc_html__( 'Improper date provided.', 'give' ) ); |
|
459 | + return new WP_Error('invalid_date', esc_html__('Improper date provided.', 'give')); |
|
460 | 460 | |
461 | 461 | } |
462 | 462 | |
463 | - if ( false === $this->timestamp ) { |
|
463 | + if (false === $this->timestamp) { |
|
464 | 464 | // Create an exact timestamp |
465 | - $date = mktime( $hour, $minute, $second, $month, $day, $year ); |
|
465 | + $date = mktime($hour, $minute, $second, $month, $day, $year); |
|
466 | 466 | } |
467 | 467 | |
468 | - return apply_filters( 'give_stats_date', $date, $end_date, $this ); |
|
468 | + return apply_filters('give_stats_date', $date, $end_date, $this); |
|
469 | 469 | |
470 | 470 | } |
471 | 471 | |
@@ -481,33 +481,33 @@ discard block |
||
481 | 481 | * |
482 | 482 | * @return string |
483 | 483 | */ |
484 | - public function count_where( $where = '' ) { |
|
484 | + public function count_where($where = '') { |
|
485 | 485 | // Only get payments in our date range |
486 | 486 | |
487 | 487 | $start_where = ''; |
488 | 488 | $end_where = ''; |
489 | 489 | |
490 | - if ( $this->start_date ) { |
|
490 | + if ($this->start_date) { |
|
491 | 491 | |
492 | - if ( $this->timestamp ) { |
|
492 | + if ($this->timestamp) { |
|
493 | 493 | $format = 'Y-m-d H:i:s'; |
494 | 494 | } else { |
495 | 495 | $format = 'Y-m-d 00:00:00'; |
496 | 496 | } |
497 | 497 | |
498 | - $start_date = date( $format, $this->start_date ); |
|
498 | + $start_date = date($format, $this->start_date); |
|
499 | 499 | $start_where = " AND p.post_date >= '{$start_date}'"; |
500 | 500 | } |
501 | 501 | |
502 | - if ( $this->end_date ) { |
|
502 | + if ($this->end_date) { |
|
503 | 503 | |
504 | - if ( $this->timestamp ) { |
|
504 | + if ($this->timestamp) { |
|
505 | 505 | $format = 'Y-m-d H:i:s'; |
506 | 506 | } else { |
507 | 507 | $format = 'Y-m-d 23:59:59'; |
508 | 508 | } |
509 | 509 | |
510 | - $end_date = date( $format, $this->end_date ); |
|
510 | + $end_date = date($format, $this->end_date); |
|
511 | 511 | |
512 | 512 | $end_where = " AND p.post_date <= '{$end_date}'"; |
513 | 513 | } |
@@ -529,34 +529,34 @@ discard block |
||
529 | 529 | * |
530 | 530 | * @return string |
531 | 531 | */ |
532 | - public function payments_where( $where = '' ) { |
|
532 | + public function payments_where($where = '') { |
|
533 | 533 | |
534 | 534 | global $wpdb; |
535 | 535 | |
536 | 536 | $start_where = ''; |
537 | 537 | $end_where = ''; |
538 | 538 | |
539 | - if ( ! is_wp_error( $this->start_date ) ) { |
|
539 | + if ( ! is_wp_error($this->start_date)) { |
|
540 | 540 | |
541 | - if ( $this->timestamp ) { |
|
541 | + if ($this->timestamp) { |
|
542 | 542 | $format = 'Y-m-d H:i:s'; |
543 | 543 | } else { |
544 | 544 | $format = 'Y-m-d 00:00:00'; |
545 | 545 | } |
546 | 546 | |
547 | - $start_date = date( $format, $this->start_date ); |
|
547 | + $start_date = date($format, $this->start_date); |
|
548 | 548 | $start_where = " AND $wpdb->posts.post_date >= '{$start_date}'"; |
549 | 549 | } |
550 | 550 | |
551 | - if ( ! is_wp_error( $this->end_date ) ) { |
|
551 | + if ( ! is_wp_error($this->end_date)) { |
|
552 | 552 | |
553 | - if ( $this->timestamp ) { |
|
553 | + if ($this->timestamp) { |
|
554 | 554 | $format = 'Y-m-d H:i:s'; |
555 | 555 | } else { |
556 | 556 | $format = 'Y-m-d 23:59:59'; |
557 | 557 | } |
558 | 558 | |
559 | - $end_date = date( $format, $this->end_date ); |
|
559 | + $end_date = date($format, $this->end_date); |
|
560 | 560 | |
561 | 561 | $end_where = " AND $wpdb->posts.post_date <= '{$end_date}'"; |
562 | 562 | } |
@@ -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 | |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | */ |
23 | 23 | function give_get_country() { |
24 | 24 | $give_options = give_get_settings(); |
25 | - $country = isset( $give_options['base_country'] ) ? $give_options['base_country'] : 'US'; |
|
25 | + $country = isset($give_options['base_country']) ? $give_options['base_country'] : 'US'; |
|
26 | 26 | |
27 | - return apply_filters( 'give_give_country', $country ); |
|
27 | + return apply_filters('give_give_country', $country); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | */ |
36 | 36 | function give_get_state() { |
37 | 37 | $give_options = give_get_settings(); |
38 | - $state = isset( $give_options['base_state'] ) ? $give_options['base_state'] : false; |
|
38 | + $state = isset($give_options['base_state']) ? $give_options['base_state'] : false; |
|
39 | 39 | |
40 | - return apply_filters( 'give_give_state', $state ); |
|
40 | + return apply_filters('give_give_state', $state); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | * |
50 | 50 | * @return mixed A list of states for the site's base country. |
51 | 51 | */ |
52 | -function give_get_states( $country = null ) { |
|
52 | +function give_get_states($country = null) { |
|
53 | 53 | // If Country have no states return empty array. |
54 | 54 | $states = array(); |
55 | 55 | |
56 | 56 | // Check if Country Code is empty or not. |
57 | - if ( empty( $country ) ) { |
|
57 | + if (empty($country)) { |
|
58 | 58 | // Get defalut country code that is being set by the admin. |
59 | 59 | $country = give_get_country(); |
60 | 60 | } |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | $states_list = give_states_list(); |
64 | 64 | |
65 | 65 | // Check if $country code exists in the array key. |
66 | - if ( array_key_exists( $country, $states_list ) ) { |
|
67 | - $states = $states_list[ $country ]; |
|
66 | + if (array_key_exists($country, $states_list)) { |
|
67 | + $states = $states_list[$country]; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * |
73 | 73 | * @param string $query Database count query |
74 | 74 | */ |
75 | - return (array) apply_filters( 'give_give_states', $states ); |
|
75 | + return (array) apply_filters('give_give_states', $states); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -84,253 +84,253 @@ discard block |
||
84 | 84 | function give_get_country_list() { |
85 | 85 | $countries = array( |
86 | 86 | '' => '', |
87 | - 'US' => esc_html__( 'United States', 'give' ), |
|
88 | - 'CA' => esc_html__( 'Canada', 'give' ), |
|
89 | - 'GB' => esc_html__( 'United Kingdom', 'give' ), |
|
90 | - 'AF' => esc_html__( 'Afghanistan', 'give' ), |
|
91 | - 'AL' => esc_html__( 'Albania', 'give' ), |
|
92 | - 'DZ' => esc_html__( 'Algeria', 'give' ), |
|
93 | - 'AS' => esc_html__( 'American Samoa', 'give' ), |
|
94 | - 'AD' => esc_html__( 'Andorra', 'give' ), |
|
95 | - 'AO' => esc_html__( 'Angola', 'give' ), |
|
96 | - 'AI' => esc_html__( 'Anguilla', 'give' ), |
|
97 | - 'AQ' => esc_html__( 'Antarctica', 'give' ), |
|
98 | - 'AG' => esc_html__( 'Antigua and Barbuda', 'give' ), |
|
99 | - 'AR' => esc_html__( 'Argentina', 'give' ), |
|
100 | - 'AM' => esc_html__( 'Armenia', 'give' ), |
|
101 | - 'AW' => esc_html__( 'Aruba', 'give' ), |
|
102 | - 'AU' => esc_html__( 'Australia', 'give' ), |
|
103 | - 'AT' => esc_html__( 'Austria', 'give' ), |
|
104 | - 'AZ' => esc_html__( 'Azerbaijan', 'give' ), |
|
105 | - 'BS' => esc_html__( 'Bahamas', 'give' ), |
|
106 | - 'BH' => esc_html__( 'Bahrain', 'give' ), |
|
107 | - 'BD' => esc_html__( 'Bangladesh', 'give' ), |
|
108 | - 'BB' => esc_html__( 'Barbados', 'give' ), |
|
109 | - 'BY' => esc_html__( 'Belarus', 'give' ), |
|
110 | - 'BE' => esc_html__( 'Belgium', 'give' ), |
|
111 | - 'BZ' => esc_html__( 'Belize', 'give' ), |
|
112 | - 'BJ' => esc_html__( 'Benin', 'give' ), |
|
113 | - 'BM' => esc_html__( 'Bermuda', 'give' ), |
|
114 | - 'BT' => esc_html__( 'Bhutan', 'give' ), |
|
115 | - 'BO' => esc_html__( 'Bolivia', 'give' ), |
|
116 | - 'BA' => esc_html__( 'Bosnia and Herzegovina', 'give' ), |
|
117 | - 'BW' => esc_html__( 'Botswana', 'give' ), |
|
118 | - 'BV' => esc_html__( 'Bouvet Island', 'give' ), |
|
119 | - 'BR' => esc_html__( 'Brazil', 'give' ), |
|
120 | - 'IO' => esc_html__( 'British Indian Ocean Territory', 'give' ), |
|
121 | - 'BN' => esc_html__( 'Brunei Darrussalam', 'give' ), |
|
122 | - 'BG' => esc_html__( 'Bulgaria', 'give' ), |
|
123 | - 'BF' => esc_html__( 'Burkina Faso', 'give' ), |
|
124 | - 'BI' => esc_html__( 'Burundi', 'give' ), |
|
125 | - 'KH' => esc_html__( 'Cambodia', 'give' ), |
|
126 | - 'CM' => esc_html__( 'Cameroon', 'give' ), |
|
127 | - 'CV' => esc_html__( 'Cape Verde', 'give' ), |
|
128 | - 'KY' => esc_html__( 'Cayman Islands', 'give' ), |
|
129 | - 'CF' => esc_html__( 'Central African Republic', 'give' ), |
|
130 | - 'TD' => esc_html__( 'Chad', 'give' ), |
|
131 | - 'CL' => esc_html__( 'Chile', 'give' ), |
|
132 | - 'CN' => esc_html__( 'China', 'give' ), |
|
133 | - 'CX' => esc_html__( 'Christmas Island', 'give' ), |
|
134 | - 'CC' => esc_html__( 'Cocos Islands', 'give' ), |
|
135 | - 'CO' => esc_html__( 'Colombia', 'give' ), |
|
136 | - 'KM' => esc_html__( 'Comoros', 'give' ), |
|
137 | - 'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ), |
|
138 | - 'CG' => esc_html__( 'Congo, Republic of', 'give' ), |
|
139 | - 'CK' => esc_html__( 'Cook Islands', 'give' ), |
|
140 | - 'CR' => esc_html__( 'Costa Rica', 'give' ), |
|
141 | - 'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ), |
|
142 | - 'HR' => esc_html__( 'Croatia/Hrvatska', 'give' ), |
|
143 | - 'CU' => esc_html__( 'Cuba', 'give' ), |
|
144 | - 'CY' => esc_html__( 'Cyprus Island', 'give' ), |
|
145 | - 'CZ' => esc_html__( 'Czech Republic', 'give' ), |
|
146 | - 'DK' => esc_html__( 'Denmark', 'give' ), |
|
147 | - 'DJ' => esc_html__( 'Djibouti', 'give' ), |
|
148 | - 'DM' => esc_html__( 'Dominica', 'give' ), |
|
149 | - 'DO' => esc_html__( 'Dominican Republic', 'give' ), |
|
150 | - 'TP' => esc_html__( 'East Timor', 'give' ), |
|
151 | - 'EC' => esc_html__( 'Ecuador', 'give' ), |
|
152 | - 'EG' => esc_html__( 'Egypt', 'give' ), |
|
153 | - 'GQ' => esc_html__( 'Equatorial Guinea', 'give' ), |
|
154 | - 'SV' => esc_html__( 'El Salvador', 'give' ), |
|
155 | - 'ER' => esc_html__( 'Eritrea', 'give' ), |
|
156 | - 'EE' => esc_html__( 'Estonia', 'give' ), |
|
157 | - 'ET' => esc_html__( 'Ethiopia', 'give' ), |
|
158 | - 'FK' => esc_html__( 'Falkland Islands', 'give' ), |
|
159 | - 'FO' => esc_html__( 'Faroe Islands', 'give' ), |
|
160 | - 'FJ' => esc_html__( 'Fiji', 'give' ), |
|
161 | - 'FI' => esc_html__( 'Finland', 'give' ), |
|
162 | - 'FR' => esc_html__( 'France', 'give' ), |
|
163 | - 'GF' => esc_html__( 'French Guiana', 'give' ), |
|
164 | - 'PF' => esc_html__( 'French Polynesia', 'give' ), |
|
165 | - 'TF' => esc_html__( 'French Southern Territories', 'give' ), |
|
166 | - 'GA' => esc_html__( 'Gabon', 'give' ), |
|
167 | - 'GM' => esc_html__( 'Gambia', 'give' ), |
|
168 | - 'GE' => esc_html__( 'Georgia', 'give' ), |
|
169 | - 'DE' => esc_html__( 'Germany', 'give' ), |
|
170 | - 'GR' => esc_html__( 'Greece', 'give' ), |
|
171 | - 'GH' => esc_html__( 'Ghana', 'give' ), |
|
172 | - 'GI' => esc_html__( 'Gibraltar', 'give' ), |
|
173 | - 'GL' => esc_html__( 'Greenland', 'give' ), |
|
174 | - 'GD' => esc_html__( 'Grenada', 'give' ), |
|
175 | - 'GP' => esc_html__( 'Guadeloupe', 'give' ), |
|
176 | - 'GU' => esc_html__( 'Guam', 'give' ), |
|
177 | - 'GT' => esc_html__( 'Guatemala', 'give' ), |
|
178 | - 'GG' => esc_html__( 'Guernsey', 'give' ), |
|
179 | - 'GN' => esc_html__( 'Guinea', 'give' ), |
|
180 | - 'GW' => esc_html__( 'Guinea-Bissau', 'give' ), |
|
181 | - 'GY' => esc_html__( 'Guyana', 'give' ), |
|
182 | - 'HT' => esc_html__( 'Haiti', 'give' ), |
|
183 | - 'HM' => esc_html__( 'Heard and McDonald Islands', 'give' ), |
|
184 | - 'VA' => esc_html__( 'Holy See (City Vatican State)', 'give' ), |
|
185 | - 'HN' => esc_html__( 'Honduras', 'give' ), |
|
186 | - 'HK' => esc_html__( 'Hong Kong', 'give' ), |
|
187 | - 'HU' => esc_html__( 'Hungary', 'give' ), |
|
188 | - 'IS' => esc_html__( 'Iceland', 'give' ), |
|
189 | - 'IN' => esc_html__( 'India', 'give' ), |
|
190 | - 'ID' => esc_html__( 'Indonesia', 'give' ), |
|
191 | - 'IR' => esc_html__( 'Iran', 'give' ), |
|
192 | - 'IQ' => esc_html__( 'Iraq', 'give' ), |
|
193 | - 'IE' => esc_html__( 'Ireland', 'give' ), |
|
194 | - 'IM' => esc_html__( 'Isle of Man', 'give' ), |
|
195 | - 'IL' => esc_html__( 'Israel', 'give' ), |
|
196 | - 'IT' => esc_html__( 'Italy', 'give' ), |
|
197 | - 'JM' => esc_html__( 'Jamaica', 'give' ), |
|
198 | - 'JP' => esc_html__( 'Japan', 'give' ), |
|
199 | - 'JE' => esc_html__( 'Jersey', 'give' ), |
|
200 | - 'JO' => esc_html__( 'Jordan', 'give' ), |
|
201 | - 'KZ' => esc_html__( 'Kazakhstan', 'give' ), |
|
202 | - 'KE' => esc_html__( 'Kenya', 'give' ), |
|
203 | - 'KI' => esc_html__( 'Kiribati', 'give' ), |
|
204 | - 'KW' => esc_html__( 'Kuwait', 'give' ), |
|
205 | - 'KG' => esc_html__( 'Kyrgyzstan', 'give' ), |
|
206 | - 'LA' => esc_html__( 'Lao People\'s Democratic Republic', 'give' ), |
|
207 | - 'LV' => esc_html__( 'Latvia', 'give' ), |
|
208 | - 'LB' => esc_html__( 'Lebanon', 'give' ), |
|
209 | - 'LS' => esc_html__( 'Lesotho', 'give' ), |
|
210 | - 'LR' => esc_html__( 'Liberia', 'give' ), |
|
211 | - 'LY' => esc_html__( 'Libyan Arab Jamahiriya', 'give' ), |
|
212 | - 'LI' => esc_html__( 'Liechtenstein', 'give' ), |
|
213 | - 'LT' => esc_html__( 'Lithuania', 'give' ), |
|
214 | - 'LU' => esc_html__( 'Luxembourg', 'give' ), |
|
215 | - 'MO' => esc_html__( 'Macau', 'give' ), |
|
216 | - 'MK' => esc_html__( 'Macedonia', 'give' ), |
|
217 | - 'MG' => esc_html__( 'Madagascar', 'give' ), |
|
218 | - 'MW' => esc_html__( 'Malawi', 'give' ), |
|
219 | - 'MY' => esc_html__( 'Malaysia', 'give' ), |
|
220 | - 'MV' => esc_html__( 'Maldives', 'give' ), |
|
221 | - 'ML' => esc_html__( 'Mali', 'give' ), |
|
222 | - 'MT' => esc_html__( 'Malta', 'give' ), |
|
223 | - 'MH' => esc_html__( 'Marshall Islands', 'give' ), |
|
224 | - 'MQ' => esc_html__( 'Martinique', 'give' ), |
|
225 | - 'MR' => esc_html__( 'Mauritania', 'give' ), |
|
226 | - 'MU' => esc_html__( 'Mauritius', 'give' ), |
|
227 | - 'YT' => esc_html__( 'Mayotte', 'give' ), |
|
228 | - 'MX' => esc_html__( 'Mexico', 'give' ), |
|
229 | - 'FM' => esc_html__( 'Micronesia', 'give' ), |
|
230 | - 'MD' => esc_html__( 'Moldova, Republic of', 'give' ), |
|
231 | - 'MC' => esc_html__( 'Monaco', 'give' ), |
|
232 | - 'MN' => esc_html__( 'Mongolia', 'give' ), |
|
233 | - 'ME' => esc_html__( 'Montenegro', 'give' ), |
|
234 | - 'MS' => esc_html__( 'Montserrat', 'give' ), |
|
235 | - 'MA' => esc_html__( 'Morocco', 'give' ), |
|
236 | - 'MZ' => esc_html__( 'Mozambique', 'give' ), |
|
237 | - 'MM' => esc_html__( 'Myanmar', 'give' ), |
|
238 | - 'NA' => esc_html__( 'Namibia', 'give' ), |
|
239 | - 'NR' => esc_html__( 'Nauru', 'give' ), |
|
240 | - 'NP' => esc_html__( 'Nepal', 'give' ), |
|
241 | - 'NL' => esc_html__( 'Netherlands', 'give' ), |
|
242 | - 'AN' => esc_html__( 'Netherlands Antilles', 'give' ), |
|
243 | - 'NC' => esc_html__( 'New Caledonia', 'give' ), |
|
244 | - 'NZ' => esc_html__( 'New Zealand', 'give' ), |
|
245 | - 'NI' => esc_html__( 'Nicaragua', 'give' ), |
|
246 | - 'NE' => esc_html__( 'Niger', 'give' ), |
|
247 | - 'NG' => esc_html__( 'Nigeria', 'give' ), |
|
248 | - 'NU' => esc_html__( 'Niue', 'give' ), |
|
249 | - 'NF' => esc_html__( 'Norfolk Island', 'give' ), |
|
250 | - 'KP' => esc_html__( 'North Korea', 'give' ), |
|
251 | - 'MP' => esc_html__( 'Northern Mariana Islands', 'give' ), |
|
252 | - 'NO' => esc_html__( 'Norway', 'give' ), |
|
253 | - 'OM' => esc_html__( 'Oman', 'give' ), |
|
254 | - 'PK' => esc_html__( 'Pakistan', 'give' ), |
|
255 | - 'PW' => esc_html__( 'Palau', 'give' ), |
|
256 | - 'PS' => esc_html__( 'Palestinian Territories', 'give' ), |
|
257 | - 'PA' => esc_html__( 'Panama', 'give' ), |
|
258 | - 'PG' => esc_html__( 'Papua New Guinea', 'give' ), |
|
259 | - 'PY' => esc_html__( 'Paraguay', 'give' ), |
|
260 | - 'PE' => esc_html__( 'Peru', 'give' ), |
|
261 | - 'PH' => esc_html__( 'Phillipines', 'give' ), |
|
262 | - 'PN' => esc_html__( 'Pitcairn Island', 'give' ), |
|
263 | - 'PL' => esc_html__( 'Poland', 'give' ), |
|
264 | - 'PT' => esc_html__( 'Portugal', 'give' ), |
|
265 | - 'PR' => esc_html__( 'Puerto Rico', 'give' ), |
|
266 | - 'QA' => esc_html__( 'Qatar', 'give' ), |
|
267 | - 'RE' => esc_html__( 'Reunion Island', 'give' ), |
|
268 | - 'RO' => esc_html__( 'Romania', 'give' ), |
|
269 | - 'RU' => esc_html__( 'Russian Federation', 'give' ), |
|
270 | - 'RW' => esc_html__( 'Rwanda', 'give' ), |
|
271 | - 'SH' => esc_html__( 'Saint Helena', 'give' ), |
|
272 | - 'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ), |
|
273 | - 'LC' => esc_html__( 'Saint Lucia', 'give' ), |
|
274 | - 'PM' => esc_html__( 'Saint Pierre and Miquelon', 'give' ), |
|
275 | - 'VC' => esc_html__( 'Saint Vincent and the Grenadines', 'give' ), |
|
276 | - 'SM' => esc_html__( 'San Marino', 'give' ), |
|
277 | - 'ST' => esc_html__( 'Sao Tome and Principe', 'give' ), |
|
278 | - 'SA' => esc_html__( 'Saudi Arabia', 'give' ), |
|
279 | - 'SN' => esc_html__( 'Senegal', 'give' ), |
|
280 | - 'RS' => esc_html__( 'Serbia', 'give' ), |
|
281 | - 'SC' => esc_html__( 'Seychelles', 'give' ), |
|
282 | - 'SL' => esc_html__( 'Sierra Leone', 'give' ), |
|
283 | - 'SG' => esc_html__( 'Singapore', 'give' ), |
|
284 | - 'SK' => esc_html__( 'Slovak Republic', 'give' ), |
|
285 | - 'SI' => esc_html__( 'Slovenia', 'give' ), |
|
286 | - 'SB' => esc_html__( 'Solomon Islands', 'give' ), |
|
287 | - 'SO' => esc_html__( 'Somalia', 'give' ), |
|
288 | - 'ZA' => esc_html__( 'South Africa', 'give' ), |
|
289 | - 'GS' => esc_html__( 'South Georgia', 'give' ), |
|
290 | - 'KR' => esc_html__( 'South Korea', 'give' ), |
|
291 | - 'ES' => esc_html__( 'Spain', 'give' ), |
|
292 | - 'LK' => esc_html__( 'Sri Lanka', 'give' ), |
|
293 | - 'SD' => esc_html__( 'Sudan', 'give' ), |
|
294 | - 'SR' => esc_html__( 'Suriname', 'give' ), |
|
295 | - 'SJ' => esc_html__( 'Svalbard and Jan Mayen Islands', 'give' ), |
|
296 | - 'SZ' => esc_html__( 'Swaziland', 'give' ), |
|
297 | - 'SE' => esc_html__( 'Sweden', 'give' ), |
|
298 | - 'CH' => esc_html__( 'Switzerland', 'give' ), |
|
299 | - 'SY' => esc_html__( 'Syrian Arab Republic', 'give' ), |
|
300 | - 'TW' => esc_html__( 'Taiwan', 'give' ), |
|
301 | - 'TJ' => esc_html__( 'Tajikistan', 'give' ), |
|
302 | - 'TZ' => esc_html__( 'Tanzania', 'give' ), |
|
303 | - 'TG' => esc_html__( 'Togo', 'give' ), |
|
304 | - 'TK' => esc_html__( 'Tokelau', 'give' ), |
|
305 | - 'TO' => esc_html__( 'Tonga', 'give' ), |
|
306 | - 'TH' => esc_html__( 'Thailand', 'give' ), |
|
307 | - 'TT' => esc_html__( 'Trinidad and Tobago', 'give' ), |
|
308 | - 'TN' => esc_html__( 'Tunisia', 'give' ), |
|
309 | - 'TR' => esc_html__( 'Turkey', 'give' ), |
|
310 | - 'TM' => esc_html__( 'Turkmenistan', 'give' ), |
|
311 | - 'TC' => esc_html__( 'Turks and Caicos Islands', 'give' ), |
|
312 | - 'TV' => esc_html__( 'Tuvalu', 'give' ), |
|
313 | - 'UG' => esc_html__( 'Uganda', 'give' ), |
|
314 | - 'UA' => esc_html__( 'Ukraine', 'give' ), |
|
315 | - 'AE' => esc_html__( 'United Arab Emirates', 'give' ), |
|
316 | - 'UY' => esc_html__( 'Uruguay', 'give' ), |
|
317 | - 'UM' => esc_html__( 'US Minor Outlying Islands', 'give' ), |
|
318 | - 'UZ' => esc_html__( 'Uzbekistan', 'give' ), |
|
319 | - 'VU' => esc_html__( 'Vanuatu', 'give' ), |
|
320 | - 'VE' => esc_html__( 'Venezuela', 'give' ), |
|
321 | - 'VN' => esc_html__( 'Vietnam', 'give' ), |
|
322 | - 'VG' => esc_html__( 'Virgin Islands (British)', 'give' ), |
|
323 | - 'VI' => esc_html__( 'Virgin Islands (USA)', 'give' ), |
|
324 | - 'WF' => esc_html__( 'Wallis and Futuna Islands', 'give' ), |
|
325 | - 'EH' => esc_html__( 'Western Sahara', 'give' ), |
|
326 | - 'WS' => esc_html__( 'Western Samoa', 'give' ), |
|
327 | - 'YE' => esc_html__( 'Yemen', 'give' ), |
|
328 | - 'YU' => esc_html__( 'Yugoslavia', 'give' ), |
|
329 | - 'ZM' => esc_html__( 'Zambia', 'give' ), |
|
330 | - 'ZW' => esc_html__( 'Zimbabwe', 'give' ), |
|
87 | + 'US' => esc_html__('United States', 'give'), |
|
88 | + 'CA' => esc_html__('Canada', 'give'), |
|
89 | + 'GB' => esc_html__('United Kingdom', 'give'), |
|
90 | + 'AF' => esc_html__('Afghanistan', 'give'), |
|
91 | + 'AL' => esc_html__('Albania', 'give'), |
|
92 | + 'DZ' => esc_html__('Algeria', 'give'), |
|
93 | + 'AS' => esc_html__('American Samoa', 'give'), |
|
94 | + 'AD' => esc_html__('Andorra', 'give'), |
|
95 | + 'AO' => esc_html__('Angola', 'give'), |
|
96 | + 'AI' => esc_html__('Anguilla', 'give'), |
|
97 | + 'AQ' => esc_html__('Antarctica', 'give'), |
|
98 | + 'AG' => esc_html__('Antigua and Barbuda', 'give'), |
|
99 | + 'AR' => esc_html__('Argentina', 'give'), |
|
100 | + 'AM' => esc_html__('Armenia', 'give'), |
|
101 | + 'AW' => esc_html__('Aruba', 'give'), |
|
102 | + 'AU' => esc_html__('Australia', 'give'), |
|
103 | + 'AT' => esc_html__('Austria', 'give'), |
|
104 | + 'AZ' => esc_html__('Azerbaijan', 'give'), |
|
105 | + 'BS' => esc_html__('Bahamas', 'give'), |
|
106 | + 'BH' => esc_html__('Bahrain', 'give'), |
|
107 | + 'BD' => esc_html__('Bangladesh', 'give'), |
|
108 | + 'BB' => esc_html__('Barbados', 'give'), |
|
109 | + 'BY' => esc_html__('Belarus', 'give'), |
|
110 | + 'BE' => esc_html__('Belgium', 'give'), |
|
111 | + 'BZ' => esc_html__('Belize', 'give'), |
|
112 | + 'BJ' => esc_html__('Benin', 'give'), |
|
113 | + 'BM' => esc_html__('Bermuda', 'give'), |
|
114 | + 'BT' => esc_html__('Bhutan', 'give'), |
|
115 | + 'BO' => esc_html__('Bolivia', 'give'), |
|
116 | + 'BA' => esc_html__('Bosnia and Herzegovina', 'give'), |
|
117 | + 'BW' => esc_html__('Botswana', 'give'), |
|
118 | + 'BV' => esc_html__('Bouvet Island', 'give'), |
|
119 | + 'BR' => esc_html__('Brazil', 'give'), |
|
120 | + 'IO' => esc_html__('British Indian Ocean Territory', 'give'), |
|
121 | + 'BN' => esc_html__('Brunei Darrussalam', 'give'), |
|
122 | + 'BG' => esc_html__('Bulgaria', 'give'), |
|
123 | + 'BF' => esc_html__('Burkina Faso', 'give'), |
|
124 | + 'BI' => esc_html__('Burundi', 'give'), |
|
125 | + 'KH' => esc_html__('Cambodia', 'give'), |
|
126 | + 'CM' => esc_html__('Cameroon', 'give'), |
|
127 | + 'CV' => esc_html__('Cape Verde', 'give'), |
|
128 | + 'KY' => esc_html__('Cayman Islands', 'give'), |
|
129 | + 'CF' => esc_html__('Central African Republic', 'give'), |
|
130 | + 'TD' => esc_html__('Chad', 'give'), |
|
131 | + 'CL' => esc_html__('Chile', 'give'), |
|
132 | + 'CN' => esc_html__('China', 'give'), |
|
133 | + 'CX' => esc_html__('Christmas Island', 'give'), |
|
134 | + 'CC' => esc_html__('Cocos Islands', 'give'), |
|
135 | + 'CO' => esc_html__('Colombia', 'give'), |
|
136 | + 'KM' => esc_html__('Comoros', 'give'), |
|
137 | + 'CD' => esc_html__('Congo, Democratic People\'s Republic', 'give'), |
|
138 | + 'CG' => esc_html__('Congo, Republic of', 'give'), |
|
139 | + 'CK' => esc_html__('Cook Islands', 'give'), |
|
140 | + 'CR' => esc_html__('Costa Rica', 'give'), |
|
141 | + 'CI' => esc_html__('Cote d\'Ivoire', 'give'), |
|
142 | + 'HR' => esc_html__('Croatia/Hrvatska', 'give'), |
|
143 | + 'CU' => esc_html__('Cuba', 'give'), |
|
144 | + 'CY' => esc_html__('Cyprus Island', 'give'), |
|
145 | + 'CZ' => esc_html__('Czech Republic', 'give'), |
|
146 | + 'DK' => esc_html__('Denmark', 'give'), |
|
147 | + 'DJ' => esc_html__('Djibouti', 'give'), |
|
148 | + 'DM' => esc_html__('Dominica', 'give'), |
|
149 | + 'DO' => esc_html__('Dominican Republic', 'give'), |
|
150 | + 'TP' => esc_html__('East Timor', 'give'), |
|
151 | + 'EC' => esc_html__('Ecuador', 'give'), |
|
152 | + 'EG' => esc_html__('Egypt', 'give'), |
|
153 | + 'GQ' => esc_html__('Equatorial Guinea', 'give'), |
|
154 | + 'SV' => esc_html__('El Salvador', 'give'), |
|
155 | + 'ER' => esc_html__('Eritrea', 'give'), |
|
156 | + 'EE' => esc_html__('Estonia', 'give'), |
|
157 | + 'ET' => esc_html__('Ethiopia', 'give'), |
|
158 | + 'FK' => esc_html__('Falkland Islands', 'give'), |
|
159 | + 'FO' => esc_html__('Faroe Islands', 'give'), |
|
160 | + 'FJ' => esc_html__('Fiji', 'give'), |
|
161 | + 'FI' => esc_html__('Finland', 'give'), |
|
162 | + 'FR' => esc_html__('France', 'give'), |
|
163 | + 'GF' => esc_html__('French Guiana', 'give'), |
|
164 | + 'PF' => esc_html__('French Polynesia', 'give'), |
|
165 | + 'TF' => esc_html__('French Southern Territories', 'give'), |
|
166 | + 'GA' => esc_html__('Gabon', 'give'), |
|
167 | + 'GM' => esc_html__('Gambia', 'give'), |
|
168 | + 'GE' => esc_html__('Georgia', 'give'), |
|
169 | + 'DE' => esc_html__('Germany', 'give'), |
|
170 | + 'GR' => esc_html__('Greece', 'give'), |
|
171 | + 'GH' => esc_html__('Ghana', 'give'), |
|
172 | + 'GI' => esc_html__('Gibraltar', 'give'), |
|
173 | + 'GL' => esc_html__('Greenland', 'give'), |
|
174 | + 'GD' => esc_html__('Grenada', 'give'), |
|
175 | + 'GP' => esc_html__('Guadeloupe', 'give'), |
|
176 | + 'GU' => esc_html__('Guam', 'give'), |
|
177 | + 'GT' => esc_html__('Guatemala', 'give'), |
|
178 | + 'GG' => esc_html__('Guernsey', 'give'), |
|
179 | + 'GN' => esc_html__('Guinea', 'give'), |
|
180 | + 'GW' => esc_html__('Guinea-Bissau', 'give'), |
|
181 | + 'GY' => esc_html__('Guyana', 'give'), |
|
182 | + 'HT' => esc_html__('Haiti', 'give'), |
|
183 | + 'HM' => esc_html__('Heard and McDonald Islands', 'give'), |
|
184 | + 'VA' => esc_html__('Holy See (City Vatican State)', 'give'), |
|
185 | + 'HN' => esc_html__('Honduras', 'give'), |
|
186 | + 'HK' => esc_html__('Hong Kong', 'give'), |
|
187 | + 'HU' => esc_html__('Hungary', 'give'), |
|
188 | + 'IS' => esc_html__('Iceland', 'give'), |
|
189 | + 'IN' => esc_html__('India', 'give'), |
|
190 | + 'ID' => esc_html__('Indonesia', 'give'), |
|
191 | + 'IR' => esc_html__('Iran', 'give'), |
|
192 | + 'IQ' => esc_html__('Iraq', 'give'), |
|
193 | + 'IE' => esc_html__('Ireland', 'give'), |
|
194 | + 'IM' => esc_html__('Isle of Man', 'give'), |
|
195 | + 'IL' => esc_html__('Israel', 'give'), |
|
196 | + 'IT' => esc_html__('Italy', 'give'), |
|
197 | + 'JM' => esc_html__('Jamaica', 'give'), |
|
198 | + 'JP' => esc_html__('Japan', 'give'), |
|
199 | + 'JE' => esc_html__('Jersey', 'give'), |
|
200 | + 'JO' => esc_html__('Jordan', 'give'), |
|
201 | + 'KZ' => esc_html__('Kazakhstan', 'give'), |
|
202 | + 'KE' => esc_html__('Kenya', 'give'), |
|
203 | + 'KI' => esc_html__('Kiribati', 'give'), |
|
204 | + 'KW' => esc_html__('Kuwait', 'give'), |
|
205 | + 'KG' => esc_html__('Kyrgyzstan', 'give'), |
|
206 | + 'LA' => esc_html__('Lao People\'s Democratic Republic', 'give'), |
|
207 | + 'LV' => esc_html__('Latvia', 'give'), |
|
208 | + 'LB' => esc_html__('Lebanon', 'give'), |
|
209 | + 'LS' => esc_html__('Lesotho', 'give'), |
|
210 | + 'LR' => esc_html__('Liberia', 'give'), |
|
211 | + 'LY' => esc_html__('Libyan Arab Jamahiriya', 'give'), |
|
212 | + 'LI' => esc_html__('Liechtenstein', 'give'), |
|
213 | + 'LT' => esc_html__('Lithuania', 'give'), |
|
214 | + 'LU' => esc_html__('Luxembourg', 'give'), |
|
215 | + 'MO' => esc_html__('Macau', 'give'), |
|
216 | + 'MK' => esc_html__('Macedonia', 'give'), |
|
217 | + 'MG' => esc_html__('Madagascar', 'give'), |
|
218 | + 'MW' => esc_html__('Malawi', 'give'), |
|
219 | + 'MY' => esc_html__('Malaysia', 'give'), |
|
220 | + 'MV' => esc_html__('Maldives', 'give'), |
|
221 | + 'ML' => esc_html__('Mali', 'give'), |
|
222 | + 'MT' => esc_html__('Malta', 'give'), |
|
223 | + 'MH' => esc_html__('Marshall Islands', 'give'), |
|
224 | + 'MQ' => esc_html__('Martinique', 'give'), |
|
225 | + 'MR' => esc_html__('Mauritania', 'give'), |
|
226 | + 'MU' => esc_html__('Mauritius', 'give'), |
|
227 | + 'YT' => esc_html__('Mayotte', 'give'), |
|
228 | + 'MX' => esc_html__('Mexico', 'give'), |
|
229 | + 'FM' => esc_html__('Micronesia', 'give'), |
|
230 | + 'MD' => esc_html__('Moldova, Republic of', 'give'), |
|
231 | + 'MC' => esc_html__('Monaco', 'give'), |
|
232 | + 'MN' => esc_html__('Mongolia', 'give'), |
|
233 | + 'ME' => esc_html__('Montenegro', 'give'), |
|
234 | + 'MS' => esc_html__('Montserrat', 'give'), |
|
235 | + 'MA' => esc_html__('Morocco', 'give'), |
|
236 | + 'MZ' => esc_html__('Mozambique', 'give'), |
|
237 | + 'MM' => esc_html__('Myanmar', 'give'), |
|
238 | + 'NA' => esc_html__('Namibia', 'give'), |
|
239 | + 'NR' => esc_html__('Nauru', 'give'), |
|
240 | + 'NP' => esc_html__('Nepal', 'give'), |
|
241 | + 'NL' => esc_html__('Netherlands', 'give'), |
|
242 | + 'AN' => esc_html__('Netherlands Antilles', 'give'), |
|
243 | + 'NC' => esc_html__('New Caledonia', 'give'), |
|
244 | + 'NZ' => esc_html__('New Zealand', 'give'), |
|
245 | + 'NI' => esc_html__('Nicaragua', 'give'), |
|
246 | + 'NE' => esc_html__('Niger', 'give'), |
|
247 | + 'NG' => esc_html__('Nigeria', 'give'), |
|
248 | + 'NU' => esc_html__('Niue', 'give'), |
|
249 | + 'NF' => esc_html__('Norfolk Island', 'give'), |
|
250 | + 'KP' => esc_html__('North Korea', 'give'), |
|
251 | + 'MP' => esc_html__('Northern Mariana Islands', 'give'), |
|
252 | + 'NO' => esc_html__('Norway', 'give'), |
|
253 | + 'OM' => esc_html__('Oman', 'give'), |
|
254 | + 'PK' => esc_html__('Pakistan', 'give'), |
|
255 | + 'PW' => esc_html__('Palau', 'give'), |
|
256 | + 'PS' => esc_html__('Palestinian Territories', 'give'), |
|
257 | + 'PA' => esc_html__('Panama', 'give'), |
|
258 | + 'PG' => esc_html__('Papua New Guinea', 'give'), |
|
259 | + 'PY' => esc_html__('Paraguay', 'give'), |
|
260 | + 'PE' => esc_html__('Peru', 'give'), |
|
261 | + 'PH' => esc_html__('Phillipines', 'give'), |
|
262 | + 'PN' => esc_html__('Pitcairn Island', 'give'), |
|
263 | + 'PL' => esc_html__('Poland', 'give'), |
|
264 | + 'PT' => esc_html__('Portugal', 'give'), |
|
265 | + 'PR' => esc_html__('Puerto Rico', 'give'), |
|
266 | + 'QA' => esc_html__('Qatar', 'give'), |
|
267 | + 'RE' => esc_html__('Reunion Island', 'give'), |
|
268 | + 'RO' => esc_html__('Romania', 'give'), |
|
269 | + 'RU' => esc_html__('Russian Federation', 'give'), |
|
270 | + 'RW' => esc_html__('Rwanda', 'give'), |
|
271 | + 'SH' => esc_html__('Saint Helena', 'give'), |
|
272 | + 'KN' => esc_html__('Saint Kitts and Nevis', 'give'), |
|
273 | + 'LC' => esc_html__('Saint Lucia', 'give'), |
|
274 | + 'PM' => esc_html__('Saint Pierre and Miquelon', 'give'), |
|
275 | + 'VC' => esc_html__('Saint Vincent and the Grenadines', 'give'), |
|
276 | + 'SM' => esc_html__('San Marino', 'give'), |
|
277 | + 'ST' => esc_html__('Sao Tome and Principe', 'give'), |
|
278 | + 'SA' => esc_html__('Saudi Arabia', 'give'), |
|
279 | + 'SN' => esc_html__('Senegal', 'give'), |
|
280 | + 'RS' => esc_html__('Serbia', 'give'), |
|
281 | + 'SC' => esc_html__('Seychelles', 'give'), |
|
282 | + 'SL' => esc_html__('Sierra Leone', 'give'), |
|
283 | + 'SG' => esc_html__('Singapore', 'give'), |
|
284 | + 'SK' => esc_html__('Slovak Republic', 'give'), |
|
285 | + 'SI' => esc_html__('Slovenia', 'give'), |
|
286 | + 'SB' => esc_html__('Solomon Islands', 'give'), |
|
287 | + 'SO' => esc_html__('Somalia', 'give'), |
|
288 | + 'ZA' => esc_html__('South Africa', 'give'), |
|
289 | + 'GS' => esc_html__('South Georgia', 'give'), |
|
290 | + 'KR' => esc_html__('South Korea', 'give'), |
|
291 | + 'ES' => esc_html__('Spain', 'give'), |
|
292 | + 'LK' => esc_html__('Sri Lanka', 'give'), |
|
293 | + 'SD' => esc_html__('Sudan', 'give'), |
|
294 | + 'SR' => esc_html__('Suriname', 'give'), |
|
295 | + 'SJ' => esc_html__('Svalbard and Jan Mayen Islands', 'give'), |
|
296 | + 'SZ' => esc_html__('Swaziland', 'give'), |
|
297 | + 'SE' => esc_html__('Sweden', 'give'), |
|
298 | + 'CH' => esc_html__('Switzerland', 'give'), |
|
299 | + 'SY' => esc_html__('Syrian Arab Republic', 'give'), |
|
300 | + 'TW' => esc_html__('Taiwan', 'give'), |
|
301 | + 'TJ' => esc_html__('Tajikistan', 'give'), |
|
302 | + 'TZ' => esc_html__('Tanzania', 'give'), |
|
303 | + 'TG' => esc_html__('Togo', 'give'), |
|
304 | + 'TK' => esc_html__('Tokelau', 'give'), |
|
305 | + 'TO' => esc_html__('Tonga', 'give'), |
|
306 | + 'TH' => esc_html__('Thailand', 'give'), |
|
307 | + 'TT' => esc_html__('Trinidad and Tobago', 'give'), |
|
308 | + 'TN' => esc_html__('Tunisia', 'give'), |
|
309 | + 'TR' => esc_html__('Turkey', 'give'), |
|
310 | + 'TM' => esc_html__('Turkmenistan', 'give'), |
|
311 | + 'TC' => esc_html__('Turks and Caicos Islands', 'give'), |
|
312 | + 'TV' => esc_html__('Tuvalu', 'give'), |
|
313 | + 'UG' => esc_html__('Uganda', 'give'), |
|
314 | + 'UA' => esc_html__('Ukraine', 'give'), |
|
315 | + 'AE' => esc_html__('United Arab Emirates', 'give'), |
|
316 | + 'UY' => esc_html__('Uruguay', 'give'), |
|
317 | + 'UM' => esc_html__('US Minor Outlying Islands', 'give'), |
|
318 | + 'UZ' => esc_html__('Uzbekistan', 'give'), |
|
319 | + 'VU' => esc_html__('Vanuatu', 'give'), |
|
320 | + 'VE' => esc_html__('Venezuela', 'give'), |
|
321 | + 'VN' => esc_html__('Vietnam', 'give'), |
|
322 | + 'VG' => esc_html__('Virgin Islands (British)', 'give'), |
|
323 | + 'VI' => esc_html__('Virgin Islands (USA)', 'give'), |
|
324 | + 'WF' => esc_html__('Wallis and Futuna Islands', 'give'), |
|
325 | + 'EH' => esc_html__('Western Sahara', 'give'), |
|
326 | + 'WS' => esc_html__('Western Samoa', 'give'), |
|
327 | + 'YE' => esc_html__('Yemen', 'give'), |
|
328 | + 'YU' => esc_html__('Yugoslavia', 'give'), |
|
329 | + 'ZM' => esc_html__('Zambia', 'give'), |
|
330 | + 'ZW' => esc_html__('Zimbabwe', 'give'), |
|
331 | 331 | ); |
332 | 332 | |
333 | - return (array) apply_filters( 'give_countries', $countries ); |
|
333 | + return (array) apply_filters('give_countries', $countries); |
|
334 | 334 | } |
335 | 335 | |
336 | 336 | /** |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | * |
385 | 385 | * @param array $states Contain the list of states in array key format where key of the array is there respected country code. |
386 | 386 | */ |
387 | - return (array) apply_filters( 'give_states_list', $states ); |
|
387 | + return (array) apply_filters('give_states_list', $states); |
|
388 | 388 | } |
389 | 389 | |
390 | 390 | /** |
@@ -399,9 +399,9 @@ discard block |
||
399 | 399 | function give_no_states_country_list() { |
400 | 400 | $country_list = array(); |
401 | 401 | $locale = give_get_country_locale(); |
402 | - foreach ( $locale as $key => $value ) { |
|
403 | - if ( ! empty( $value['state'] ) && isset( $value['state']['hidden'] ) && true === $value['state']['hidden'] ) { |
|
404 | - $country_list[ $key ] = $value['state']; |
|
402 | + foreach ($locale as $key => $value) { |
|
403 | + if ( ! empty($value['state']) && isset($value['state']['hidden']) && true === $value['state']['hidden']) { |
|
404 | + $country_list[$key] = $value['state']; |
|
405 | 405 | } |
406 | 406 | } |
407 | 407 | |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | * |
413 | 413 | * @param array $country Contain key as there country code & value as there country name. |
414 | 414 | */ |
415 | - return (array) apply_filters( 'give_no_states_country_list', $country_list ); |
|
415 | + return (array) apply_filters('give_no_states_country_list', $country_list); |
|
416 | 416 | } |
417 | 417 | |
418 | 418 | /** |
@@ -427,9 +427,9 @@ discard block |
||
427 | 427 | function give_states_not_required_country_list() { |
428 | 428 | $country_list = array(); |
429 | 429 | $locale = give_get_country_locale(); |
430 | - foreach ( $locale as $key => $value ) { |
|
431 | - if ( ! empty( $value['state'] ) && isset( $value['state']['required'] ) && false === $value['state']['required'] ) { |
|
432 | - $country_list[ $key ] = $value['state']; |
|
430 | + foreach ($locale as $key => $value) { |
|
431 | + if ( ! empty($value['state']) && isset($value['state']['required']) && false === $value['state']['required']) { |
|
432 | + $country_list[$key] = $value['state']; |
|
433 | 433 | } |
434 | 434 | } |
435 | 435 | |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | * |
441 | 441 | * @param array $country Contain key as there country code & value as there country name. |
442 | 442 | */ |
443 | - return (array) apply_filters( 'give_states_not_required_country_list', $country_list ); |
|
443 | + return (array) apply_filters('give_states_not_required_country_list', $country_list); |
|
444 | 444 | } |
445 | 445 | |
446 | 446 | /** |
@@ -452,11 +452,11 @@ discard block |
||
452 | 452 | * |
453 | 453 | * @return string|bool |
454 | 454 | */ |
455 | -function give_get_country_name_by_key( $key ) { |
|
455 | +function give_get_country_name_by_key($key) { |
|
456 | 456 | $country_list = give_get_country_list(); |
457 | 457 | |
458 | - if ( array_key_exists( $key, $country_list ) ) { |
|
459 | - return $country_list[ $key ]; |
|
458 | + if (array_key_exists($key, $country_list)) { |
|
459 | + return $country_list[$key]; |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | return false; |
@@ -471,14 +471,14 @@ discard block |
||
471 | 471 | */ |
472 | 472 | function give_get_states_label() { |
473 | 473 | $country_states_label = array(); |
474 | - $default_label = __( 'State', 'give' ); |
|
474 | + $default_label = __('State', 'give'); |
|
475 | 475 | $locale = give_get_country_locale(); |
476 | - foreach ( $locale as $key => $value ) { |
|
476 | + foreach ($locale as $key => $value) { |
|
477 | 477 | $label = $default_label; |
478 | - if ( ! empty( $value['state'] ) && ! empty( $value['state']['label'] ) ) { |
|
478 | + if ( ! empty($value['state']) && ! empty($value['state']['label'])) { |
|
479 | 479 | $label = $value['state']['label']; |
480 | 480 | } |
481 | - $country_states_label[ $key ] = $label; |
|
481 | + $country_states_label[$key] = $label; |
|
482 | 482 | } |
483 | 483 | |
484 | 484 | /** |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | * |
489 | 489 | * @param array $country Contain key as there country code & value as there country name. |
490 | 490 | */ |
491 | - return (array) apply_filters( 'give_get_states_label', $country_states_label ); |
|
491 | + return (array) apply_filters('give_get_states_label', $country_states_label); |
|
492 | 492 | } |
493 | 493 | |
494 | 494 | /** |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | * @return array |
500 | 500 | */ |
501 | 501 | function give_get_country_locale() { |
502 | - return (array) apply_filters( 'give_get_country_locale', array( |
|
502 | + return (array) apply_filters('give_get_country_locale', array( |
|
503 | 503 | 'AE' => array( |
504 | 504 | 'state' => array( |
505 | 505 | 'required' => false, |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | ), |
520 | 520 | 'AU' => array( |
521 | 521 | 'state' => array( |
522 | - 'label' => __( 'State', 'give' ), |
|
522 | + 'label' => __('State', 'give'), |
|
523 | 523 | ), |
524 | 524 | ), |
525 | 525 | 'AX' => array( |
@@ -529,13 +529,13 @@ discard block |
||
529 | 529 | ), |
530 | 530 | 'BD' => array( |
531 | 531 | 'state' => array( |
532 | - 'label' => __( 'District', 'give' ), |
|
532 | + 'label' => __('District', 'give'), |
|
533 | 533 | ), |
534 | 534 | ), |
535 | 535 | 'BE' => array( |
536 | 536 | 'state' => array( |
537 | 537 | 'required' => false, |
538 | - 'label' => __( 'Province', 'give' ), |
|
538 | + 'label' => __('Province', 'give'), |
|
539 | 539 | 'hidden' => true, |
540 | 540 | ), |
541 | 541 | ), |
@@ -546,24 +546,24 @@ discard block |
||
546 | 546 | ), |
547 | 547 | 'CA' => array( |
548 | 548 | 'state' => array( |
549 | - 'label' => __( 'Province', 'give' ), |
|
549 | + 'label' => __('Province', 'give'), |
|
550 | 550 | ), |
551 | 551 | ), |
552 | 552 | 'CH' => array( |
553 | 553 | 'state' => array( |
554 | - 'label' => __( 'Canton', 'give' ), |
|
554 | + 'label' => __('Canton', 'give'), |
|
555 | 555 | 'required' => false, |
556 | 556 | 'hidden' => true, |
557 | 557 | ), |
558 | 558 | ), |
559 | 559 | 'CL' => array( |
560 | 560 | 'state' => array( |
561 | - 'label' => __( 'Region', 'give' ), |
|
561 | + 'label' => __('Region', 'give'), |
|
562 | 562 | ), |
563 | 563 | ), |
564 | 564 | 'CN' => array( |
565 | 565 | 'state' => array( |
566 | - 'label' => __( 'Province', 'give' ), |
|
566 | + 'label' => __('Province', 'give'), |
|
567 | 567 | ), |
568 | 568 | ), |
569 | 569 | 'CZ' => array( |
@@ -614,23 +614,23 @@ discard block |
||
614 | 614 | ), |
615 | 615 | 'HK' => array( |
616 | 616 | 'state' => array( |
617 | - 'label' => __( 'Region', 'give' ), |
|
617 | + 'label' => __('Region', 'give'), |
|
618 | 618 | ), |
619 | 619 | ), |
620 | 620 | 'HU' => array( |
621 | 621 | 'state' => array( |
622 | - 'label' => __( 'County', 'give' ), |
|
622 | + 'label' => __('County', 'give'), |
|
623 | 623 | 'hidden' => true, |
624 | 624 | ), |
625 | 625 | ), |
626 | 626 | 'ID' => array( |
627 | 627 | 'state' => array( |
628 | - 'label' => __( 'Province', 'give' ), |
|
628 | + 'label' => __('Province', 'give'), |
|
629 | 629 | ), |
630 | 630 | ), |
631 | 631 | 'IE' => array( |
632 | 632 | 'state' => array( |
633 | - 'label' => __( 'County', 'give' ), |
|
633 | + 'label' => __('County', 'give'), |
|
634 | 634 | ), |
635 | 635 | ), |
636 | 636 | 'IS' => array( |
@@ -647,12 +647,12 @@ discard block |
||
647 | 647 | 'IT' => array( |
648 | 648 | 'state' => array( |
649 | 649 | 'required' => true, |
650 | - 'label' => __( 'Province', 'give' ), |
|
650 | + 'label' => __('Province', 'give'), |
|
651 | 651 | ), |
652 | 652 | ), |
653 | 653 | 'JP' => array( |
654 | 654 | 'state' => array( |
655 | - 'label' => __( 'Prefecture', 'give' ), |
|
655 | + 'label' => __('Prefecture', 'give'), |
|
656 | 656 | ), |
657 | 657 | ), |
658 | 658 | 'KR' => array( |
@@ -678,14 +678,14 @@ discard block |
||
678 | 678 | 'NL' => array( |
679 | 679 | 'state' => array( |
680 | 680 | 'required' => false, |
681 | - 'label' => __( 'Province', 'give' ), |
|
681 | + 'label' => __('Province', 'give'), |
|
682 | 682 | 'hidden' => true, |
683 | 683 | ), |
684 | 684 | ), |
685 | 685 | 'NZ' => array( |
686 | 686 | 'state' => array( |
687 | 687 | 'required' => false, |
688 | - 'label' => __( 'Region', 'give' ), |
|
688 | + 'label' => __('Region', 'give'), |
|
689 | 689 | 'hidden' => true, |
690 | 690 | ), |
691 | 691 | ), |
@@ -697,7 +697,7 @@ discard block |
||
697 | 697 | ), |
698 | 698 | 'NP' => array( |
699 | 699 | 'state' => array( |
700 | - 'label' => __( 'State / Zone', 'give' ), |
|
700 | + 'label' => __('State / Zone', 'give'), |
|
701 | 701 | ), |
702 | 702 | ), |
703 | 703 | 'PL' => array( |
@@ -741,12 +741,12 @@ discard block |
||
741 | 741 | ), |
742 | 742 | 'ES' => array( |
743 | 743 | 'state' => array( |
744 | - 'label' => __( 'Province', 'give' ), |
|
744 | + 'label' => __('Province', 'give'), |
|
745 | 745 | ), |
746 | 746 | ), |
747 | 747 | 'LI' => array( |
748 | 748 | 'state' => array( |
749 | - 'label' => __( 'Municipality', 'give' ), |
|
749 | + 'label' => __('Municipality', 'give'), |
|
750 | 750 | 'required' => false, |
751 | 751 | 'hidden' => true, |
752 | 752 | ), |
@@ -764,17 +764,17 @@ discard block |
||
764 | 764 | ), |
765 | 765 | 'TR' => array( |
766 | 766 | 'state' => array( |
767 | - 'label' => __( 'Province', 'give' ), |
|
767 | + 'label' => __('Province', 'give'), |
|
768 | 768 | ), |
769 | 769 | ), |
770 | 770 | 'US' => array( |
771 | 771 | 'state' => array( |
772 | - 'label' => __( 'State', 'give' ), |
|
772 | + 'label' => __('State', 'give'), |
|
773 | 773 | ), |
774 | 774 | ), |
775 | 775 | 'GB' => array( |
776 | 776 | 'state' => array( |
777 | - 'label' => __( 'County', 'give' ), |
|
777 | + 'label' => __('County', 'give'), |
|
778 | 778 | 'required' => false, |
779 | 779 | ), |
780 | 780 | ), |
@@ -791,10 +791,10 @@ discard block |
||
791 | 791 | ), |
792 | 792 | 'ZA' => array( |
793 | 793 | 'state' => array( |
794 | - 'label' => __( 'Province', 'give' ), |
|
794 | + 'label' => __('Province', 'give'), |
|
795 | 795 | ), |
796 | 796 | ), |
797 | - ) ); |
|
797 | + )); |
|
798 | 798 | } |
799 | 799 | |
800 | 800 | /** |
@@ -806,90 +806,90 @@ discard block |
||
806 | 806 | function give_get_turkey_states_list() { |
807 | 807 | $states = array( |
808 | 808 | '' => '', |
809 | - 'TR01' => __( 'Adana', 'give' ), |
|
810 | - 'TR02' => __( 'Adıyaman', 'give' ), |
|
811 | - 'TR03' => __( 'Afyon', 'give' ), |
|
812 | - 'TR04' => __( 'Ağrı', 'give' ), |
|
813 | - 'TR05' => __( 'Amasya', 'give' ), |
|
814 | - 'TR06' => __( 'Ankara', 'give' ), |
|
815 | - 'TR07' => __( 'Antalya', 'give' ), |
|
816 | - 'TR08' => __( 'Artvin', 'give' ), |
|
817 | - 'TR09' => __( 'Aydın', 'give' ), |
|
818 | - 'TR10' => __( 'Balıkesir', 'give' ), |
|
819 | - 'TR11' => __( 'Bilecik', 'give' ), |
|
820 | - 'TR12' => __( 'Bingöl', 'give' ), |
|
821 | - 'TR13' => __( 'Bitlis', 'give' ), |
|
822 | - 'TR14' => __( 'Bolu', 'give' ), |
|
823 | - 'TR15' => __( 'Burdur', 'give' ), |
|
824 | - 'TR16' => __( 'Bursa', 'give' ), |
|
825 | - 'TR17' => __( 'Çanakkale', 'give' ), |
|
826 | - 'TR18' => __( 'Çankırı', 'give' ), |
|
827 | - 'TR19' => __( 'Çorum', 'give' ), |
|
828 | - 'TR20' => __( 'Denizli', 'give' ), |
|
829 | - 'TR21' => __( 'Diyarbakır', 'give' ), |
|
830 | - 'TR22' => __( 'Edirne', 'give' ), |
|
831 | - 'TR23' => __( 'Elazığ', 'give' ), |
|
832 | - 'TR24' => __( 'Erzincan', 'give' ), |
|
833 | - 'TR25' => __( 'Erzurum', 'give' ), |
|
834 | - 'TR26' => __( 'Eskişehir', 'give' ), |
|
835 | - 'TR27' => __( 'Gaziantep', 'give' ), |
|
836 | - 'TR28' => __( 'Giresun', 'give' ), |
|
837 | - 'TR29' => __( 'Gümüşhane', 'give' ), |
|
838 | - 'TR30' => __( 'Hakkari', 'give' ), |
|
839 | - 'TR31' => __( 'Hatay', 'give' ), |
|
840 | - 'TR32' => __( 'Isparta', 'give' ), |
|
841 | - 'TR33' => __( 'İçel', 'give' ), |
|
842 | - 'TR34' => __( 'İstanbul', 'give' ), |
|
843 | - 'TR35' => __( 'İzmir', 'give' ), |
|
844 | - 'TR36' => __( 'Kars', 'give' ), |
|
845 | - 'TR37' => __( 'Kastamonu', 'give' ), |
|
846 | - 'TR38' => __( 'Kayseri', 'give' ), |
|
847 | - 'TR39' => __( 'Kırklareli', 'give' ), |
|
848 | - 'TR40' => __( 'Kırşehir', 'give' ), |
|
849 | - 'TR41' => __( 'Kocaeli', 'give' ), |
|
850 | - 'TR42' => __( 'Konya', 'give' ), |
|
851 | - 'TR43' => __( 'Kütahya', 'give' ), |
|
852 | - 'TR44' => __( 'Malatya', 'give' ), |
|
853 | - 'TR45' => __( 'Manisa', 'give' ), |
|
854 | - 'TR46' => __( 'Kahramanmaraş', 'give' ), |
|
855 | - 'TR47' => __( 'Mardin', 'give' ), |
|
856 | - 'TR48' => __( 'Muğla', 'give' ), |
|
857 | - 'TR49' => __( 'Muş', 'give' ), |
|
858 | - 'TR50' => __( 'Nevşehir', 'give' ), |
|
859 | - 'TR51' => __( 'Niğde', 'give' ), |
|
860 | - 'TR52' => __( 'Ordu', 'give' ), |
|
861 | - 'TR53' => __( 'Rize', 'give' ), |
|
862 | - 'TR54' => __( 'Sakarya', 'give' ), |
|
863 | - 'TR55' => __( 'Samsun', 'give' ), |
|
864 | - 'TR56' => __( 'Siirt', 'give' ), |
|
865 | - 'TR57' => __( 'Sinop', 'give' ), |
|
866 | - 'TR58' => __( 'Sivas', 'give' ), |
|
867 | - 'TR59' => __( 'Tekirdağ', 'give' ), |
|
868 | - 'TR60' => __( 'Tokat', 'give' ), |
|
869 | - 'TR61' => __( 'Trabzon', 'give' ), |
|
870 | - 'TR62' => __( 'Tunceli', 'give' ), |
|
871 | - 'TR63' => __( 'Şanlıurfa', 'give' ), |
|
872 | - 'TR64' => __( 'Uşak', 'give' ), |
|
873 | - 'TR65' => __( 'Van', 'give' ), |
|
874 | - 'TR66' => __( 'Yozgat', 'give' ), |
|
875 | - 'TR67' => __( 'Zonguldak', 'give' ), |
|
876 | - 'TR68' => __( 'Aksaray', 'give' ), |
|
877 | - 'TR69' => __( 'Bayburt', 'give' ), |
|
878 | - 'TR70' => __( 'Karaman', 'give' ), |
|
879 | - 'TR71' => __( 'Kırıkkale', 'give' ), |
|
880 | - 'TR72' => __( 'Batman', 'give' ), |
|
881 | - 'TR73' => __( 'Şırnak', 'give' ), |
|
882 | - 'TR74' => __( 'Bartın', 'give' ), |
|
883 | - 'TR75' => __( 'Ardahan', 'give' ), |
|
884 | - 'TR76' => __( 'Iğdır', 'give' ), |
|
885 | - 'TR77' => __( 'Yalova', 'give' ), |
|
886 | - 'TR78' => __( 'Karabük', 'give' ), |
|
887 | - 'TR79' => __( 'Kilis', 'give' ), |
|
888 | - 'TR80' => __( 'Osmaniye', 'give' ), |
|
889 | - 'TR81' => __( 'Düzce', 'give' ), |
|
809 | + 'TR01' => __('Adana', 'give'), |
|
810 | + 'TR02' => __('Adıyaman', 'give'), |
|
811 | + 'TR03' => __('Afyon', 'give'), |
|
812 | + 'TR04' => __('Ağrı', 'give'), |
|
813 | + 'TR05' => __('Amasya', 'give'), |
|
814 | + 'TR06' => __('Ankara', 'give'), |
|
815 | + 'TR07' => __('Antalya', 'give'), |
|
816 | + 'TR08' => __('Artvin', 'give'), |
|
817 | + 'TR09' => __('Aydın', 'give'), |
|
818 | + 'TR10' => __('Balıkesir', 'give'), |
|
819 | + 'TR11' => __('Bilecik', 'give'), |
|
820 | + 'TR12' => __('Bingöl', 'give'), |
|
821 | + 'TR13' => __('Bitlis', 'give'), |
|
822 | + 'TR14' => __('Bolu', 'give'), |
|
823 | + 'TR15' => __('Burdur', 'give'), |
|
824 | + 'TR16' => __('Bursa', 'give'), |
|
825 | + 'TR17' => __('Çanakkale', 'give'), |
|
826 | + 'TR18' => __('Çankırı', 'give'), |
|
827 | + 'TR19' => __('Çorum', 'give'), |
|
828 | + 'TR20' => __('Denizli', 'give'), |
|
829 | + 'TR21' => __('Diyarbakır', 'give'), |
|
830 | + 'TR22' => __('Edirne', 'give'), |
|
831 | + 'TR23' => __('Elazığ', 'give'), |
|
832 | + 'TR24' => __('Erzincan', 'give'), |
|
833 | + 'TR25' => __('Erzurum', 'give'), |
|
834 | + 'TR26' => __('Eskişehir', 'give'), |
|
835 | + 'TR27' => __('Gaziantep', 'give'), |
|
836 | + 'TR28' => __('Giresun', 'give'), |
|
837 | + 'TR29' => __('Gümüşhane', 'give'), |
|
838 | + 'TR30' => __('Hakkari', 'give'), |
|
839 | + 'TR31' => __('Hatay', 'give'), |
|
840 | + 'TR32' => __('Isparta', 'give'), |
|
841 | + 'TR33' => __('İçel', 'give'), |
|
842 | + 'TR34' => __('İstanbul', 'give'), |
|
843 | + 'TR35' => __('İzmir', 'give'), |
|
844 | + 'TR36' => __('Kars', 'give'), |
|
845 | + 'TR37' => __('Kastamonu', 'give'), |
|
846 | + 'TR38' => __('Kayseri', 'give'), |
|
847 | + 'TR39' => __('Kırklareli', 'give'), |
|
848 | + 'TR40' => __('Kırşehir', 'give'), |
|
849 | + 'TR41' => __('Kocaeli', 'give'), |
|
850 | + 'TR42' => __('Konya', 'give'), |
|
851 | + 'TR43' => __('Kütahya', 'give'), |
|
852 | + 'TR44' => __('Malatya', 'give'), |
|
853 | + 'TR45' => __('Manisa', 'give'), |
|
854 | + 'TR46' => __('Kahramanmaraş', 'give'), |
|
855 | + 'TR47' => __('Mardin', 'give'), |
|
856 | + 'TR48' => __('Muğla', 'give'), |
|
857 | + 'TR49' => __('Muş', 'give'), |
|
858 | + 'TR50' => __('Nevşehir', 'give'), |
|
859 | + 'TR51' => __('Niğde', 'give'), |
|
860 | + 'TR52' => __('Ordu', 'give'), |
|
861 | + 'TR53' => __('Rize', 'give'), |
|
862 | + 'TR54' => __('Sakarya', 'give'), |
|
863 | + 'TR55' => __('Samsun', 'give'), |
|
864 | + 'TR56' => __('Siirt', 'give'), |
|
865 | + 'TR57' => __('Sinop', 'give'), |
|
866 | + 'TR58' => __('Sivas', 'give'), |
|
867 | + 'TR59' => __('Tekirdağ', 'give'), |
|
868 | + 'TR60' => __('Tokat', 'give'), |
|
869 | + 'TR61' => __('Trabzon', 'give'), |
|
870 | + 'TR62' => __('Tunceli', 'give'), |
|
871 | + 'TR63' => __('Şanlıurfa', 'give'), |
|
872 | + 'TR64' => __('Uşak', 'give'), |
|
873 | + 'TR65' => __('Van', 'give'), |
|
874 | + 'TR66' => __('Yozgat', 'give'), |
|
875 | + 'TR67' => __('Zonguldak', 'give'), |
|
876 | + 'TR68' => __('Aksaray', 'give'), |
|
877 | + 'TR69' => __('Bayburt', 'give'), |
|
878 | + 'TR70' => __('Karaman', 'give'), |
|
879 | + 'TR71' => __('Kırıkkale', 'give'), |
|
880 | + 'TR72' => __('Batman', 'give'), |
|
881 | + 'TR73' => __('Şırnak', 'give'), |
|
882 | + 'TR74' => __('Bartın', 'give'), |
|
883 | + 'TR75' => __('Ardahan', 'give'), |
|
884 | + 'TR76' => __('Iğdır', 'give'), |
|
885 | + 'TR77' => __('Yalova', 'give'), |
|
886 | + 'TR78' => __('Karabük', 'give'), |
|
887 | + 'TR79' => __('Kilis', 'give'), |
|
888 | + 'TR80' => __('Osmaniye', 'give'), |
|
889 | + 'TR81' => __('Düzce', 'give'), |
|
890 | 890 | ); |
891 | 891 | |
892 | - return apply_filters( 'give_turkey_states', $states ); |
|
892 | + return apply_filters('give_turkey_states', $states); |
|
893 | 893 | } |
894 | 894 | |
895 | 895 | /** |
@@ -901,51 +901,51 @@ discard block |
||
901 | 901 | function give_get_romania_states_list() { |
902 | 902 | $states = array( |
903 | 903 | '' => '', |
904 | - 'AB' => __( 'Alba', 'give' ), |
|
905 | - 'AR' => __( 'Arad', 'give' ), |
|
906 | - 'AG' => __( 'Arges', 'give' ), |
|
907 | - 'BC' => __( 'Bacau', 'give' ), |
|
908 | - 'BH' => __( 'Bihor', 'give' ), |
|
909 | - 'BN' => __( 'Bistrita-Nasaud', 'give' ), |
|
910 | - 'BT' => __( 'Botosani', 'give' ), |
|
911 | - 'BR' => __( 'Braila', 'give' ), |
|
912 | - 'BV' => __( 'Brasov', 'give' ), |
|
913 | - 'B' => __( 'Bucuresti', 'give' ), |
|
914 | - 'BZ' => __( 'Buzau', 'give' ), |
|
915 | - 'CL' => __( 'Calarasi', 'give' ), |
|
916 | - 'CS' => __( 'Caras-Severin', 'give' ), |
|
917 | - 'CJ' => __( 'Cluj', 'give' ), |
|
918 | - 'CT' => __( 'Constanta', 'give' ), |
|
919 | - 'CV' => __( 'Covasna', 'give' ), |
|
920 | - 'DB' => __( 'Dambovita', 'give' ), |
|
921 | - 'DJ' => __( 'Dolj', 'give' ), |
|
922 | - 'GL' => __( 'Galati', 'give' ), |
|
923 | - 'GR' => __( 'Giurgiu', 'give' ), |
|
924 | - 'GJ' => __( 'Gorj', 'give' ), |
|
925 | - 'HR' => __( 'Harghita', 'give' ), |
|
926 | - 'HD' => __( 'Hunedoara', 'give' ), |
|
927 | - 'IL' => __( 'Ialomita', 'give' ), |
|
928 | - 'IS' => __( 'Iasi', 'give' ), |
|
929 | - 'IF' => __( 'Ilfov', 'give' ), |
|
930 | - 'MM' => __( 'Maramures', 'give' ), |
|
931 | - 'MH' => __( 'Mehedinti', 'give' ), |
|
932 | - 'MS' => __( 'Mures', 'give' ), |
|
933 | - 'NT' => __( 'Neamt', 'give' ), |
|
934 | - 'OT' => __( 'Olt', 'give' ), |
|
935 | - 'PH' => __( 'Prahova', 'give' ), |
|
936 | - 'SJ' => __( 'Salaj', 'give' ), |
|
937 | - 'SM' => __( 'Satu Mare', 'give' ), |
|
938 | - 'SB' => __( 'Sibiu', 'give' ), |
|
939 | - 'SV' => __( 'Suceava', 'give' ), |
|
940 | - 'TR' => __( 'Teleorman', 'give' ), |
|
941 | - 'TM' => __( 'Timis', 'give' ), |
|
942 | - 'TL' => __( 'Tulcea', 'give' ), |
|
943 | - 'VL' => __( 'Valcea', 'give' ), |
|
944 | - 'VS' => __( 'Vaslui', 'give' ), |
|
945 | - 'VN' => __( 'Vrancea', 'give' ), |
|
904 | + 'AB' => __('Alba', 'give'), |
|
905 | + 'AR' => __('Arad', 'give'), |
|
906 | + 'AG' => __('Arges', 'give'), |
|
907 | + 'BC' => __('Bacau', 'give'), |
|
908 | + 'BH' => __('Bihor', 'give'), |
|
909 | + 'BN' => __('Bistrita-Nasaud', 'give'), |
|
910 | + 'BT' => __('Botosani', 'give'), |
|
911 | + 'BR' => __('Braila', 'give'), |
|
912 | + 'BV' => __('Brasov', 'give'), |
|
913 | + 'B' => __('Bucuresti', 'give'), |
|
914 | + 'BZ' => __('Buzau', 'give'), |
|
915 | + 'CL' => __('Calarasi', 'give'), |
|
916 | + 'CS' => __('Caras-Severin', 'give'), |
|
917 | + 'CJ' => __('Cluj', 'give'), |
|
918 | + 'CT' => __('Constanta', 'give'), |
|
919 | + 'CV' => __('Covasna', 'give'), |
|
920 | + 'DB' => __('Dambovita', 'give'), |
|
921 | + 'DJ' => __('Dolj', 'give'), |
|
922 | + 'GL' => __('Galati', 'give'), |
|
923 | + 'GR' => __('Giurgiu', 'give'), |
|
924 | + 'GJ' => __('Gorj', 'give'), |
|
925 | + 'HR' => __('Harghita', 'give'), |
|
926 | + 'HD' => __('Hunedoara', 'give'), |
|
927 | + 'IL' => __('Ialomita', 'give'), |
|
928 | + 'IS' => __('Iasi', 'give'), |
|
929 | + 'IF' => __('Ilfov', 'give'), |
|
930 | + 'MM' => __('Maramures', 'give'), |
|
931 | + 'MH' => __('Mehedinti', 'give'), |
|
932 | + 'MS' => __('Mures', 'give'), |
|
933 | + 'NT' => __('Neamt', 'give'), |
|
934 | + 'OT' => __('Olt', 'give'), |
|
935 | + 'PH' => __('Prahova', 'give'), |
|
936 | + 'SJ' => __('Salaj', 'give'), |
|
937 | + 'SM' => __('Satu Mare', 'give'), |
|
938 | + 'SB' => __('Sibiu', 'give'), |
|
939 | + 'SV' => __('Suceava', 'give'), |
|
940 | + 'TR' => __('Teleorman', 'give'), |
|
941 | + 'TM' => __('Timis', 'give'), |
|
942 | + 'TL' => __('Tulcea', 'give'), |
|
943 | + 'VL' => __('Valcea', 'give'), |
|
944 | + 'VS' => __('Vaslui', 'give'), |
|
945 | + 'VN' => __('Vrancea', 'give'), |
|
946 | 946 | ); |
947 | 947 | |
948 | - return apply_filters( 'give_romania_states', $states ); |
|
948 | + return apply_filters('give_romania_states', $states); |
|
949 | 949 | } |
950 | 950 | |
951 | 951 | /** |
@@ -957,17 +957,17 @@ discard block |
||
957 | 957 | function give_get_pakistan_states_list() { |
958 | 958 | $states = array( |
959 | 959 | '' => '', |
960 | - 'JK' => __( 'Azad Kashmir', 'give' ), |
|
961 | - 'BA' => __( 'Balochistan', 'give' ), |
|
962 | - 'TA' => __( 'FATA', 'give' ), |
|
963 | - 'GB' => __( 'Gilgit Baltistan', 'give' ), |
|
964 | - 'IS' => __( 'Islamabad Capital Territory', 'give' ), |
|
965 | - 'KP' => __( 'Khyber Pakhtunkhwa', 'give' ), |
|
966 | - 'PB' => __( 'Punjab', 'give' ), |
|
967 | - 'SD' => __( 'Sindh', 'give' ), |
|
960 | + 'JK' => __('Azad Kashmir', 'give'), |
|
961 | + 'BA' => __('Balochistan', 'give'), |
|
962 | + 'TA' => __('FATA', 'give'), |
|
963 | + 'GB' => __('Gilgit Baltistan', 'give'), |
|
964 | + 'IS' => __('Islamabad Capital Territory', 'give'), |
|
965 | + 'KP' => __('Khyber Pakhtunkhwa', 'give'), |
|
966 | + 'PB' => __('Punjab', 'give'), |
|
967 | + 'SD' => __('Sindh', 'give'), |
|
968 | 968 | ); |
969 | 969 | |
970 | - return apply_filters( 'give_pakistan_states', $states ); |
|
970 | + return apply_filters('give_pakistan_states', $states); |
|
971 | 971 | } |
972 | 972 | |
973 | 973 | /** |
@@ -979,91 +979,91 @@ discard block |
||
979 | 979 | function give_get_philippines_states_list() { |
980 | 980 | $states = array( |
981 | 981 | '' => '', |
982 | - 'ABR' => __( 'Abra', 'give' ), |
|
983 | - 'AGN' => __( 'Agusan del Norte', 'give' ), |
|
984 | - 'AGS' => __( 'Agusan del Sur', 'give' ), |
|
985 | - 'AKL' => __( 'Aklan', 'give' ), |
|
986 | - 'ALB' => __( 'Albay', 'give' ), |
|
987 | - 'ANT' => __( 'Antique', 'give' ), |
|
988 | - 'APA' => __( 'Apayao', 'give' ), |
|
989 | - 'AUR' => __( 'Aurora', 'give' ), |
|
990 | - 'BAS' => __( 'Basilan', 'give' ), |
|
991 | - 'BAN' => __( 'Bataan', 'give' ), |
|
992 | - 'BTN' => __( 'Batanes', 'give' ), |
|
993 | - 'BTG' => __( 'Batangas', 'give' ), |
|
994 | - 'BEN' => __( 'Benguet', 'give' ), |
|
995 | - 'BIL' => __( 'Biliran', 'give' ), |
|
996 | - 'BOH' => __( 'Bohol', 'give' ), |
|
997 | - 'BUK' => __( 'Bukidnon', 'give' ), |
|
998 | - 'BUL' => __( 'Bulacan', 'give' ), |
|
999 | - 'CAG' => __( 'Cagayan', 'give' ), |
|
1000 | - 'CAN' => __( 'Camarines Norte', 'give' ), |
|
1001 | - 'CAS' => __( 'Camarines Sur', 'give' ), |
|
1002 | - 'CAM' => __( 'Camiguin', 'give' ), |
|
1003 | - 'CAP' => __( 'Capiz', 'give' ), |
|
1004 | - 'CAT' => __( 'Catanduanes', 'give' ), |
|
1005 | - 'CAV' => __( 'Cavite', 'give' ), |
|
1006 | - 'CEB' => __( 'Cebu', 'give' ), |
|
1007 | - 'COM' => __( 'Compostela Valley', 'give' ), |
|
1008 | - 'NCO' => __( 'Cotabato', 'give' ), |
|
1009 | - 'DAV' => __( 'Davao del Norte', 'give' ), |
|
1010 | - 'DAS' => __( 'Davao del Sur', 'give' ), |
|
1011 | - 'DAC' => __( 'Davao Occidental', 'give' ), // TODO: Needs to be updated when ISO code is assigned |
|
1012 | - 'DAO' => __( 'Davao Oriental', 'give' ), |
|
1013 | - 'DIN' => __( 'Dinagat Islands', 'give' ), |
|
1014 | - 'EAS' => __( 'Eastern Samar', 'give' ), |
|
1015 | - 'GUI' => __( 'Guimaras', 'give' ), |
|
1016 | - 'IFU' => __( 'Ifugao', 'give' ), |
|
1017 | - 'ILN' => __( 'Ilocos Norte', 'give' ), |
|
1018 | - 'ILS' => __( 'Ilocos Sur', 'give' ), |
|
1019 | - 'ILI' => __( 'Iloilo', 'give' ), |
|
1020 | - 'ISA' => __( 'Isabela', 'give' ), |
|
1021 | - 'KAL' => __( 'Kalinga', 'give' ), |
|
1022 | - 'LUN' => __( 'La Union', 'give' ), |
|
1023 | - 'LAG' => __( 'Laguna', 'give' ), |
|
1024 | - 'LAN' => __( 'Lanao del Norte', 'give' ), |
|
1025 | - 'LAS' => __( 'Lanao del Sur', 'give' ), |
|
1026 | - 'LEY' => __( 'Leyte', 'give' ), |
|
1027 | - 'MAG' => __( 'Maguindanao', 'give' ), |
|
1028 | - 'MAD' => __( 'Marinduque', 'give' ), |
|
1029 | - 'MAS' => __( 'Masbate', 'give' ), |
|
1030 | - 'MSC' => __( 'Misamis Occidental', 'give' ), |
|
1031 | - 'MSR' => __( 'Misamis Oriental', 'give' ), |
|
1032 | - 'MOU' => __( 'Mountain Province', 'give' ), |
|
1033 | - 'NEC' => __( 'Negros Occidental', 'give' ), |
|
1034 | - 'NER' => __( 'Negros Oriental', 'give' ), |
|
1035 | - 'NSA' => __( 'Northern Samar', 'give' ), |
|
1036 | - 'NUE' => __( 'Nueva Ecija', 'give' ), |
|
1037 | - 'NUV' => __( 'Nueva Vizcaya', 'give' ), |
|
1038 | - 'MDC' => __( 'Occidental Mindoro', 'give' ), |
|
1039 | - 'MDR' => __( 'Oriental Mindoro', 'give' ), |
|
1040 | - 'PLW' => __( 'Palawan', 'give' ), |
|
1041 | - 'PAM' => __( 'Pampanga', 'give' ), |
|
1042 | - 'PAN' => __( 'Pangasinan', 'give' ), |
|
1043 | - 'QUE' => __( 'Quezon', 'give' ), |
|
1044 | - 'QUI' => __( 'Quirino', 'give' ), |
|
1045 | - 'RIZ' => __( 'Rizal', 'give' ), |
|
1046 | - 'ROM' => __( 'Romblon', 'give' ), |
|
1047 | - 'WSA' => __( 'Samar', 'give' ), |
|
1048 | - 'SAR' => __( 'Sarangani', 'give' ), |
|
1049 | - 'SIQ' => __( 'Siquijor', 'give' ), |
|
1050 | - 'SOR' => __( 'Sorsogon', 'give' ), |
|
1051 | - 'SCO' => __( 'South Cotabato', 'give' ), |
|
1052 | - 'SLE' => __( 'Southern Leyte', 'give' ), |
|
1053 | - 'SUK' => __( 'Sultan Kudarat', 'give' ), |
|
1054 | - 'SLU' => __( 'Sulu', 'give' ), |
|
1055 | - 'SUN' => __( 'Surigao del Norte', 'give' ), |
|
1056 | - 'SUR' => __( 'Surigao del Sur', 'give' ), |
|
1057 | - 'TAR' => __( 'Tarlac', 'give' ), |
|
1058 | - 'TAW' => __( 'Tawi-Tawi', 'give' ), |
|
1059 | - 'ZMB' => __( 'Zambales', 'give' ), |
|
1060 | - 'ZAN' => __( 'Zamboanga del Norte', 'give' ), |
|
1061 | - 'ZAS' => __( 'Zamboanga del Sur', 'give' ), |
|
1062 | - 'ZSI' => __( 'Zamboanga Sibugay', 'give' ), |
|
1063 | - '00' => __( 'Metro Manila', 'give' ), |
|
982 | + 'ABR' => __('Abra', 'give'), |
|
983 | + 'AGN' => __('Agusan del Norte', 'give'), |
|
984 | + 'AGS' => __('Agusan del Sur', 'give'), |
|
985 | + 'AKL' => __('Aklan', 'give'), |
|
986 | + 'ALB' => __('Albay', 'give'), |
|
987 | + 'ANT' => __('Antique', 'give'), |
|
988 | + 'APA' => __('Apayao', 'give'), |
|
989 | + 'AUR' => __('Aurora', 'give'), |
|
990 | + 'BAS' => __('Basilan', 'give'), |
|
991 | + 'BAN' => __('Bataan', 'give'), |
|
992 | + 'BTN' => __('Batanes', 'give'), |
|
993 | + 'BTG' => __('Batangas', 'give'), |
|
994 | + 'BEN' => __('Benguet', 'give'), |
|
995 | + 'BIL' => __('Biliran', 'give'), |
|
996 | + 'BOH' => __('Bohol', 'give'), |
|
997 | + 'BUK' => __('Bukidnon', 'give'), |
|
998 | + 'BUL' => __('Bulacan', 'give'), |
|
999 | + 'CAG' => __('Cagayan', 'give'), |
|
1000 | + 'CAN' => __('Camarines Norte', 'give'), |
|
1001 | + 'CAS' => __('Camarines Sur', 'give'), |
|
1002 | + 'CAM' => __('Camiguin', 'give'), |
|
1003 | + 'CAP' => __('Capiz', 'give'), |
|
1004 | + 'CAT' => __('Catanduanes', 'give'), |
|
1005 | + 'CAV' => __('Cavite', 'give'), |
|
1006 | + 'CEB' => __('Cebu', 'give'), |
|
1007 | + 'COM' => __('Compostela Valley', 'give'), |
|
1008 | + 'NCO' => __('Cotabato', 'give'), |
|
1009 | + 'DAV' => __('Davao del Norte', 'give'), |
|
1010 | + 'DAS' => __('Davao del Sur', 'give'), |
|
1011 | + 'DAC' => __('Davao Occidental', 'give'), // TODO: Needs to be updated when ISO code is assigned |
|
1012 | + 'DAO' => __('Davao Oriental', 'give'), |
|
1013 | + 'DIN' => __('Dinagat Islands', 'give'), |
|
1014 | + 'EAS' => __('Eastern Samar', 'give'), |
|
1015 | + 'GUI' => __('Guimaras', 'give'), |
|
1016 | + 'IFU' => __('Ifugao', 'give'), |
|
1017 | + 'ILN' => __('Ilocos Norte', 'give'), |
|
1018 | + 'ILS' => __('Ilocos Sur', 'give'), |
|
1019 | + 'ILI' => __('Iloilo', 'give'), |
|
1020 | + 'ISA' => __('Isabela', 'give'), |
|
1021 | + 'KAL' => __('Kalinga', 'give'), |
|
1022 | + 'LUN' => __('La Union', 'give'), |
|
1023 | + 'LAG' => __('Laguna', 'give'), |
|
1024 | + 'LAN' => __('Lanao del Norte', 'give'), |
|
1025 | + 'LAS' => __('Lanao del Sur', 'give'), |
|
1026 | + 'LEY' => __('Leyte', 'give'), |
|
1027 | + 'MAG' => __('Maguindanao', 'give'), |
|
1028 | + 'MAD' => __('Marinduque', 'give'), |
|
1029 | + 'MAS' => __('Masbate', 'give'), |
|
1030 | + 'MSC' => __('Misamis Occidental', 'give'), |
|
1031 | + 'MSR' => __('Misamis Oriental', 'give'), |
|
1032 | + 'MOU' => __('Mountain Province', 'give'), |
|
1033 | + 'NEC' => __('Negros Occidental', 'give'), |
|
1034 | + 'NER' => __('Negros Oriental', 'give'), |
|
1035 | + 'NSA' => __('Northern Samar', 'give'), |
|
1036 | + 'NUE' => __('Nueva Ecija', 'give'), |
|
1037 | + 'NUV' => __('Nueva Vizcaya', 'give'), |
|
1038 | + 'MDC' => __('Occidental Mindoro', 'give'), |
|
1039 | + 'MDR' => __('Oriental Mindoro', 'give'), |
|
1040 | + 'PLW' => __('Palawan', 'give'), |
|
1041 | + 'PAM' => __('Pampanga', 'give'), |
|
1042 | + 'PAN' => __('Pangasinan', 'give'), |
|
1043 | + 'QUE' => __('Quezon', 'give'), |
|
1044 | + 'QUI' => __('Quirino', 'give'), |
|
1045 | + 'RIZ' => __('Rizal', 'give'), |
|
1046 | + 'ROM' => __('Romblon', 'give'), |
|
1047 | + 'WSA' => __('Samar', 'give'), |
|
1048 | + 'SAR' => __('Sarangani', 'give'), |
|
1049 | + 'SIQ' => __('Siquijor', 'give'), |
|
1050 | + 'SOR' => __('Sorsogon', 'give'), |
|
1051 | + 'SCO' => __('South Cotabato', 'give'), |
|
1052 | + 'SLE' => __('Southern Leyte', 'give'), |
|
1053 | + 'SUK' => __('Sultan Kudarat', 'give'), |
|
1054 | + 'SLU' => __('Sulu', 'give'), |
|
1055 | + 'SUN' => __('Surigao del Norte', 'give'), |
|
1056 | + 'SUR' => __('Surigao del Sur', 'give'), |
|
1057 | + 'TAR' => __('Tarlac', 'give'), |
|
1058 | + 'TAW' => __('Tawi-Tawi', 'give'), |
|
1059 | + 'ZMB' => __('Zambales', 'give'), |
|
1060 | + 'ZAN' => __('Zamboanga del Norte', 'give'), |
|
1061 | + 'ZAS' => __('Zamboanga del Sur', 'give'), |
|
1062 | + 'ZSI' => __('Zamboanga Sibugay', 'give'), |
|
1063 | + '00' => __('Metro Manila', 'give'), |
|
1064 | 1064 | ); |
1065 | 1065 | |
1066 | - return apply_filters( 'give_philippines_states', $states ); |
|
1066 | + return apply_filters('give_philippines_states', $states); |
|
1067 | 1067 | } |
1068 | 1068 | |
1069 | 1069 | /** |
@@ -1075,35 +1075,35 @@ discard block |
||
1075 | 1075 | function give_get_peru_states_list() { |
1076 | 1076 | $states = array( |
1077 | 1077 | '' => '', |
1078 | - 'CAL' => __( 'El Callao', 'give' ), |
|
1079 | - 'LMA' => __( 'Municipalidad Metropolitana de Lima', 'give' ), |
|
1080 | - 'AMA' => __( 'Amazonas', 'give' ), |
|
1081 | - 'ANC' => __( 'Ancash', 'give' ), |
|
1082 | - 'APU' => __( 'Apurímac', 'give' ), |
|
1083 | - 'ARE' => __( 'Arequipa', 'give' ), |
|
1084 | - 'AYA' => __( 'Ayacucho', 'give' ), |
|
1085 | - 'CAJ' => __( 'Cajamarca', 'give' ), |
|
1086 | - 'CUS' => __( 'Cusco', 'give' ), |
|
1087 | - 'HUV' => __( 'Huancavelica', 'give' ), |
|
1088 | - 'HUC' => __( 'Huánuco', 'give' ), |
|
1089 | - 'ICA' => __( 'Ica', 'give' ), |
|
1090 | - 'JUN' => __( 'Junín', 'give' ), |
|
1091 | - 'LAL' => __( 'La Libertad', 'give' ), |
|
1092 | - 'LAM' => __( 'Lambayeque', 'give' ), |
|
1093 | - 'LIM' => __( 'Lima', 'give' ), |
|
1094 | - 'LOR' => __( 'Loreto', 'give' ), |
|
1095 | - 'MDD' => __( 'Madre de Dios', 'give' ), |
|
1096 | - 'MOQ' => __( 'Moquegua', 'give' ), |
|
1097 | - 'PAS' => __( 'Pasco', 'give' ), |
|
1098 | - 'PIU' => __( 'Piura', 'give' ), |
|
1099 | - 'PUN' => __( 'Puno', 'give' ), |
|
1100 | - 'SAM' => __( 'San Martín', 'give' ), |
|
1101 | - 'TAC' => __( 'Tacna', 'give' ), |
|
1102 | - 'TUM' => __( 'Tumbes', 'give' ), |
|
1103 | - 'UCA' => __( 'Ucayali', 'give' ), |
|
1078 | + 'CAL' => __('El Callao', 'give'), |
|
1079 | + 'LMA' => __('Municipalidad Metropolitana de Lima', 'give'), |
|
1080 | + 'AMA' => __('Amazonas', 'give'), |
|
1081 | + 'ANC' => __('Ancash', 'give'), |
|
1082 | + 'APU' => __('Apurímac', 'give'), |
|
1083 | + 'ARE' => __('Arequipa', 'give'), |
|
1084 | + 'AYA' => __('Ayacucho', 'give'), |
|
1085 | + 'CAJ' => __('Cajamarca', 'give'), |
|
1086 | + 'CUS' => __('Cusco', 'give'), |
|
1087 | + 'HUV' => __('Huancavelica', 'give'), |
|
1088 | + 'HUC' => __('Huánuco', 'give'), |
|
1089 | + 'ICA' => __('Ica', 'give'), |
|
1090 | + 'JUN' => __('Junín', 'give'), |
|
1091 | + 'LAL' => __('La Libertad', 'give'), |
|
1092 | + 'LAM' => __('Lambayeque', 'give'), |
|
1093 | + 'LIM' => __('Lima', 'give'), |
|
1094 | + 'LOR' => __('Loreto', 'give'), |
|
1095 | + 'MDD' => __('Madre de Dios', 'give'), |
|
1096 | + 'MOQ' => __('Moquegua', 'give'), |
|
1097 | + 'PAS' => __('Pasco', 'give'), |
|
1098 | + 'PIU' => __('Piura', 'give'), |
|
1099 | + 'PUN' => __('Puno', 'give'), |
|
1100 | + 'SAM' => __('San Martín', 'give'), |
|
1101 | + 'TAC' => __('Tacna', 'give'), |
|
1102 | + 'TUM' => __('Tumbes', 'give'), |
|
1103 | + 'UCA' => __('Ucayali', 'give'), |
|
1104 | 1104 | ); |
1105 | 1105 | |
1106 | - return apply_filters( 'give_peru_states', $states ); |
|
1106 | + return apply_filters('give_peru_states', $states); |
|
1107 | 1107 | } |
1108 | 1108 | |
1109 | 1109 | /** |
@@ -1115,23 +1115,23 @@ discard block |
||
1115 | 1115 | function give_get_nepal_states_list() { |
1116 | 1116 | $states = array( |
1117 | 1117 | '' => '', |
1118 | - 'BAG' => __( 'Bagmati', 'give' ), |
|
1119 | - 'BHE' => __( 'Bheri', 'give' ), |
|
1120 | - 'DHA' => __( 'Dhaulagiri', 'give' ), |
|
1121 | - 'GAN' => __( 'Gandaki', 'give' ), |
|
1122 | - 'JAN' => __( 'Janakpur', 'give' ), |
|
1123 | - 'KAR' => __( 'Karnali', 'give' ), |
|
1124 | - 'KOS' => __( 'Koshi', 'give' ), |
|
1125 | - 'LUM' => __( 'Lumbini', 'give' ), |
|
1126 | - 'MAH' => __( 'Mahakali', 'give' ), |
|
1127 | - 'MEC' => __( 'Mechi', 'give' ), |
|
1128 | - 'NAR' => __( 'Narayani', 'give' ), |
|
1129 | - 'RAP' => __( 'Rapti', 'give' ), |
|
1130 | - 'SAG' => __( 'Sagarmatha', 'give' ), |
|
1131 | - 'SET' => __( 'Seti', 'give' ), |
|
1118 | + 'BAG' => __('Bagmati', 'give'), |
|
1119 | + 'BHE' => __('Bheri', 'give'), |
|
1120 | + 'DHA' => __('Dhaulagiri', 'give'), |
|
1121 | + 'GAN' => __('Gandaki', 'give'), |
|
1122 | + 'JAN' => __('Janakpur', 'give'), |
|
1123 | + 'KAR' => __('Karnali', 'give'), |
|
1124 | + 'KOS' => __('Koshi', 'give'), |
|
1125 | + 'LUM' => __('Lumbini', 'give'), |
|
1126 | + 'MAH' => __('Mahakali', 'give'), |
|
1127 | + 'MEC' => __('Mechi', 'give'), |
|
1128 | + 'NAR' => __('Narayani', 'give'), |
|
1129 | + 'RAP' => __('Rapti', 'give'), |
|
1130 | + 'SAG' => __('Sagarmatha', 'give'), |
|
1131 | + 'SET' => __('Seti', 'give'), |
|
1132 | 1132 | ); |
1133 | 1133 | |
1134 | - return apply_filters( 'give_nepal_states', $states ); |
|
1134 | + return apply_filters('give_nepal_states', $states); |
|
1135 | 1135 | } |
1136 | 1136 | |
1137 | 1137 | /** |
@@ -1143,46 +1143,46 @@ discard block |
||
1143 | 1143 | function give_get_nigerian_states_list() { |
1144 | 1144 | $states = array( |
1145 | 1145 | '' => '', |
1146 | - 'AB' => __( 'Abia', 'give' ), |
|
1147 | - 'FC' => __( 'Abuja', 'give' ), |
|
1148 | - 'AD' => __( 'Adamawa', 'give' ), |
|
1149 | - 'AK' => __( 'Akwa Ibom', 'give' ), |
|
1150 | - 'AN' => __( 'Anambra', 'give' ), |
|
1151 | - 'BA' => __( 'Bauchi', 'give' ), |
|
1152 | - 'BY' => __( 'Bayelsa', 'give' ), |
|
1153 | - 'BE' => __( 'Benue', 'give' ), |
|
1154 | - 'BO' => __( 'Borno', 'give' ), |
|
1155 | - 'CR' => __( 'Cross River', 'give' ), |
|
1156 | - 'DE' => __( 'Delta', 'give' ), |
|
1157 | - 'EB' => __( 'Ebonyi', 'give' ), |
|
1158 | - 'ED' => __( 'Edo', 'give' ), |
|
1159 | - 'EK' => __( 'Ekiti', 'give' ), |
|
1160 | - 'EN' => __( 'Enugu', 'give' ), |
|
1161 | - 'GO' => __( 'Gombe', 'give' ), |
|
1162 | - 'IM' => __( 'Imo', 'give' ), |
|
1163 | - 'JI' => __( 'Jigawa', 'give' ), |
|
1164 | - 'KD' => __( 'Kaduna', 'give' ), |
|
1165 | - 'KN' => __( 'Kano', 'give' ), |
|
1166 | - 'KT' => __( 'Katsina', 'give' ), |
|
1167 | - 'KE' => __( 'Kebbi', 'give' ), |
|
1168 | - 'KO' => __( 'Kogi', 'give' ), |
|
1169 | - 'KW' => __( 'Kwara', 'give' ), |
|
1170 | - 'LA' => __( 'Lagos', 'give' ), |
|
1171 | - 'NA' => __( 'Nasarawa', 'give' ), |
|
1172 | - 'NI' => __( 'Niger', 'give' ), |
|
1173 | - 'OG' => __( 'Ogun', 'give' ), |
|
1174 | - 'ON' => __( 'Ondo', 'give' ), |
|
1175 | - 'OS' => __( 'Osun', 'give' ), |
|
1176 | - 'OY' => __( 'Oyo', 'give' ), |
|
1177 | - 'PL' => __( 'Plateau', 'give' ), |
|
1178 | - 'RI' => __( 'Rivers', 'give' ), |
|
1179 | - 'SO' => __( 'Sokoto', 'give' ), |
|
1180 | - 'TA' => __( 'Taraba', 'give' ), |
|
1181 | - 'YO' => __( 'Yobe', 'give' ), |
|
1182 | - 'ZA' => __( 'Zamfara', 'give' ), |
|
1146 | + 'AB' => __('Abia', 'give'), |
|
1147 | + 'FC' => __('Abuja', 'give'), |
|
1148 | + 'AD' => __('Adamawa', 'give'), |
|
1149 | + 'AK' => __('Akwa Ibom', 'give'), |
|
1150 | + 'AN' => __('Anambra', 'give'), |
|
1151 | + 'BA' => __('Bauchi', 'give'), |
|
1152 | + 'BY' => __('Bayelsa', 'give'), |
|
1153 | + 'BE' => __('Benue', 'give'), |
|
1154 | + 'BO' => __('Borno', 'give'), |
|
1155 | + 'CR' => __('Cross River', 'give'), |
|
1156 | + 'DE' => __('Delta', 'give'), |
|
1157 | + 'EB' => __('Ebonyi', 'give'), |
|
1158 | + 'ED' => __('Edo', 'give'), |
|
1159 | + 'EK' => __('Ekiti', 'give'), |
|
1160 | + 'EN' => __('Enugu', 'give'), |
|
1161 | + 'GO' => __('Gombe', 'give'), |
|
1162 | + 'IM' => __('Imo', 'give'), |
|
1163 | + 'JI' => __('Jigawa', 'give'), |
|
1164 | + 'KD' => __('Kaduna', 'give'), |
|
1165 | + 'KN' => __('Kano', 'give'), |
|
1166 | + 'KT' => __('Katsina', 'give'), |
|
1167 | + 'KE' => __('Kebbi', 'give'), |
|
1168 | + 'KO' => __('Kogi', 'give'), |
|
1169 | + 'KW' => __('Kwara', 'give'), |
|
1170 | + 'LA' => __('Lagos', 'give'), |
|
1171 | + 'NA' => __('Nasarawa', 'give'), |
|
1172 | + 'NI' => __('Niger', 'give'), |
|
1173 | + 'OG' => __('Ogun', 'give'), |
|
1174 | + 'ON' => __('Ondo', 'give'), |
|
1175 | + 'OS' => __('Osun', 'give'), |
|
1176 | + 'OY' => __('Oyo', 'give'), |
|
1177 | + 'PL' => __('Plateau', 'give'), |
|
1178 | + 'RI' => __('Rivers', 'give'), |
|
1179 | + 'SO' => __('Sokoto', 'give'), |
|
1180 | + 'TA' => __('Taraba', 'give'), |
|
1181 | + 'YO' => __('Yobe', 'give'), |
|
1182 | + 'ZA' => __('Zamfara', 'give'), |
|
1183 | 1183 | ); |
1184 | 1184 | |
1185 | - return apply_filters( 'give_nigerian_states', $states ); |
|
1185 | + return apply_filters('give_nigerian_states', $states); |
|
1186 | 1186 | } |
1187 | 1187 | |
1188 | 1188 | /** |
@@ -1194,41 +1194,41 @@ discard block |
||
1194 | 1194 | function give_get_mexico_states_list() { |
1195 | 1195 | $states = array( |
1196 | 1196 | '' => '', |
1197 | - 'Distrito Federal' => __( 'Distrito Federal', 'give' ), |
|
1198 | - 'Jalisco' => __( 'Jalisco', 'give' ), |
|
1199 | - 'Nuevo Leon' => __( 'Nuevo León', 'give' ), |
|
1200 | - 'Aguascalientes' => __( 'Aguascalientes', 'give' ), |
|
1201 | - 'Baja California' => __( 'Baja California', 'give' ), |
|
1202 | - 'Baja California Sur' => __( 'Baja California Sur', 'give' ), |
|
1203 | - 'Campeche' => __( 'Campeche', 'give' ), |
|
1204 | - 'Chiapas' => __( 'Chiapas', 'give' ), |
|
1205 | - 'Chihuahua' => __( 'Chihuahua', 'give' ), |
|
1206 | - 'Coahuila' => __( 'Coahuila', 'give' ), |
|
1207 | - 'Colima' => __( 'Colima', 'give' ), |
|
1208 | - 'Durango' => __( 'Durango', 'give' ), |
|
1209 | - 'Guanajuato' => __( 'Guanajuato', 'give' ), |
|
1210 | - 'Guerrero' => __( 'Guerrero', 'give' ), |
|
1211 | - 'Hidalgo' => __( 'Hidalgo', 'give' ), |
|
1212 | - 'Estado de Mexico' => __( 'Edo. de México', 'give' ), |
|
1213 | - 'Michoacan' => __( 'Michoacán', 'give' ), |
|
1214 | - 'Morelos' => __( 'Morelos', 'give' ), |
|
1215 | - 'Nayarit' => __( 'Nayarit', 'give' ), |
|
1216 | - 'Oaxaca' => __( 'Oaxaca', 'give' ), |
|
1217 | - 'Puebla' => __( 'Puebla', 'give' ), |
|
1218 | - 'Queretaro' => __( 'Querétaro', 'give' ), |
|
1219 | - 'Quintana Roo' => __( 'Quintana Roo', 'give' ), |
|
1220 | - 'San Luis Potosi' => __( 'San Luis Potosí', 'give' ), |
|
1221 | - 'Sinaloa' => __( 'Sinaloa', 'give' ), |
|
1222 | - 'Sonora' => __( 'Sonora', 'give' ), |
|
1223 | - 'Tabasco' => __( 'Tabasco', 'give' ), |
|
1224 | - 'Tamaulipas' => __( 'Tamaulipas', 'give' ), |
|
1225 | - 'Tlaxcala' => __( 'Tlaxcala', 'give' ), |
|
1226 | - 'Veracruz' => __( 'Veracruz', 'give' ), |
|
1227 | - 'Yucatan' => __( 'Yucatán', 'give' ), |
|
1228 | - 'Zacatecas' => __( 'Zacatecas', 'give' ), |
|
1197 | + 'Distrito Federal' => __('Distrito Federal', 'give'), |
|
1198 | + 'Jalisco' => __('Jalisco', 'give'), |
|
1199 | + 'Nuevo Leon' => __('Nuevo León', 'give'), |
|
1200 | + 'Aguascalientes' => __('Aguascalientes', 'give'), |
|
1201 | + 'Baja California' => __('Baja California', 'give'), |
|
1202 | + 'Baja California Sur' => __('Baja California Sur', 'give'), |
|
1203 | + 'Campeche' => __('Campeche', 'give'), |
|
1204 | + 'Chiapas' => __('Chiapas', 'give'), |
|
1205 | + 'Chihuahua' => __('Chihuahua', 'give'), |
|
1206 | + 'Coahuila' => __('Coahuila', 'give'), |
|
1207 | + 'Colima' => __('Colima', 'give'), |
|
1208 | + 'Durango' => __('Durango', 'give'), |
|
1209 | + 'Guanajuato' => __('Guanajuato', 'give'), |
|
1210 | + 'Guerrero' => __('Guerrero', 'give'), |
|
1211 | + 'Hidalgo' => __('Hidalgo', 'give'), |
|
1212 | + 'Estado de Mexico' => __('Edo. de México', 'give'), |
|
1213 | + 'Michoacan' => __('Michoacán', 'give'), |
|
1214 | + 'Morelos' => __('Morelos', 'give'), |
|
1215 | + 'Nayarit' => __('Nayarit', 'give'), |
|
1216 | + 'Oaxaca' => __('Oaxaca', 'give'), |
|
1217 | + 'Puebla' => __('Puebla', 'give'), |
|
1218 | + 'Queretaro' => __('Querétaro', 'give'), |
|
1219 | + 'Quintana Roo' => __('Quintana Roo', 'give'), |
|
1220 | + 'San Luis Potosi' => __('San Luis Potosí', 'give'), |
|
1221 | + 'Sinaloa' => __('Sinaloa', 'give'), |
|
1222 | + 'Sonora' => __('Sonora', 'give'), |
|
1223 | + 'Tabasco' => __('Tabasco', 'give'), |
|
1224 | + 'Tamaulipas' => __('Tamaulipas', 'give'), |
|
1225 | + 'Tlaxcala' => __('Tlaxcala', 'give'), |
|
1226 | + 'Veracruz' => __('Veracruz', 'give'), |
|
1227 | + 'Yucatan' => __('Yucatán', 'give'), |
|
1228 | + 'Zacatecas' => __('Zacatecas', 'give'), |
|
1229 | 1229 | ); |
1230 | 1230 | |
1231 | - return apply_filters( 'give_mexico_states', $states ); |
|
1231 | + return apply_filters('give_mexico_states', $states); |
|
1232 | 1232 | } |
1233 | 1233 | |
1234 | 1234 | /** |
@@ -1240,56 +1240,56 @@ discard block |
||
1240 | 1240 | function give_get_japan_states_list() { |
1241 | 1241 | $states = array( |
1242 | 1242 | '' => '', |
1243 | - 'JP01' => __( 'Hokkaido', 'give' ), |
|
1244 | - 'JP02' => __( 'Aomori', 'give' ), |
|
1245 | - 'JP03' => __( 'Iwate', 'give' ), |
|
1246 | - 'JP04' => __( 'Miyagi', 'give' ), |
|
1247 | - 'JP05' => __( 'Akita', 'give' ), |
|
1248 | - 'JP06' => __( 'Yamagata', 'give' ), |
|
1249 | - 'JP07' => __( 'Fukushima', 'give' ), |
|
1250 | - 'JP08' => __( 'Ibaraki', 'give' ), |
|
1251 | - 'JP09' => __( 'Tochigi', 'give' ), |
|
1252 | - 'JP10' => __( 'Gunma', 'give' ), |
|
1253 | - 'JP11' => __( 'Saitama', 'give' ), |
|
1254 | - 'JP12' => __( 'Chiba', 'give' ), |
|
1255 | - 'JP13' => __( 'Tokyo', 'give' ), |
|
1256 | - 'JP14' => __( 'Kanagawa', 'give' ), |
|
1257 | - 'JP15' => __( 'Niigata', 'give' ), |
|
1258 | - 'JP16' => __( 'Toyama', 'give' ), |
|
1259 | - 'JP17' => __( 'Ishikawa', 'give' ), |
|
1260 | - 'JP18' => __( 'Fukui', 'give' ), |
|
1261 | - 'JP19' => __( 'Yamanashi', 'give' ), |
|
1262 | - 'JP20' => __( 'Nagano', 'give' ), |
|
1263 | - 'JP21' => __( 'Gifu', 'give' ), |
|
1264 | - 'JP22' => __( 'Shizuoka', 'give' ), |
|
1265 | - 'JP23' => __( 'Aichi', 'give' ), |
|
1266 | - 'JP24' => __( 'Mie', 'give' ), |
|
1267 | - 'JP25' => __( 'Shiga', 'give' ), |
|
1268 | - 'JP26' => __( 'Kyoto', 'give' ), |
|
1269 | - 'JP27' => __( 'Osaka', 'give' ), |
|
1270 | - 'JP28' => __( 'Hyogo', 'give' ), |
|
1271 | - 'JP29' => __( 'Nara', 'give' ), |
|
1272 | - 'JP30' => __( 'Wakayama', 'give' ), |
|
1273 | - 'JP31' => __( 'Tottori', 'give' ), |
|
1274 | - 'JP32' => __( 'Shimane', 'give' ), |
|
1275 | - 'JP33' => __( 'Okayama', 'give' ), |
|
1276 | - 'JP34' => __( 'Hiroshima', 'give' ), |
|
1277 | - 'JP35' => __( 'Yamaguchi', 'give' ), |
|
1278 | - 'JP36' => __( 'Tokushima', 'give' ), |
|
1279 | - 'JP37' => __( 'Kagawa', 'give' ), |
|
1280 | - 'JP38' => __( 'Ehime', 'give' ), |
|
1281 | - 'JP39' => __( 'Kochi', 'give' ), |
|
1282 | - 'JP40' => __( 'Fukuoka', 'give' ), |
|
1283 | - 'JP41' => __( 'Saga', 'give' ), |
|
1284 | - 'JP42' => __( 'Nagasaki', 'give' ), |
|
1285 | - 'JP43' => __( 'Kumamoto', 'give' ), |
|
1286 | - 'JP44' => __( 'Oita', 'give' ), |
|
1287 | - 'JP45' => __( 'Miyazaki', 'give' ), |
|
1288 | - 'JP46' => __( 'Kagoshima', 'give' ), |
|
1289 | - 'JP47' => __( 'Okinawa', 'give' ), |
|
1243 | + 'JP01' => __('Hokkaido', 'give'), |
|
1244 | + 'JP02' => __('Aomori', 'give'), |
|
1245 | + 'JP03' => __('Iwate', 'give'), |
|
1246 | + 'JP04' => __('Miyagi', 'give'), |
|
1247 | + 'JP05' => __('Akita', 'give'), |
|
1248 | + 'JP06' => __('Yamagata', 'give'), |
|
1249 | + 'JP07' => __('Fukushima', 'give'), |
|
1250 | + 'JP08' => __('Ibaraki', 'give'), |
|
1251 | + 'JP09' => __('Tochigi', 'give'), |
|
1252 | + 'JP10' => __('Gunma', 'give'), |
|
1253 | + 'JP11' => __('Saitama', 'give'), |
|
1254 | + 'JP12' => __('Chiba', 'give'), |
|
1255 | + 'JP13' => __('Tokyo', 'give'), |
|
1256 | + 'JP14' => __('Kanagawa', 'give'), |
|
1257 | + 'JP15' => __('Niigata', 'give'), |
|
1258 | + 'JP16' => __('Toyama', 'give'), |
|
1259 | + 'JP17' => __('Ishikawa', 'give'), |
|
1260 | + 'JP18' => __('Fukui', 'give'), |
|
1261 | + 'JP19' => __('Yamanashi', 'give'), |
|
1262 | + 'JP20' => __('Nagano', 'give'), |
|
1263 | + 'JP21' => __('Gifu', 'give'), |
|
1264 | + 'JP22' => __('Shizuoka', 'give'), |
|
1265 | + 'JP23' => __('Aichi', 'give'), |
|
1266 | + 'JP24' => __('Mie', 'give'), |
|
1267 | + 'JP25' => __('Shiga', 'give'), |
|
1268 | + 'JP26' => __('Kyoto', 'give'), |
|
1269 | + 'JP27' => __('Osaka', 'give'), |
|
1270 | + 'JP28' => __('Hyogo', 'give'), |
|
1271 | + 'JP29' => __('Nara', 'give'), |
|
1272 | + 'JP30' => __('Wakayama', 'give'), |
|
1273 | + 'JP31' => __('Tottori', 'give'), |
|
1274 | + 'JP32' => __('Shimane', 'give'), |
|
1275 | + 'JP33' => __('Okayama', 'give'), |
|
1276 | + 'JP34' => __('Hiroshima', 'give'), |
|
1277 | + 'JP35' => __('Yamaguchi', 'give'), |
|
1278 | + 'JP36' => __('Tokushima', 'give'), |
|
1279 | + 'JP37' => __('Kagawa', 'give'), |
|
1280 | + 'JP38' => __('Ehime', 'give'), |
|
1281 | + 'JP39' => __('Kochi', 'give'), |
|
1282 | + 'JP40' => __('Fukuoka', 'give'), |
|
1283 | + 'JP41' => __('Saga', 'give'), |
|
1284 | + 'JP42' => __('Nagasaki', 'give'), |
|
1285 | + 'JP43' => __('Kumamoto', 'give'), |
|
1286 | + 'JP44' => __('Oita', 'give'), |
|
1287 | + 'JP45' => __('Miyazaki', 'give'), |
|
1288 | + 'JP46' => __('Kagoshima', 'give'), |
|
1289 | + 'JP47' => __('Okinawa', 'give'), |
|
1290 | 1290 | ); |
1291 | 1291 | |
1292 | - return apply_filters( 'give_japan_states', $states ); |
|
1292 | + return apply_filters('give_japan_states', $states); |
|
1293 | 1293 | } |
1294 | 1294 | |
1295 | 1295 | /** |
@@ -1301,119 +1301,119 @@ discard block |
||
1301 | 1301 | function give_get_italy_states_list() { |
1302 | 1302 | $states = array( |
1303 | 1303 | '' => '', |
1304 | - 'AG' => __( 'Agrigento', 'give' ), |
|
1305 | - 'AL' => __( 'Alessandria', 'give' ), |
|
1306 | - 'AN' => __( 'Ancona', 'give' ), |
|
1307 | - 'AO' => __( 'Aosta', 'give' ), |
|
1308 | - 'AR' => __( 'Arezzo', 'give' ), |
|
1309 | - 'AP' => __( 'Ascoli Piceno', 'give' ), |
|
1310 | - 'AT' => __( 'Asti', 'give' ), |
|
1311 | - 'AV' => __( 'Avellino', 'give' ), |
|
1312 | - 'BA' => __( 'Bari', 'give' ), |
|
1313 | - 'BT' => __( 'Barletta-Andria-Trani', 'give' ), |
|
1314 | - 'BL' => __( 'Belluno', 'give' ), |
|
1315 | - 'BN' => __( 'Benevento', 'give' ), |
|
1316 | - 'BG' => __( 'Bergamo', 'give' ), |
|
1317 | - 'BI' => __( 'Biella', 'give' ), |
|
1318 | - 'BO' => __( 'Bologna', 'give' ), |
|
1319 | - 'BZ' => __( 'Bolzano', 'give' ), |
|
1320 | - 'BS' => __( 'Brescia', 'give' ), |
|
1321 | - 'BR' => __( 'Brindisi', 'give' ), |
|
1322 | - 'CA' => __( 'Cagliari', 'give' ), |
|
1323 | - 'CL' => __( 'Caltanissetta', 'give' ), |
|
1324 | - 'CB' => __( 'Campobasso', 'give' ), |
|
1325 | - 'CI' => __( 'Carbonia-Iglesias', 'give' ), |
|
1326 | - 'CE' => __( 'Caserta', 'give' ), |
|
1327 | - 'CT' => __( 'Catania', 'give' ), |
|
1328 | - 'CZ' => __( 'Catanzaro', 'give' ), |
|
1329 | - 'CH' => __( 'Chieti', 'give' ), |
|
1330 | - 'CO' => __( 'Como', 'give' ), |
|
1331 | - 'CS' => __( 'Cosenza', 'give' ), |
|
1332 | - 'CR' => __( 'Cremona', 'give' ), |
|
1333 | - 'KR' => __( 'Crotone', 'give' ), |
|
1334 | - 'CN' => __( 'Cuneo', 'give' ), |
|
1335 | - 'EN' => __( 'Enna', 'give' ), |
|
1336 | - 'FM' => __( 'Fermo', 'give' ), |
|
1337 | - 'FE' => __( 'Ferrara', 'give' ), |
|
1338 | - 'FI' => __( 'Firenze', 'give' ), |
|
1339 | - 'FG' => __( 'Foggia', 'give' ), |
|
1340 | - 'FC' => __( 'Forlì-Cesena', 'give' ), |
|
1341 | - 'FR' => __( 'Frosinone', 'give' ), |
|
1342 | - 'GE' => __( 'Genova', 'give' ), |
|
1343 | - 'GO' => __( 'Gorizia', 'give' ), |
|
1344 | - 'GR' => __( 'Grosseto', 'give' ), |
|
1345 | - 'IM' => __( 'Imperia', 'give' ), |
|
1346 | - 'IS' => __( 'Isernia', 'give' ), |
|
1347 | - 'SP' => __( 'La Spezia', 'give' ), |
|
1348 | - 'AQ' => __( "L'Aquila", 'give' ), |
|
1349 | - 'LT' => __( 'Latina', 'give' ), |
|
1350 | - 'LE' => __( 'Lecce', 'give' ), |
|
1351 | - 'LC' => __( 'Lecco', 'give' ), |
|
1352 | - 'LI' => __( 'Livorno', 'give' ), |
|
1353 | - 'LO' => __( 'Lodi', 'give' ), |
|
1354 | - 'LU' => __( 'Lucca', 'give' ), |
|
1355 | - 'MC' => __( 'Macerata', 'give' ), |
|
1356 | - 'MN' => __( 'Mantova', 'give' ), |
|
1357 | - 'MS' => __( 'Massa-Carrara', 'give' ), |
|
1358 | - 'MT' => __( 'Matera', 'give' ), |
|
1359 | - 'ME' => __( 'Messina', 'give' ), |
|
1360 | - 'MI' => __( 'Milano', 'give' ), |
|
1361 | - 'MO' => __( 'Modena', 'give' ), |
|
1362 | - 'MB' => __( 'Monza e della Brianza', 'give' ), |
|
1363 | - 'NA' => __( 'Napoli', 'give' ), |
|
1364 | - 'NO' => __( 'Novara', 'give' ), |
|
1365 | - 'NU' => __( 'Nuoro', 'give' ), |
|
1366 | - 'OT' => __( 'Olbia-Tempio', 'give' ), |
|
1367 | - 'OR' => __( 'Oristano', 'give' ), |
|
1368 | - 'PD' => __( 'Padova', 'give' ), |
|
1369 | - 'PA' => __( 'Palermo', 'give' ), |
|
1370 | - 'PR' => __( 'Parma', 'give' ), |
|
1371 | - 'PV' => __( 'Pavia', 'give' ), |
|
1372 | - 'PG' => __( 'Perugia', 'give' ), |
|
1373 | - 'PU' => __( 'Pesaro e Urbino', 'give' ), |
|
1374 | - 'PE' => __( 'Pescara', 'give' ), |
|
1375 | - 'PC' => __( 'Piacenza', 'give' ), |
|
1376 | - 'PI' => __( 'Pisa', 'give' ), |
|
1377 | - 'PT' => __( 'Pistoia', 'give' ), |
|
1378 | - 'PN' => __( 'Pordenone', 'give' ), |
|
1379 | - 'PZ' => __( 'Potenza', 'give' ), |
|
1380 | - 'PO' => __( 'Prato', 'give' ), |
|
1381 | - 'RG' => __( 'Ragusa', 'give' ), |
|
1382 | - 'RA' => __( 'Ravenna', 'give' ), |
|
1383 | - 'RC' => __( 'Reggio Calabria', 'give' ), |
|
1384 | - 'RE' => __( 'Reggio Emilia', 'give' ), |
|
1385 | - 'RI' => __( 'Rieti', 'give' ), |
|
1386 | - 'RN' => __( 'Rimini', 'give' ), |
|
1387 | - 'RM' => __( 'Roma', 'give' ), |
|
1388 | - 'RO' => __( 'Rovigo', 'give' ), |
|
1389 | - 'SA' => __( 'Salerno', 'give' ), |
|
1390 | - 'VS' => __( 'Medio Campidano', 'give' ), |
|
1391 | - 'SS' => __( 'Sassari', 'give' ), |
|
1392 | - 'SV' => __( 'Savona', 'give' ), |
|
1393 | - 'SI' => __( 'Siena', 'give' ), |
|
1394 | - 'SR' => __( 'Siracusa', 'give' ), |
|
1395 | - 'SO' => __( 'Sondrio', 'give' ), |
|
1396 | - 'TA' => __( 'Taranto', 'give' ), |
|
1397 | - 'TE' => __( 'Teramo', 'give' ), |
|
1398 | - 'TR' => __( 'Terni', 'give' ), |
|
1399 | - 'TO' => __( 'Torino', 'give' ), |
|
1400 | - 'OG' => __( 'Ogliastra', 'give' ), |
|
1401 | - 'TP' => __( 'Trapani', 'give' ), |
|
1402 | - 'TN' => __( 'Trento', 'give' ), |
|
1403 | - 'TV' => __( 'Treviso', 'give' ), |
|
1404 | - 'TS' => __( 'Trieste', 'give' ), |
|
1405 | - 'UD' => __( 'Udine', 'give' ), |
|
1406 | - 'VA' => __( 'Varese', 'give' ), |
|
1407 | - 'VE' => __( 'Venezia', 'give' ), |
|
1408 | - 'VB' => __( 'Verbano-Cusio-Ossola', 'give' ), |
|
1409 | - 'VC' => __( 'Vercelli', 'give' ), |
|
1410 | - 'VR' => __( 'Verona', 'give' ), |
|
1411 | - 'VV' => __( 'Vibo Valentia', 'give' ), |
|
1412 | - 'VI' => __( 'Vicenza', 'give' ), |
|
1413 | - 'VT' => __( 'Viterbo', 'give' ), |
|
1304 | + 'AG' => __('Agrigento', 'give'), |
|
1305 | + 'AL' => __('Alessandria', 'give'), |
|
1306 | + 'AN' => __('Ancona', 'give'), |
|
1307 | + 'AO' => __('Aosta', 'give'), |
|
1308 | + 'AR' => __('Arezzo', 'give'), |
|
1309 | + 'AP' => __('Ascoli Piceno', 'give'), |
|
1310 | + 'AT' => __('Asti', 'give'), |
|
1311 | + 'AV' => __('Avellino', 'give'), |
|
1312 | + 'BA' => __('Bari', 'give'), |
|
1313 | + 'BT' => __('Barletta-Andria-Trani', 'give'), |
|
1314 | + 'BL' => __('Belluno', 'give'), |
|
1315 | + 'BN' => __('Benevento', 'give'), |
|
1316 | + 'BG' => __('Bergamo', 'give'), |
|
1317 | + 'BI' => __('Biella', 'give'), |
|
1318 | + 'BO' => __('Bologna', 'give'), |
|
1319 | + 'BZ' => __('Bolzano', 'give'), |
|
1320 | + 'BS' => __('Brescia', 'give'), |
|
1321 | + 'BR' => __('Brindisi', 'give'), |
|
1322 | + 'CA' => __('Cagliari', 'give'), |
|
1323 | + 'CL' => __('Caltanissetta', 'give'), |
|
1324 | + 'CB' => __('Campobasso', 'give'), |
|
1325 | + 'CI' => __('Carbonia-Iglesias', 'give'), |
|
1326 | + 'CE' => __('Caserta', 'give'), |
|
1327 | + 'CT' => __('Catania', 'give'), |
|
1328 | + 'CZ' => __('Catanzaro', 'give'), |
|
1329 | + 'CH' => __('Chieti', 'give'), |
|
1330 | + 'CO' => __('Como', 'give'), |
|
1331 | + 'CS' => __('Cosenza', 'give'), |
|
1332 | + 'CR' => __('Cremona', 'give'), |
|
1333 | + 'KR' => __('Crotone', 'give'), |
|
1334 | + 'CN' => __('Cuneo', 'give'), |
|
1335 | + 'EN' => __('Enna', 'give'), |
|
1336 | + 'FM' => __('Fermo', 'give'), |
|
1337 | + 'FE' => __('Ferrara', 'give'), |
|
1338 | + 'FI' => __('Firenze', 'give'), |
|
1339 | + 'FG' => __('Foggia', 'give'), |
|
1340 | + 'FC' => __('Forlì-Cesena', 'give'), |
|
1341 | + 'FR' => __('Frosinone', 'give'), |
|
1342 | + 'GE' => __('Genova', 'give'), |
|
1343 | + 'GO' => __('Gorizia', 'give'), |
|
1344 | + 'GR' => __('Grosseto', 'give'), |
|
1345 | + 'IM' => __('Imperia', 'give'), |
|
1346 | + 'IS' => __('Isernia', 'give'), |
|
1347 | + 'SP' => __('La Spezia', 'give'), |
|
1348 | + 'AQ' => __("L'Aquila", 'give'), |
|
1349 | + 'LT' => __('Latina', 'give'), |
|
1350 | + 'LE' => __('Lecce', 'give'), |
|
1351 | + 'LC' => __('Lecco', 'give'), |
|
1352 | + 'LI' => __('Livorno', 'give'), |
|
1353 | + 'LO' => __('Lodi', 'give'), |
|
1354 | + 'LU' => __('Lucca', 'give'), |
|
1355 | + 'MC' => __('Macerata', 'give'), |
|
1356 | + 'MN' => __('Mantova', 'give'), |
|
1357 | + 'MS' => __('Massa-Carrara', 'give'), |
|
1358 | + 'MT' => __('Matera', 'give'), |
|
1359 | + 'ME' => __('Messina', 'give'), |
|
1360 | + 'MI' => __('Milano', 'give'), |
|
1361 | + 'MO' => __('Modena', 'give'), |
|
1362 | + 'MB' => __('Monza e della Brianza', 'give'), |
|
1363 | + 'NA' => __('Napoli', 'give'), |
|
1364 | + 'NO' => __('Novara', 'give'), |
|
1365 | + 'NU' => __('Nuoro', 'give'), |
|
1366 | + 'OT' => __('Olbia-Tempio', 'give'), |
|
1367 | + 'OR' => __('Oristano', 'give'), |
|
1368 | + 'PD' => __('Padova', 'give'), |
|
1369 | + 'PA' => __('Palermo', 'give'), |
|
1370 | + 'PR' => __('Parma', 'give'), |
|
1371 | + 'PV' => __('Pavia', 'give'), |
|
1372 | + 'PG' => __('Perugia', 'give'), |
|
1373 | + 'PU' => __('Pesaro e Urbino', 'give'), |
|
1374 | + 'PE' => __('Pescara', 'give'), |
|
1375 | + 'PC' => __('Piacenza', 'give'), |
|
1376 | + 'PI' => __('Pisa', 'give'), |
|
1377 | + 'PT' => __('Pistoia', 'give'), |
|
1378 | + 'PN' => __('Pordenone', 'give'), |
|
1379 | + 'PZ' => __('Potenza', 'give'), |
|
1380 | + 'PO' => __('Prato', 'give'), |
|
1381 | + 'RG' => __('Ragusa', 'give'), |
|
1382 | + 'RA' => __('Ravenna', 'give'), |
|
1383 | + 'RC' => __('Reggio Calabria', 'give'), |
|
1384 | + 'RE' => __('Reggio Emilia', 'give'), |
|
1385 | + 'RI' => __('Rieti', 'give'), |
|
1386 | + 'RN' => __('Rimini', 'give'), |
|
1387 | + 'RM' => __('Roma', 'give'), |
|
1388 | + 'RO' => __('Rovigo', 'give'), |
|
1389 | + 'SA' => __('Salerno', 'give'), |
|
1390 | + 'VS' => __('Medio Campidano', 'give'), |
|
1391 | + 'SS' => __('Sassari', 'give'), |
|
1392 | + 'SV' => __('Savona', 'give'), |
|
1393 | + 'SI' => __('Siena', 'give'), |
|
1394 | + 'SR' => __('Siracusa', 'give'), |
|
1395 | + 'SO' => __('Sondrio', 'give'), |
|
1396 | + 'TA' => __('Taranto', 'give'), |
|
1397 | + 'TE' => __('Teramo', 'give'), |
|
1398 | + 'TR' => __('Terni', 'give'), |
|
1399 | + 'TO' => __('Torino', 'give'), |
|
1400 | + 'OG' => __('Ogliastra', 'give'), |
|
1401 | + 'TP' => __('Trapani', 'give'), |
|
1402 | + 'TN' => __('Trento', 'give'), |
|
1403 | + 'TV' => __('Treviso', 'give'), |
|
1404 | + 'TS' => __('Trieste', 'give'), |
|
1405 | + 'UD' => __('Udine', 'give'), |
|
1406 | + 'VA' => __('Varese', 'give'), |
|
1407 | + 'VE' => __('Venezia', 'give'), |
|
1408 | + 'VB' => __('Verbano-Cusio-Ossola', 'give'), |
|
1409 | + 'VC' => __('Vercelli', 'give'), |
|
1410 | + 'VR' => __('Verona', 'give'), |
|
1411 | + 'VV' => __('Vibo Valentia', 'give'), |
|
1412 | + 'VI' => __('Vicenza', 'give'), |
|
1413 | + 'VT' => __('Viterbo', 'give'), |
|
1414 | 1414 | ); |
1415 | 1415 | |
1416 | - return apply_filters( 'give_italy_states', $states ); |
|
1416 | + return apply_filters('give_italy_states', $states); |
|
1417 | 1417 | } |
1418 | 1418 | |
1419 | 1419 | /** |
@@ -1425,40 +1425,40 @@ discard block |
||
1425 | 1425 | function give_get_iran_states_list() { |
1426 | 1426 | $states = array( |
1427 | 1427 | '' => '', |
1428 | - 'KHZ' => __( 'Khuzestan (خوزستان)', 'give' ), |
|
1429 | - 'THR' => __( 'Tehran (تهران)', 'give' ), |
|
1430 | - 'ILM' => __( 'Ilaam (ایلام)', 'give' ), |
|
1431 | - 'BHR' => __( 'Bushehr (بوشهر)', 'give' ), |
|
1432 | - 'ADL' => __( 'Ardabil (اردبیل)', 'give' ), |
|
1433 | - 'ESF' => __( 'Isfahan (اصفهان)', 'give' ), |
|
1434 | - 'YZD' => __( 'Yazd (یزد)', 'give' ), |
|
1435 | - 'KRH' => __( 'Kermanshah (کرمانشاه)', 'give' ), |
|
1436 | - 'KRN' => __( 'Kerman (کرمان)', 'give' ), |
|
1437 | - 'HDN' => __( 'Hamadan (همدان)', 'give' ), |
|
1438 | - 'GZN' => __( 'Ghazvin (قزوین)', 'give' ), |
|
1439 | - 'ZJN' => __( 'Zanjan (زنجان)', 'give' ), |
|
1440 | - 'LRS' => __( 'Luristan (لرستان)', 'give' ), |
|
1441 | - 'ABZ' => __( 'Alborz (البرز)', 'give' ), |
|
1442 | - 'EAZ' => __( 'East Azarbaijan (آذربایجان شرقی)', 'give' ), |
|
1443 | - 'WAZ' => __( 'West Azarbaijan (آذربایجان غربی)', 'give' ), |
|
1444 | - 'CHB' => __( 'Chaharmahal and Bakhtiari (چهارمحال و بختیاری)', 'give' ), |
|
1445 | - 'SKH' => __( 'South Khorasan (خراسان جنوبی)', 'give' ), |
|
1446 | - 'RKH' => __( 'Razavi Khorasan (خراسان رضوی)', 'give' ), |
|
1447 | - 'NKH' => __( 'North Khorasan (خراسان جنوبی)', 'give' ), |
|
1448 | - 'SMN' => __( 'Semnan (سمنان)', 'give' ), |
|
1449 | - 'FRS' => __( 'Fars (فارس)', 'give' ), |
|
1450 | - 'QHM' => __( 'Qom (قم)', 'give' ), |
|
1451 | - 'KRD' => __( 'Kurdistan / کردستان)', 'give' ), |
|
1452 | - 'KBD' => __( 'Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)', 'give' ), |
|
1453 | - 'GLS' => __( 'Golestan (گلستان)', 'give' ), |
|
1454 | - 'GIL' => __( 'Gilan (گیلان)', 'give' ), |
|
1455 | - 'MZN' => __( 'Mazandaran (مازندران)', 'give' ), |
|
1456 | - 'MKZ' => __( 'Markazi (مرکزی)', 'give' ), |
|
1457 | - 'HRZ' => __( 'Hormozgan (هرمزگان)', 'give' ), |
|
1458 | - 'SBN' => __( 'Sistan and Baluchestan (سیستان و بلوچستان)', 'give' ), |
|
1428 | + 'KHZ' => __('Khuzestan (خوزستان)', 'give'), |
|
1429 | + 'THR' => __('Tehran (تهران)', 'give'), |
|
1430 | + 'ILM' => __('Ilaam (ایلام)', 'give'), |
|
1431 | + 'BHR' => __('Bushehr (بوشهر)', 'give'), |
|
1432 | + 'ADL' => __('Ardabil (اردبیل)', 'give'), |
|
1433 | + 'ESF' => __('Isfahan (اصفهان)', 'give'), |
|
1434 | + 'YZD' => __('Yazd (یزد)', 'give'), |
|
1435 | + 'KRH' => __('Kermanshah (کرمانشاه)', 'give'), |
|
1436 | + 'KRN' => __('Kerman (کرمان)', 'give'), |
|
1437 | + 'HDN' => __('Hamadan (همدان)', 'give'), |
|
1438 | + 'GZN' => __('Ghazvin (قزوین)', 'give'), |
|
1439 | + 'ZJN' => __('Zanjan (زنجان)', 'give'), |
|
1440 | + 'LRS' => __('Luristan (لرستان)', 'give'), |
|
1441 | + 'ABZ' => __('Alborz (البرز)', 'give'), |
|
1442 | + 'EAZ' => __('East Azarbaijan (آذربایجان شرقی)', 'give'), |
|
1443 | + 'WAZ' => __('West Azarbaijan (آذربایجان غربی)', 'give'), |
|
1444 | + 'CHB' => __('Chaharmahal and Bakhtiari (چهارمحال و بختیاری)', 'give'), |
|
1445 | + 'SKH' => __('South Khorasan (خراسان جنوبی)', 'give'), |
|
1446 | + 'RKH' => __('Razavi Khorasan (خراسان رضوی)', 'give'), |
|
1447 | + 'NKH' => __('North Khorasan (خراسان جنوبی)', 'give'), |
|
1448 | + 'SMN' => __('Semnan (سمنان)', 'give'), |
|
1449 | + 'FRS' => __('Fars (فارس)', 'give'), |
|
1450 | + 'QHM' => __('Qom (قم)', 'give'), |
|
1451 | + 'KRD' => __('Kurdistan / کردستان)', 'give'), |
|
1452 | + 'KBD' => __('Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)', 'give'), |
|
1453 | + 'GLS' => __('Golestan (گلستان)', 'give'), |
|
1454 | + 'GIL' => __('Gilan (گیلان)', 'give'), |
|
1455 | + 'MZN' => __('Mazandaran (مازندران)', 'give'), |
|
1456 | + 'MKZ' => __('Markazi (مرکزی)', 'give'), |
|
1457 | + 'HRZ' => __('Hormozgan (هرمزگان)', 'give'), |
|
1458 | + 'SBN' => __('Sistan and Baluchestan (سیستان و بلوچستان)', 'give'), |
|
1459 | 1459 | ); |
1460 | 1460 | |
1461 | - return apply_filters( 'give_iran_states', $states ); |
|
1461 | + return apply_filters('give_iran_states', $states); |
|
1462 | 1462 | } |
1463 | 1463 | |
1464 | 1464 | /** |
@@ -1470,35 +1470,35 @@ discard block |
||
1470 | 1470 | function give_get_ireland_states_list() { |
1471 | 1471 | $states = array( |
1472 | 1472 | '' => '', |
1473 | - 'CE' => __( 'Clare', 'give' ), |
|
1474 | - 'CK' => __( 'Cork', 'give' ), |
|
1475 | - 'CN' => __( 'Cavan', 'give' ), |
|
1476 | - 'CW' => __( 'Carlow', 'give' ), |
|
1477 | - 'DL' => __( 'Donegal', 'give' ), |
|
1478 | - 'DN' => __( 'Dublin', 'give' ), |
|
1479 | - 'GY' => __( 'Galway', 'give' ), |
|
1480 | - 'KE' => __( 'Kildare', 'give' ), |
|
1481 | - 'KK' => __( 'Kilkenny', 'give' ), |
|
1482 | - 'KY' => __( 'Kerry', 'give' ), |
|
1483 | - 'LD' => __( 'Longford', 'give' ), |
|
1484 | - 'LH' => __( 'Louth', 'give' ), |
|
1485 | - 'LK' => __( 'Limerick', 'give' ), |
|
1486 | - 'LM' => __( 'Leitrim', 'give' ), |
|
1487 | - 'LS' => __( 'Laois', 'give' ), |
|
1488 | - 'MH' => __( 'Meath', 'give' ), |
|
1489 | - 'MN' => __( 'Monaghan', 'give' ), |
|
1490 | - 'MO' => __( 'Mayo', 'give' ), |
|
1491 | - 'OY' => __( 'Offaly', 'give' ), |
|
1492 | - 'RN' => __( 'Roscommon', 'give' ), |
|
1493 | - 'SO' => __( 'Sligo', 'give' ), |
|
1494 | - 'TY' => __( 'Tipperary', 'give' ), |
|
1495 | - 'WD' => __( 'Waterford', 'give' ), |
|
1496 | - 'WH' => __( 'Westmeath', 'give' ), |
|
1497 | - 'WW' => __( 'Wicklow', 'give' ), |
|
1498 | - 'WX' => __( 'Wexford', 'give' ), |
|
1473 | + 'CE' => __('Clare', 'give'), |
|
1474 | + 'CK' => __('Cork', 'give'), |
|
1475 | + 'CN' => __('Cavan', 'give'), |
|
1476 | + 'CW' => __('Carlow', 'give'), |
|
1477 | + 'DL' => __('Donegal', 'give'), |
|
1478 | + 'DN' => __('Dublin', 'give'), |
|
1479 | + 'GY' => __('Galway', 'give'), |
|
1480 | + 'KE' => __('Kildare', 'give'), |
|
1481 | + 'KK' => __('Kilkenny', 'give'), |
|
1482 | + 'KY' => __('Kerry', 'give'), |
|
1483 | + 'LD' => __('Longford', 'give'), |
|
1484 | + 'LH' => __('Louth', 'give'), |
|
1485 | + 'LK' => __('Limerick', 'give'), |
|
1486 | + 'LM' => __('Leitrim', 'give'), |
|
1487 | + 'LS' => __('Laois', 'give'), |
|
1488 | + 'MH' => __('Meath', 'give'), |
|
1489 | + 'MN' => __('Monaghan', 'give'), |
|
1490 | + 'MO' => __('Mayo', 'give'), |
|
1491 | + 'OY' => __('Offaly', 'give'), |
|
1492 | + 'RN' => __('Roscommon', 'give'), |
|
1493 | + 'SO' => __('Sligo', 'give'), |
|
1494 | + 'TY' => __('Tipperary', 'give'), |
|
1495 | + 'WD' => __('Waterford', 'give'), |
|
1496 | + 'WH' => __('Westmeath', 'give'), |
|
1497 | + 'WW' => __('Wicklow', 'give'), |
|
1498 | + 'WX' => __('Wexford', 'give'), |
|
1499 | 1499 | ); |
1500 | 1500 | |
1501 | - return apply_filters( 'give_ireland_states', $states ); |
|
1501 | + return apply_filters('give_ireland_states', $states); |
|
1502 | 1502 | } |
1503 | 1503 | |
1504 | 1504 | /** |
@@ -1510,22 +1510,22 @@ discard block |
||
1510 | 1510 | function give_get_greek_states_list() { |
1511 | 1511 | $states = array( |
1512 | 1512 | '' => '', |
1513 | - 'I' => __( 'Αττική', 'give' ), |
|
1514 | - 'A' => __( 'Ανατολική Μακεδονία και Θράκη', 'give' ), |
|
1515 | - 'B' => __( 'Κεντρική Μακεδονία', 'give' ), |
|
1516 | - 'C' => __( 'Δυτική Μακεδονία', 'give' ), |
|
1517 | - 'D' => __( 'Ήπειρος', 'give' ), |
|
1518 | - 'E' => __( 'Θεσσαλία', 'give' ), |
|
1519 | - 'F' => __( 'Ιόνιοι Νήσοι', 'give' ), |
|
1520 | - 'G' => __( 'Δυτική Ελλάδα', 'give' ), |
|
1521 | - 'H' => __( 'Στερεά Ελλάδα', 'give' ), |
|
1522 | - 'J' => __( 'Πελοπόννησος', 'give' ), |
|
1523 | - 'K' => __( 'Βόρειο Αιγαίο', 'give' ), |
|
1524 | - 'L' => __( 'Νότιο Αιγαίο', 'give' ), |
|
1525 | - 'M' => __( 'Κρήτη', 'give' ), |
|
1513 | + 'I' => __('Αττική', 'give'), |
|
1514 | + 'A' => __('Ανατολική Μακεδονία και Θράκη', 'give'), |
|
1515 | + 'B' => __('Κεντρική Μακεδονία', 'give'), |
|
1516 | + 'C' => __('Δυτική Μακεδονία', 'give'), |
|
1517 | + 'D' => __('Ήπειρος', 'give'), |
|
1518 | + 'E' => __('Θεσσαλία', 'give'), |
|
1519 | + 'F' => __('Ιόνιοι Νήσοι', 'give'), |
|
1520 | + 'G' => __('Δυτική Ελλάδα', 'give'), |
|
1521 | + 'H' => __('Στερεά Ελλάδα', 'give'), |
|
1522 | + 'J' => __('Πελοπόννησος', 'give'), |
|
1523 | + 'K' => __('Βόρειο Αιγαίο', 'give'), |
|
1524 | + 'L' => __('Νότιο Αιγαίο', 'give'), |
|
1525 | + 'M' => __('Κρήτη', 'give'), |
|
1526 | 1526 | ); |
1527 | 1527 | |
1528 | - return apply_filters( 'give_greek_states', $states ); |
|
1528 | + return apply_filters('give_greek_states', $states); |
|
1529 | 1529 | } |
1530 | 1530 | |
1531 | 1531 | /** |
@@ -1537,18 +1537,18 @@ discard block |
||
1537 | 1537 | function give_get_bolivian_states_list() { |
1538 | 1538 | $states = array( |
1539 | 1539 | '' => '', |
1540 | - 'B' => __( 'Chuquisaca', 'give' ), |
|
1541 | - 'H' => __( 'Beni', 'give' ), |
|
1542 | - 'C' => __( 'Cochabamba', 'give' ), |
|
1543 | - 'L' => __( 'La Paz', 'give' ), |
|
1544 | - 'O' => __( 'Oruro', 'give' ), |
|
1545 | - 'N' => __( 'Pando', 'give' ), |
|
1546 | - 'P' => __( 'Potosí', 'give' ), |
|
1547 | - 'S' => __( 'Santa Cruz', 'give' ), |
|
1548 | - 'T' => __( 'Tarija', 'give' ), |
|
1540 | + 'B' => __('Chuquisaca', 'give'), |
|
1541 | + 'H' => __('Beni', 'give'), |
|
1542 | + 'C' => __('Cochabamba', 'give'), |
|
1543 | + 'L' => __('La Paz', 'give'), |
|
1544 | + 'O' => __('Oruro', 'give'), |
|
1545 | + 'N' => __('Pando', 'give'), |
|
1546 | + 'P' => __('Potosí', 'give'), |
|
1547 | + 'S' => __('Santa Cruz', 'give'), |
|
1548 | + 'T' => __('Tarija', 'give'), |
|
1549 | 1549 | ); |
1550 | 1550 | |
1551 | - return apply_filters( 'give_bolivian_states', $states ); |
|
1551 | + return apply_filters('give_bolivian_states', $states); |
|
1552 | 1552 | } |
1553 | 1553 | |
1554 | 1554 | /** |
@@ -1560,37 +1560,37 @@ discard block |
||
1560 | 1560 | function give_get_bulgarian_states_list() { |
1561 | 1561 | $states = array( |
1562 | 1562 | '' => '', |
1563 | - 'BG-01' => __( 'Blagoevgrad', 'give' ), |
|
1564 | - 'BG-02' => __( 'Burgas', 'give' ), |
|
1565 | - 'BG-08' => __( 'Dobrich', 'give' ), |
|
1566 | - 'BG-07' => __( 'Gabrovo', 'give' ), |
|
1567 | - 'BG-26' => __( 'Haskovo', 'give' ), |
|
1568 | - 'BG-09' => __( 'Kardzhali', 'give' ), |
|
1569 | - 'BG-10' => __( 'Kyustendil', 'give' ), |
|
1570 | - 'BG-11' => __( 'Lovech', 'give' ), |
|
1571 | - 'BG-12' => __( 'Montana', 'give' ), |
|
1572 | - 'BG-13' => __( 'Pazardzhik', 'give' ), |
|
1573 | - 'BG-14' => __( 'Pernik', 'give' ), |
|
1574 | - 'BG-15' => __( 'Pleven', 'give' ), |
|
1575 | - 'BG-16' => __( 'Plovdiv', 'give' ), |
|
1576 | - 'BG-17' => __( 'Razgrad', 'give' ), |
|
1577 | - 'BG-18' => __( 'Ruse', 'give' ), |
|
1578 | - 'BG-27' => __( 'Shumen', 'give' ), |
|
1579 | - 'BG-19' => __( 'Silistra', 'give' ), |
|
1580 | - 'BG-20' => __( 'Sliven', 'give' ), |
|
1581 | - 'BG-21' => __( 'Smolyan', 'give' ), |
|
1582 | - 'BG-23' => __( 'Sofia', 'give' ), |
|
1583 | - 'BG-22' => __( 'Sofia-Grad', 'give' ), |
|
1584 | - 'BG-24' => __( 'Stara Zagora', 'give' ), |
|
1585 | - 'BG-25' => __( 'Targovishte', 'give' ), |
|
1586 | - 'BG-03' => __( 'Varna', 'give' ), |
|
1587 | - 'BG-04' => __( 'Veliko Tarnovo', 'give' ), |
|
1588 | - 'BG-05' => __( 'Vidin', 'give' ), |
|
1589 | - 'BG-06' => __( 'Vratsa', 'give' ), |
|
1590 | - 'BG-28' => __( 'Yambol', 'give' ), |
|
1563 | + 'BG-01' => __('Blagoevgrad', 'give'), |
|
1564 | + 'BG-02' => __('Burgas', 'give'), |
|
1565 | + 'BG-08' => __('Dobrich', 'give'), |
|
1566 | + 'BG-07' => __('Gabrovo', 'give'), |
|
1567 | + 'BG-26' => __('Haskovo', 'give'), |
|
1568 | + 'BG-09' => __('Kardzhali', 'give'), |
|
1569 | + 'BG-10' => __('Kyustendil', 'give'), |
|
1570 | + 'BG-11' => __('Lovech', 'give'), |
|
1571 | + 'BG-12' => __('Montana', 'give'), |
|
1572 | + 'BG-13' => __('Pazardzhik', 'give'), |
|
1573 | + 'BG-14' => __('Pernik', 'give'), |
|
1574 | + 'BG-15' => __('Pleven', 'give'), |
|
1575 | + 'BG-16' => __('Plovdiv', 'give'), |
|
1576 | + 'BG-17' => __('Razgrad', 'give'), |
|
1577 | + 'BG-18' => __('Ruse', 'give'), |
|
1578 | + 'BG-27' => __('Shumen', 'give'), |
|
1579 | + 'BG-19' => __('Silistra', 'give'), |
|
1580 | + 'BG-20' => __('Sliven', 'give'), |
|
1581 | + 'BG-21' => __('Smolyan', 'give'), |
|
1582 | + 'BG-23' => __('Sofia', 'give'), |
|
1583 | + 'BG-22' => __('Sofia-Grad', 'give'), |
|
1584 | + 'BG-24' => __('Stara Zagora', 'give'), |
|
1585 | + 'BG-25' => __('Targovishte', 'give'), |
|
1586 | + 'BG-03' => __('Varna', 'give'), |
|
1587 | + 'BG-04' => __('Veliko Tarnovo', 'give'), |
|
1588 | + 'BG-05' => __('Vidin', 'give'), |
|
1589 | + 'BG-06' => __('Vratsa', 'give'), |
|
1590 | + 'BG-28' => __('Yambol', 'give'), |
|
1591 | 1591 | ); |
1592 | 1592 | |
1593 | - return apply_filters( 'give_bulgarian_states', $states ); |
|
1593 | + return apply_filters('give_bulgarian_states', $states); |
|
1594 | 1594 | } |
1595 | 1595 | |
1596 | 1596 | /** |
@@ -1602,73 +1602,73 @@ discard block |
||
1602 | 1602 | function give_get_bangladeshi_states_list() { |
1603 | 1603 | $states = array( |
1604 | 1604 | '' => '', |
1605 | - 'BAG' => __( 'Bagerhat', 'give' ), |
|
1606 | - 'BAN' => __( 'Bandarban', 'give' ), |
|
1607 | - 'BAR' => __( 'Barguna', 'give' ), |
|
1608 | - 'BARI' => __( 'Barisal', 'give' ), |
|
1609 | - 'BHO' => __( 'Bhola', 'give' ), |
|
1610 | - 'BOG' => __( 'Bogra', 'give' ), |
|
1611 | - 'BRA' => __( 'Brahmanbaria', 'give' ), |
|
1612 | - 'CHA' => __( 'Chandpur', 'give' ), |
|
1613 | - 'CHI' => __( 'Chittagong', 'give' ), |
|
1614 | - 'CHU' => __( 'Chuadanga', 'give' ), |
|
1615 | - 'COM' => __( 'Comilla', 'give' ), |
|
1616 | - 'COX' => __( "Cox's Bazar", 'give' ), |
|
1617 | - 'DHA' => __( 'Dhaka', 'give' ), |
|
1618 | - 'DIN' => __( 'Dinajpur', 'give' ), |
|
1619 | - 'FAR' => __( 'Faridpur ', 'give' ), |
|
1620 | - 'FEN' => __( 'Feni', 'give' ), |
|
1621 | - 'GAI' => __( 'Gaibandha', 'give' ), |
|
1622 | - 'GAZI' => __( 'Gazipur', 'give' ), |
|
1623 | - 'GOP' => __( 'Gopalganj', 'give' ), |
|
1624 | - 'HAB' => __( 'Habiganj', 'give' ), |
|
1625 | - 'JAM' => __( 'Jamalpur', 'give' ), |
|
1626 | - 'JES' => __( 'Jessore', 'give' ), |
|
1627 | - 'JHA' => __( 'Jhalokati', 'give' ), |
|
1628 | - 'JHE' => __( 'Jhenaidah', 'give' ), |
|
1629 | - 'JOY' => __( 'Joypurhat', 'give' ), |
|
1630 | - 'KHA' => __( 'Khagrachhari', 'give' ), |
|
1631 | - 'KHU' => __( 'Khulna', 'give' ), |
|
1632 | - 'KIS' => __( 'Kishoreganj', 'give' ), |
|
1633 | - 'KUR' => __( 'Kurigram', 'give' ), |
|
1634 | - 'KUS' => __( 'Kushtia', 'give' ), |
|
1635 | - 'LAK' => __( 'Lakshmipur', 'give' ), |
|
1636 | - 'LAL' => __( 'Lalmonirhat', 'give' ), |
|
1637 | - 'MAD' => __( 'Madaripur', 'give' ), |
|
1638 | - 'MAG' => __( 'Magura', 'give' ), |
|
1639 | - 'MAN' => __( 'Manikganj ', 'give' ), |
|
1640 | - 'MEH' => __( 'Meherpur', 'give' ), |
|
1641 | - 'MOU' => __( 'Moulvibazar', 'give' ), |
|
1642 | - 'MUN' => __( 'Munshiganj', 'give' ), |
|
1643 | - 'MYM' => __( 'Mymensingh', 'give' ), |
|
1644 | - 'NAO' => __( 'Naogaon', 'give' ), |
|
1645 | - 'NAR' => __( 'Narail', 'give' ), |
|
1646 | - 'NARG' => __( 'Narayanganj', 'give' ), |
|
1647 | - 'NARD' => __( 'Narsingdi', 'give' ), |
|
1648 | - 'NAT' => __( 'Natore', 'give' ), |
|
1649 | - 'NAW' => __( 'Nawabganj', 'give' ), |
|
1650 | - 'NET' => __( 'Netrakona', 'give' ), |
|
1651 | - 'NIL' => __( 'Nilphamari', 'give' ), |
|
1652 | - 'NOA' => __( 'Noakhali', 'give' ), |
|
1653 | - 'PAB' => __( 'Pabna', 'give' ), |
|
1654 | - 'PAN' => __( 'Panchagarh', 'give' ), |
|
1655 | - 'PAT' => __( 'Patuakhali', 'give' ), |
|
1656 | - 'PIR' => __( 'Pirojpur', 'give' ), |
|
1657 | - 'RAJB' => __( 'Rajbari', 'give' ), |
|
1658 | - 'RAJ' => __( 'Rajshahi', 'give' ), |
|
1659 | - 'RAN' => __( 'Rangamati', 'give' ), |
|
1660 | - 'RANP' => __( 'Rangpur', 'give' ), |
|
1661 | - 'SAT' => __( 'Satkhira', 'give' ), |
|
1662 | - 'SHA' => __( 'Shariatpur', 'give' ), |
|
1663 | - 'SHE' => __( 'Sherpur', 'give' ), |
|
1664 | - 'SIR' => __( 'Sirajganj', 'give' ), |
|
1665 | - 'SUN' => __( 'Sunamganj', 'give' ), |
|
1666 | - 'SYL' => __( 'Sylhet', 'give' ), |
|
1667 | - 'TAN' => __( 'Tangail', 'give' ), |
|
1668 | - 'THA' => __( 'Thakurgaon', 'give' ), |
|
1605 | + 'BAG' => __('Bagerhat', 'give'), |
|
1606 | + 'BAN' => __('Bandarban', 'give'), |
|
1607 | + 'BAR' => __('Barguna', 'give'), |
|
1608 | + 'BARI' => __('Barisal', 'give'), |
|
1609 | + 'BHO' => __('Bhola', 'give'), |
|
1610 | + 'BOG' => __('Bogra', 'give'), |
|
1611 | + 'BRA' => __('Brahmanbaria', 'give'), |
|
1612 | + 'CHA' => __('Chandpur', 'give'), |
|
1613 | + 'CHI' => __('Chittagong', 'give'), |
|
1614 | + 'CHU' => __('Chuadanga', 'give'), |
|
1615 | + 'COM' => __('Comilla', 'give'), |
|
1616 | + 'COX' => __("Cox's Bazar", 'give'), |
|
1617 | + 'DHA' => __('Dhaka', 'give'), |
|
1618 | + 'DIN' => __('Dinajpur', 'give'), |
|
1619 | + 'FAR' => __('Faridpur ', 'give'), |
|
1620 | + 'FEN' => __('Feni', 'give'), |
|
1621 | + 'GAI' => __('Gaibandha', 'give'), |
|
1622 | + 'GAZI' => __('Gazipur', 'give'), |
|
1623 | + 'GOP' => __('Gopalganj', 'give'), |
|
1624 | + 'HAB' => __('Habiganj', 'give'), |
|
1625 | + 'JAM' => __('Jamalpur', 'give'), |
|
1626 | + 'JES' => __('Jessore', 'give'), |
|
1627 | + 'JHA' => __('Jhalokati', 'give'), |
|
1628 | + 'JHE' => __('Jhenaidah', 'give'), |
|
1629 | + 'JOY' => __('Joypurhat', 'give'), |
|
1630 | + 'KHA' => __('Khagrachhari', 'give'), |
|
1631 | + 'KHU' => __('Khulna', 'give'), |
|
1632 | + 'KIS' => __('Kishoreganj', 'give'), |
|
1633 | + 'KUR' => __('Kurigram', 'give'), |
|
1634 | + 'KUS' => __('Kushtia', 'give'), |
|
1635 | + 'LAK' => __('Lakshmipur', 'give'), |
|
1636 | + 'LAL' => __('Lalmonirhat', 'give'), |
|
1637 | + 'MAD' => __('Madaripur', 'give'), |
|
1638 | + 'MAG' => __('Magura', 'give'), |
|
1639 | + 'MAN' => __('Manikganj ', 'give'), |
|
1640 | + 'MEH' => __('Meherpur', 'give'), |
|
1641 | + 'MOU' => __('Moulvibazar', 'give'), |
|
1642 | + 'MUN' => __('Munshiganj', 'give'), |
|
1643 | + 'MYM' => __('Mymensingh', 'give'), |
|
1644 | + 'NAO' => __('Naogaon', 'give'), |
|
1645 | + 'NAR' => __('Narail', 'give'), |
|
1646 | + 'NARG' => __('Narayanganj', 'give'), |
|
1647 | + 'NARD' => __('Narsingdi', 'give'), |
|
1648 | + 'NAT' => __('Natore', 'give'), |
|
1649 | + 'NAW' => __('Nawabganj', 'give'), |
|
1650 | + 'NET' => __('Netrakona', 'give'), |
|
1651 | + 'NIL' => __('Nilphamari', 'give'), |
|
1652 | + 'NOA' => __('Noakhali', 'give'), |
|
1653 | + 'PAB' => __('Pabna', 'give'), |
|
1654 | + 'PAN' => __('Panchagarh', 'give'), |
|
1655 | + 'PAT' => __('Patuakhali', 'give'), |
|
1656 | + 'PIR' => __('Pirojpur', 'give'), |
|
1657 | + 'RAJB' => __('Rajbari', 'give'), |
|
1658 | + 'RAJ' => __('Rajshahi', 'give'), |
|
1659 | + 'RAN' => __('Rangamati', 'give'), |
|
1660 | + 'RANP' => __('Rangpur', 'give'), |
|
1661 | + 'SAT' => __('Satkhira', 'give'), |
|
1662 | + 'SHA' => __('Shariatpur', 'give'), |
|
1663 | + 'SHE' => __('Sherpur', 'give'), |
|
1664 | + 'SIR' => __('Sirajganj', 'give'), |
|
1665 | + 'SUN' => __('Sunamganj', 'give'), |
|
1666 | + 'SYL' => __('Sylhet', 'give'), |
|
1667 | + 'TAN' => __('Tangail', 'give'), |
|
1668 | + 'THA' => __('Thakurgaon', 'give'), |
|
1669 | 1669 | ); |
1670 | 1670 | |
1671 | - return apply_filters( 'give_bangladeshi_states', $states ); |
|
1671 | + return apply_filters('give_bangladeshi_states', $states); |
|
1672 | 1672 | } |
1673 | 1673 | |
1674 | 1674 | /** |
@@ -1680,33 +1680,33 @@ discard block |
||
1680 | 1680 | function give_get_argentina_states_list() { |
1681 | 1681 | $states = array( |
1682 | 1682 | '' => '', |
1683 | - 'C' => __( 'Ciudad Autónoma de Buenos Aires', 'give' ), |
|
1684 | - 'B' => __( 'Buenos Aires', 'give' ), |
|
1685 | - 'K' => __( 'Catamarca', 'give' ), |
|
1686 | - 'H' => __( 'Chaco', 'give' ), |
|
1687 | - 'U' => __( 'Chubut', 'give' ), |
|
1688 | - 'X' => __( 'Córdoba', 'give' ), |
|
1689 | - 'W' => __( 'Corrientes', 'give' ), |
|
1690 | - 'E' => __( 'Entre Ríos', 'give' ), |
|
1691 | - 'P' => __( 'Formosa', 'give' ), |
|
1692 | - 'Y' => __( 'Jujuy', 'give' ), |
|
1693 | - 'L' => __( 'La Pampa', 'give' ), |
|
1694 | - 'F' => __( 'La Rioja', 'give' ), |
|
1695 | - 'M' => __( 'Mendoza', 'give' ), |
|
1696 | - 'N' => __( 'Misiones', 'give' ), |
|
1697 | - 'Q' => __( 'Neuquén', 'give' ), |
|
1698 | - 'R' => __( 'Río Negro', 'give' ), |
|
1699 | - 'A' => __( 'Salta', 'give' ), |
|
1700 | - 'J' => __( 'San Juan', 'give' ), |
|
1701 | - 'D' => __( 'San Luis', 'give' ), |
|
1702 | - 'Z' => __( 'Santa Cruz', 'give' ), |
|
1703 | - 'S' => __( 'Santa Fe', 'give' ), |
|
1704 | - 'G' => __( 'Santiago del Estero', 'give' ), |
|
1705 | - 'V' => __( 'Tierra del Fuego', 'give' ), |
|
1706 | - 'T' => __( 'Tucumán', 'give' ), |
|
1683 | + 'C' => __('Ciudad Autónoma de Buenos Aires', 'give'), |
|
1684 | + 'B' => __('Buenos Aires', 'give'), |
|
1685 | + 'K' => __('Catamarca', 'give'), |
|
1686 | + 'H' => __('Chaco', 'give'), |
|
1687 | + 'U' => __('Chubut', 'give'), |
|
1688 | + 'X' => __('Córdoba', 'give'), |
|
1689 | + 'W' => __('Corrientes', 'give'), |
|
1690 | + 'E' => __('Entre Ríos', 'give'), |
|
1691 | + 'P' => __('Formosa', 'give'), |
|
1692 | + 'Y' => __('Jujuy', 'give'), |
|
1693 | + 'L' => __('La Pampa', 'give'), |
|
1694 | + 'F' => __('La Rioja', 'give'), |
|
1695 | + 'M' => __('Mendoza', 'give'), |
|
1696 | + 'N' => __('Misiones', 'give'), |
|
1697 | + 'Q' => __('Neuquén', 'give'), |
|
1698 | + 'R' => __('Río Negro', 'give'), |
|
1699 | + 'A' => __('Salta', 'give'), |
|
1700 | + 'J' => __('San Juan', 'give'), |
|
1701 | + 'D' => __('San Luis', 'give'), |
|
1702 | + 'Z' => __('Santa Cruz', 'give'), |
|
1703 | + 'S' => __('Santa Fe', 'give'), |
|
1704 | + 'G' => __('Santiago del Estero', 'give'), |
|
1705 | + 'V' => __('Tierra del Fuego', 'give'), |
|
1706 | + 'T' => __('Tucumán', 'give'), |
|
1707 | 1707 | ); |
1708 | 1708 | |
1709 | - return apply_filters( 'give_argentina_states', $states ); |
|
1709 | + return apply_filters('give_argentina_states', $states); |
|
1710 | 1710 | } |
1711 | 1711 | |
1712 | 1712 | /** |
@@ -1787,7 +1787,7 @@ discard block |
||
1787 | 1787 | 'AP' => 'Armed Forces - Pacific', |
1788 | 1788 | ); |
1789 | 1789 | |
1790 | - return apply_filters( 'give_us_states', $states ); |
|
1790 | + return apply_filters('give_us_states', $states); |
|
1791 | 1791 | } |
1792 | 1792 | |
1793 | 1793 | /** |
@@ -1800,22 +1800,22 @@ discard block |
||
1800 | 1800 | function give_get_provinces_list() { |
1801 | 1801 | $provinces = array( |
1802 | 1802 | '' => '', |
1803 | - 'AB' => esc_html__( 'Alberta', 'give' ), |
|
1804 | - 'BC' => esc_html__( 'British Columbia', 'give' ), |
|
1805 | - 'MB' => esc_html__( 'Manitoba', 'give' ), |
|
1806 | - 'NB' => esc_html__( 'New Brunswick', 'give' ), |
|
1807 | - 'NL' => esc_html__( 'Newfoundland and Labrador', 'give' ), |
|
1808 | - 'NS' => esc_html__( 'Nova Scotia', 'give' ), |
|
1809 | - 'NT' => esc_html__( 'Northwest Territories', 'give' ), |
|
1810 | - 'NU' => esc_html__( 'Nunavut', 'give' ), |
|
1811 | - 'ON' => esc_html__( 'Ontario', 'give' ), |
|
1812 | - 'PE' => esc_html__( 'Prince Edward Island', 'give' ), |
|
1813 | - 'QC' => esc_html__( 'Quebec', 'give' ), |
|
1814 | - 'SK' => esc_html__( 'Saskatchewan', 'give' ), |
|
1815 | - 'YT' => esc_html__( 'Yukon', 'give' ), |
|
1803 | + 'AB' => esc_html__('Alberta', 'give'), |
|
1804 | + 'BC' => esc_html__('British Columbia', 'give'), |
|
1805 | + 'MB' => esc_html__('Manitoba', 'give'), |
|
1806 | + 'NB' => esc_html__('New Brunswick', 'give'), |
|
1807 | + 'NL' => esc_html__('Newfoundland and Labrador', 'give'), |
|
1808 | + 'NS' => esc_html__('Nova Scotia', 'give'), |
|
1809 | + 'NT' => esc_html__('Northwest Territories', 'give'), |
|
1810 | + 'NU' => esc_html__('Nunavut', 'give'), |
|
1811 | + 'ON' => esc_html__('Ontario', 'give'), |
|
1812 | + 'PE' => esc_html__('Prince Edward Island', 'give'), |
|
1813 | + 'QC' => esc_html__('Quebec', 'give'), |
|
1814 | + 'SK' => esc_html__('Saskatchewan', 'give'), |
|
1815 | + 'YT' => esc_html__('Yukon', 'give'), |
|
1816 | 1816 | ); |
1817 | 1817 | |
1818 | - return apply_filters( 'give_canada_provinces', $provinces ); |
|
1818 | + return apply_filters('give_canada_provinces', $provinces); |
|
1819 | 1819 | } |
1820 | 1820 | |
1821 | 1821 | /** |
@@ -1837,7 +1837,7 @@ discard block |
||
1837 | 1837 | 'WA' => 'Western Australia', |
1838 | 1838 | ); |
1839 | 1839 | |
1840 | - return apply_filters( 'give_australian_states', $states ); |
|
1840 | + return apply_filters('give_australian_states', $states); |
|
1841 | 1841 | } |
1842 | 1842 | |
1843 | 1843 | /** |
@@ -1878,7 +1878,7 @@ discard block |
||
1878 | 1878 | 'TO' => 'Tocantins', |
1879 | 1879 | ); |
1880 | 1880 | |
1881 | - return apply_filters( 'give_brazil_states', $states ); |
|
1881 | + return apply_filters('give_brazil_states', $states); |
|
1882 | 1882 | } |
1883 | 1883 | |
1884 | 1884 | /** |
@@ -1895,7 +1895,7 @@ discard block |
||
1895 | 1895 | 'NEW TERRITORIES' => 'New Territories', |
1896 | 1896 | ); |
1897 | 1897 | |
1898 | - return apply_filters( 'give_hong_kong_states', $states ); |
|
1898 | + return apply_filters('give_hong_kong_states', $states); |
|
1899 | 1899 | } |
1900 | 1900 | |
1901 | 1901 | /** |
@@ -1929,7 +1929,7 @@ discard block |
||
1929 | 1929 | 'ZA' => 'Zala', |
1930 | 1930 | ); |
1931 | 1931 | |
1932 | - return apply_filters( 'give_hungary_states', $states ); |
|
1932 | + return apply_filters('give_hungary_states', $states); |
|
1933 | 1933 | } |
1934 | 1934 | |
1935 | 1935 | /** |
@@ -1975,7 +1975,7 @@ discard block |
||
1975 | 1975 | 'CN32' => 'Xinjiang / 新疆', |
1976 | 1976 | ); |
1977 | 1977 | |
1978 | - return apply_filters( 'give_chinese_states', $states ); |
|
1978 | + return apply_filters('give_chinese_states', $states); |
|
1979 | 1979 | } |
1980 | 1980 | |
1981 | 1981 | /** |
@@ -2004,7 +2004,7 @@ discard block |
||
2004 | 2004 | 'WC' => 'West Coast', |
2005 | 2005 | ); |
2006 | 2006 | |
2007 | - return apply_filters( 'give_new_zealand_states', $states ); |
|
2007 | + return apply_filters('give_new_zealand_states', $states); |
|
2008 | 2008 | } |
2009 | 2009 | |
2010 | 2010 | /** |
@@ -2052,7 +2052,7 @@ discard block |
||
2052 | 2052 | 'PB' => 'Papua Barat', |
2053 | 2053 | ); |
2054 | 2054 | |
2055 | - return apply_filters( 'give_indonesia_states', $states ); |
|
2055 | + return apply_filters('give_indonesia_states', $states); |
|
2056 | 2056 | } |
2057 | 2057 | |
2058 | 2058 | /** |
@@ -2102,7 +2102,7 @@ discard block |
||
2102 | 2102 | 'PY' => 'Pondicherry (Puducherry)', |
2103 | 2103 | ); |
2104 | 2104 | |
2105 | - return apply_filters( 'give_indian_states', $states ); |
|
2105 | + return apply_filters('give_indian_states', $states); |
|
2106 | 2106 | } |
2107 | 2107 | |
2108 | 2108 | /** |
@@ -2132,7 +2132,7 @@ discard block |
||
2132 | 2132 | 'PJY' => 'W.P. Putrajaya', |
2133 | 2133 | ); |
2134 | 2134 | |
2135 | - return apply_filters( 'give_malaysian_states', $states ); |
|
2135 | + return apply_filters('give_malaysian_states', $states); |
|
2136 | 2136 | } |
2137 | 2137 | |
2138 | 2138 | /** |
@@ -2155,7 +2155,7 @@ discard block |
||
2155 | 2155 | 'WC' => 'Western Cape', |
2156 | 2156 | ); |
2157 | 2157 | |
2158 | - return apply_filters( 'give_south_african_states', $states ); |
|
2158 | + return apply_filters('give_south_african_states', $states); |
|
2159 | 2159 | } |
2160 | 2160 | |
2161 | 2161 | /** |
@@ -2246,7 +2246,7 @@ discard block |
||
2246 | 2246 | 'TH-35' => 'Yasothon (ยโสธร)', |
2247 | 2247 | ); |
2248 | 2248 | |
2249 | - return apply_filters( 'give_thailand_states', $states ); |
|
2249 | + return apply_filters('give_thailand_states', $states); |
|
2250 | 2250 | } |
2251 | 2251 | |
2252 | 2252 | /** |
@@ -2258,59 +2258,59 @@ discard block |
||
2258 | 2258 | function give_get_spain_states_list() { |
2259 | 2259 | $states = array( |
2260 | 2260 | '' => '', |
2261 | - 'C' => esc_html__( 'A Coruña', 'give' ), |
|
2262 | - 'VI' => esc_html__( 'Álava', 'give' ), |
|
2263 | - 'AB' => esc_html__( 'Albacete', 'give' ), |
|
2264 | - 'A' => esc_html__( 'Alicante', 'give' ), |
|
2265 | - 'AL' => esc_html__( 'Almería', 'give' ), |
|
2266 | - 'O' => esc_html__( 'Asturias', 'give' ), |
|
2267 | - 'AV' => esc_html__( 'Ávila', 'give' ), |
|
2268 | - 'BA' => esc_html__( 'Badajoz', 'give' ), |
|
2269 | - 'PM' => esc_html__( 'Baleares', 'give' ), |
|
2270 | - 'B' => esc_html__( 'Barcelona', 'give' ), |
|
2271 | - 'BU' => esc_html__( 'Burgos', 'give' ), |
|
2272 | - 'CC' => esc_html__( 'Cáceres', 'give' ), |
|
2273 | - 'CA' => esc_html__( 'Cádiz', 'give' ), |
|
2274 | - 'S' => esc_html__( 'Cantabria', 'give' ), |
|
2275 | - 'CS' => esc_html__( 'Castellón', 'give' ), |
|
2276 | - 'CE' => esc_html__( 'Ceuta', 'give' ), |
|
2277 | - 'CR' => esc_html__( 'Ciudad Real', 'give' ), |
|
2278 | - 'CO' => esc_html__( 'Córdoba', 'give' ), |
|
2279 | - 'CU' => esc_html__( 'Cuenca', 'give' ), |
|
2280 | - 'GI' => esc_html__( 'Girona', 'give' ), |
|
2281 | - 'GR' => esc_html__( 'Granada', 'give' ), |
|
2282 | - 'GU' => esc_html__( 'Guadalajara', 'give' ), |
|
2283 | - 'SS' => esc_html__( 'Gipuzkoa', 'give' ), |
|
2284 | - 'H' => esc_html__( 'Huelva', 'give' ), |
|
2285 | - 'HU' => esc_html__( 'Huesca', 'give' ), |
|
2286 | - 'J' => esc_html__( 'Jaén', 'give' ), |
|
2287 | - 'LO' => esc_html__( 'La Rioja', 'give' ), |
|
2288 | - 'GC' => esc_html__( 'Las Palmas', 'give' ), |
|
2289 | - 'LE' => esc_html__( 'León', 'give' ), |
|
2290 | - 'L' => esc_html__( 'Lleida', 'give' ), |
|
2291 | - 'LU' => esc_html__( 'Lugo', 'give' ), |
|
2292 | - 'M' => esc_html__( 'Madrid', 'give' ), |
|
2293 | - 'MA' => esc_html__( 'Málaga', 'give' ), |
|
2294 | - 'ML' => esc_html__( 'Melilla', 'give' ), |
|
2295 | - 'MU' => esc_html__( 'Murcia', 'give' ), |
|
2296 | - 'NA' => esc_html__( 'Navarra', 'give' ), |
|
2297 | - 'OR' => esc_html__( 'Ourense', 'give' ), |
|
2298 | - 'P' => esc_html__( 'Palencia', 'give' ), |
|
2299 | - 'PO' => esc_html__( 'Pontevedra', 'give' ), |
|
2300 | - 'SA' => esc_html__( 'Salamanca', 'give' ), |
|
2301 | - 'TF' => esc_html__( 'Santa Cruz de Tenerife', 'give' ), |
|
2302 | - 'SG' => esc_html__( 'Segovia', 'give' ), |
|
2303 | - 'SE' => esc_html__( 'Sevilla', 'give' ), |
|
2304 | - 'SO' => esc_html__( 'Soria', 'give' ), |
|
2305 | - 'T' => esc_html__( 'Tarragona', 'give' ), |
|
2306 | - 'TE' => esc_html__( 'Teruel', 'give' ), |
|
2307 | - 'TO' => esc_html__( 'Toledo', 'give' ), |
|
2308 | - 'V' => esc_html__( 'Valencia', 'give' ), |
|
2309 | - 'VA' => esc_html__( 'Valladolid', 'give' ), |
|
2310 | - 'BI' => esc_html__( 'Bizkaia', 'give' ), |
|
2311 | - 'ZA' => esc_html__( 'Zamora', 'give' ), |
|
2312 | - 'Z' => esc_html__( 'Zaragoza', 'give' ), |
|
2261 | + 'C' => esc_html__('A Coruña', 'give'), |
|
2262 | + 'VI' => esc_html__('Álava', 'give'), |
|
2263 | + 'AB' => esc_html__('Albacete', 'give'), |
|
2264 | + 'A' => esc_html__('Alicante', 'give'), |
|
2265 | + 'AL' => esc_html__('Almería', 'give'), |
|
2266 | + 'O' => esc_html__('Asturias', 'give'), |
|
2267 | + 'AV' => esc_html__('Ávila', 'give'), |
|
2268 | + 'BA' => esc_html__('Badajoz', 'give'), |
|
2269 | + 'PM' => esc_html__('Baleares', 'give'), |
|
2270 | + 'B' => esc_html__('Barcelona', 'give'), |
|
2271 | + 'BU' => esc_html__('Burgos', 'give'), |
|
2272 | + 'CC' => esc_html__('Cáceres', 'give'), |
|
2273 | + 'CA' => esc_html__('Cádiz', 'give'), |
|
2274 | + 'S' => esc_html__('Cantabria', 'give'), |
|
2275 | + 'CS' => esc_html__('Castellón', 'give'), |
|
2276 | + 'CE' => esc_html__('Ceuta', 'give'), |
|
2277 | + 'CR' => esc_html__('Ciudad Real', 'give'), |
|
2278 | + 'CO' => esc_html__('Córdoba', 'give'), |
|
2279 | + 'CU' => esc_html__('Cuenca', 'give'), |
|
2280 | + 'GI' => esc_html__('Girona', 'give'), |
|
2281 | + 'GR' => esc_html__('Granada', 'give'), |
|
2282 | + 'GU' => esc_html__('Guadalajara', 'give'), |
|
2283 | + 'SS' => esc_html__('Gipuzkoa', 'give'), |
|
2284 | + 'H' => esc_html__('Huelva', 'give'), |
|
2285 | + 'HU' => esc_html__('Huesca', 'give'), |
|
2286 | + 'J' => esc_html__('Jaén', 'give'), |
|
2287 | + 'LO' => esc_html__('La Rioja', 'give'), |
|
2288 | + 'GC' => esc_html__('Las Palmas', 'give'), |
|
2289 | + 'LE' => esc_html__('León', 'give'), |
|
2290 | + 'L' => esc_html__('Lleida', 'give'), |
|
2291 | + 'LU' => esc_html__('Lugo', 'give'), |
|
2292 | + 'M' => esc_html__('Madrid', 'give'), |
|
2293 | + 'MA' => esc_html__('Málaga', 'give'), |
|
2294 | + 'ML' => esc_html__('Melilla', 'give'), |
|
2295 | + 'MU' => esc_html__('Murcia', 'give'), |
|
2296 | + 'NA' => esc_html__('Navarra', 'give'), |
|
2297 | + 'OR' => esc_html__('Ourense', 'give'), |
|
2298 | + 'P' => esc_html__('Palencia', 'give'), |
|
2299 | + 'PO' => esc_html__('Pontevedra', 'give'), |
|
2300 | + 'SA' => esc_html__('Salamanca', 'give'), |
|
2301 | + 'TF' => esc_html__('Santa Cruz de Tenerife', 'give'), |
|
2302 | + 'SG' => esc_html__('Segovia', 'give'), |
|
2303 | + 'SE' => esc_html__('Sevilla', 'give'), |
|
2304 | + 'SO' => esc_html__('Soria', 'give'), |
|
2305 | + 'T' => esc_html__('Tarragona', 'give'), |
|
2306 | + 'TE' => esc_html__('Teruel', 'give'), |
|
2307 | + 'TO' => esc_html__('Toledo', 'give'), |
|
2308 | + 'V' => esc_html__('Valencia', 'give'), |
|
2309 | + 'VA' => esc_html__('Valladolid', 'give'), |
|
2310 | + 'BI' => esc_html__('Bizkaia', 'give'), |
|
2311 | + 'ZA' => esc_html__('Zamora', 'give'), |
|
2312 | + 'Z' => esc_html__('Zaragoza', 'give'), |
|
2313 | 2313 | ); |
2314 | 2314 | |
2315 | - return apply_filters( 'give_spain_states', $states ); |
|
2315 | + return apply_filters('give_spain_states', $states); |
|
2316 | 2316 | } |
@@ -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 | |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @return string $message Fully formatted message |
43 | 43 | */ |
44 | -function give_email_template_tags( $message, $payment_data, $payment_id, $admin_notice = false ) { |
|
45 | - return give_do_email_tags( $message, $payment_id ); |
|
44 | +function give_email_template_tags($message, $payment_data, $payment_id, $admin_notice = false) { |
|
45 | + return give_do_email_tags($message, $payment_id); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -56,45 +56,45 @@ discard block |
||
56 | 56 | * |
57 | 57 | * @return string $message Fully formatted message |
58 | 58 | */ |
59 | -function give_email_preview_template_tags( $message ) { |
|
59 | +function give_email_preview_template_tags($message) { |
|
60 | 60 | |
61 | - $price = give_currency_filter( give_format_amount( 10.50, array( 'sanitize' => false ) ) ); |
|
61 | + $price = give_currency_filter(give_format_amount(10.50, array('sanitize' => false))); |
|
62 | 62 | |
63 | 63 | $gateway = 'PayPal'; |
64 | 64 | |
65 | - $receipt_id = strtolower( md5( uniqid() ) ); |
|
65 | + $receipt_id = strtolower(md5(uniqid())); |
|
66 | 66 | |
67 | - $payment_id = rand( 1, 100 ); |
|
67 | + $payment_id = rand(1, 100); |
|
68 | 68 | |
69 | - $receipt_link_url = esc_url( add_query_arg( array( 'payment_key' => $receipt_id, 'give_action' => 'view_receipt' ), home_url() ) ); |
|
69 | + $receipt_link_url = esc_url(add_query_arg(array('payment_key' => $receipt_id, 'give_action' => 'view_receipt'), home_url())); |
|
70 | 70 | $receipt_link = sprintf( |
71 | 71 | '<a href="%1$s">%2$s</a>', |
72 | 72 | $receipt_link_url, |
73 | - esc_html__( 'View the receipt in your browser »', 'give' ) |
|
73 | + esc_html__('View the receipt in your browser »', 'give') |
|
74 | 74 | ); |
75 | 75 | |
76 | 76 | // Set user. |
77 | 77 | $user = wp_get_current_user(); |
78 | 78 | |
79 | - $message = str_replace( '{name}', $user->display_name, $message ); |
|
80 | - $message = str_replace( '{fullname}', $user->display_name, $message ); |
|
81 | - $message = str_replace( '{username}', $user->user_login, $message ); |
|
82 | - $message = str_replace( '{user_email}', $user->user_email, $message ); |
|
83 | - $message = str_replace( '{billing_address}', "123 Test Street, Unit 222\nSomewhere Town, CA, 92101", $message ); |
|
84 | - $message = str_replace( '{date}', date( give_date_format(), current_time( 'timestamp' ) ), $message ); |
|
85 | - $message = str_replace( '{amount}', $price, $message ); |
|
86 | - $message = str_replace( '{price}', $price, $message ); |
|
87 | - $message = str_replace( '{donation}', esc_html__( 'Sample Donation Form Title', 'give' ), $message ); |
|
88 | - $message = str_replace( '{form_title}', esc_html__( 'Sample Donation Form Title - Sample Donation Level', 'give' ), $message ); |
|
89 | - $message = str_replace( '{receipt_id}', $receipt_id, $message ); |
|
90 | - $message = str_replace( '{payment_method}', $gateway, $message ); |
|
91 | - $message = str_replace( '{sitename}', get_bloginfo( 'name' ), $message ); |
|
92 | - $message = str_replace( '{payment_id}', $payment_id, $message ); |
|
93 | - $message = str_replace( '{receipt_link}', $receipt_link, $message ); |
|
94 | - $message = str_replace( '{receipt_link_url}', $receipt_link_url, $message ); |
|
95 | - $message = str_replace( '{pdf_receipt}', '<a href="#">Download Receipt</a>', $message ); |
|
96 | - |
|
97 | - return wpautop( apply_filters( 'give_email_preview_template_tags', $message ) ); |
|
79 | + $message = str_replace('{name}', $user->display_name, $message); |
|
80 | + $message = str_replace('{fullname}', $user->display_name, $message); |
|
81 | + $message = str_replace('{username}', $user->user_login, $message); |
|
82 | + $message = str_replace('{user_email}', $user->user_email, $message); |
|
83 | + $message = str_replace('{billing_address}', "123 Test Street, Unit 222\nSomewhere Town, CA, 92101", $message); |
|
84 | + $message = str_replace('{date}', date(give_date_format(), current_time('timestamp')), $message); |
|
85 | + $message = str_replace('{amount}', $price, $message); |
|
86 | + $message = str_replace('{price}', $price, $message); |
|
87 | + $message = str_replace('{donation}', esc_html__('Sample Donation Form Title', 'give'), $message); |
|
88 | + $message = str_replace('{form_title}', esc_html__('Sample Donation Form Title - Sample Donation Level', 'give'), $message); |
|
89 | + $message = str_replace('{receipt_id}', $receipt_id, $message); |
|
90 | + $message = str_replace('{payment_method}', $gateway, $message); |
|
91 | + $message = str_replace('{sitename}', get_bloginfo('name'), $message); |
|
92 | + $message = str_replace('{payment_id}', $payment_id, $message); |
|
93 | + $message = str_replace('{receipt_link}', $receipt_link, $message); |
|
94 | + $message = str_replace('{receipt_link_url}', $receipt_link_url, $message); |
|
95 | + $message = str_replace('{pdf_receipt}', '<a href="#">Download Receipt</a>', $message); |
|
96 | + |
|
97 | + return wpautop(apply_filters('give_email_preview_template_tags', $message)); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -106,23 +106,23 @@ discard block |
||
106 | 106 | * @since 1.0 |
107 | 107 | * @return array|bool |
108 | 108 | */ |
109 | -function give_email_template_preview( $array ) { |
|
109 | +function give_email_template_preview($array) { |
|
110 | 110 | |
111 | - if ( ! current_user_can( 'manage_give_settings' ) ) { |
|
111 | + if ( ! current_user_can('manage_give_settings')) { |
|
112 | 112 | return false; |
113 | 113 | } |
114 | 114 | $custom_field = array( |
115 | - 'name' => esc_html__( 'Preview Email', 'give' ), |
|
116 | - 'desc' => esc_html__( 'Click the buttons to preview or send test emails.', 'give' ), |
|
115 | + 'name' => esc_html__('Preview Email', 'give'), |
|
116 | + 'desc' => esc_html__('Click the buttons to preview or send test emails.', 'give'), |
|
117 | 117 | 'id' => 'give_email_preview_buttons', |
118 | 118 | 'type' => 'email_preview_buttons' |
119 | 119 | ); |
120 | 120 | |
121 | - return give_settings_array_insert( $array, 'donation_subject', array( $custom_field ) ); |
|
121 | + return give_settings_array_insert($array, 'donation_subject', array($custom_field)); |
|
122 | 122 | |
123 | 123 | } |
124 | 124 | |
125 | -add_filter( 'give_settings_emails', 'give_email_template_preview' ); |
|
125 | +add_filter('give_settings_emails', 'give_email_template_preview'); |
|
126 | 126 | |
127 | 127 | /** |
128 | 128 | * Output Email Template Preview Buttons. |
@@ -134,12 +134,12 @@ discard block |
||
134 | 134 | function give_email_preview_buttons_callback() { |
135 | 135 | ob_start(); |
136 | 136 | ?> |
137 | - <a href="<?php echo esc_url( add_query_arg( array( 'give_action' => 'preview_email' ), home_url() ) ); ?>" class="button-secondary" target="_blank"><?php esc_html_e( 'Preview Donation Receipt', 'give' ); ?></a> |
|
138 | - <a href="<?php echo wp_nonce_url( add_query_arg( array( |
|
137 | + <a href="<?php echo esc_url(add_query_arg(array('give_action' => 'preview_email'), home_url())); ?>" class="button-secondary" target="_blank"><?php esc_html_e('Preview Donation Receipt', 'give'); ?></a> |
|
138 | + <a href="<?php echo wp_nonce_url(add_query_arg(array( |
|
139 | 139 | 'give_action' => 'send_test_email', |
140 | 140 | 'give-message' => 'sent-test-email', |
141 | 141 | 'tag' => 'emails' |
142 | - ) ), 'give-test-email' ); ?>" aria-label="<?php esc_attr_e( 'Send demo donation receipt to the emails listed below.', 'give' ); ?>" class="button-secondary"><?php esc_html_e( 'Send Test Email', 'give' ); ?></a> |
|
142 | + )), 'give-test-email'); ?>" aria-label="<?php esc_attr_e('Send demo donation receipt to the emails listed below.', 'give'); ?>" class="button-secondary"><?php esc_html_e('Send Test Email', 'give'); ?></a> |
|
143 | 143 | <?php |
144 | 144 | echo ob_get_clean(); |
145 | 145 | } |
@@ -152,46 +152,46 @@ discard block |
||
152 | 152 | */ |
153 | 153 | function give_display_email_template_preview() { |
154 | 154 | |
155 | - if ( empty( $_GET['give_action'] ) ) { |
|
155 | + if (empty($_GET['give_action'])) { |
|
156 | 156 | return; |
157 | 157 | } |
158 | 158 | |
159 | - if ( 'preview_email' !== $_GET['give_action'] ) { |
|
159 | + if ('preview_email' !== $_GET['give_action']) { |
|
160 | 160 | return; |
161 | 161 | } |
162 | 162 | |
163 | - if ( ! current_user_can( 'manage_give_settings' ) ) { |
|
163 | + if ( ! current_user_can('manage_give_settings')) { |
|
164 | 164 | return; |
165 | 165 | } |
166 | 166 | |
167 | 167 | |
168 | - Give()->emails->heading = esc_html__( 'Donation Receipt', 'give' ); |
|
168 | + Give()->emails->heading = esc_html__('Donation Receipt', 'give'); |
|
169 | 169 | |
170 | - $payment_id = (int) isset( $_GET['preview_id'] ) ? $_GET['preview_id'] : ''; |
|
170 | + $payment_id = (int) isset($_GET['preview_id']) ? $_GET['preview_id'] : ''; |
|
171 | 171 | |
172 | 172 | echo give_get_preview_email_header(); |
173 | 173 | |
174 | 174 | //Are we previewing an actual payment? |
175 | - if ( ! empty( $payment_id ) ) { |
|
175 | + if ( ! empty($payment_id)) { |
|
176 | 176 | |
177 | - $content = give_get_email_body_content( $payment_id ); |
|
177 | + $content = give_get_email_body_content($payment_id); |
|
178 | 178 | |
179 | - $preview_content = give_do_email_tags( $content, $payment_id ); |
|
179 | + $preview_content = give_do_email_tags($content, $payment_id); |
|
180 | 180 | |
181 | 181 | } else { |
182 | 182 | |
183 | 183 | //No payment ID, use sample preview content |
184 | - $preview_content = give_email_preview_template_tags( give_get_email_body_content( 0, array() ) ); |
|
184 | + $preview_content = give_email_preview_template_tags(give_get_email_body_content(0, array())); |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | |
188 | - echo Give()->emails->build_email( $preview_content ); |
|
188 | + echo Give()->emails->build_email($preview_content); |
|
189 | 189 | |
190 | 190 | exit; |
191 | 191 | |
192 | 192 | } |
193 | 193 | |
194 | -add_action( 'init', 'give_display_email_template_preview' ); |
|
194 | +add_action('init', 'give_display_email_template_preview'); |
|
195 | 195 | |
196 | 196 | /** |
197 | 197 | * Email Template Body. |
@@ -203,18 +203,18 @@ discard block |
||
203 | 203 | * |
204 | 204 | * @return string $email_body Body of the email |
205 | 205 | */ |
206 | -function give_get_email_body_content( $payment_id = 0, $payment_data = array() ) { |
|
206 | +function give_get_email_body_content($payment_id = 0, $payment_data = array()) { |
|
207 | 207 | |
208 | 208 | $default_email_body = give_get_default_donation_receipt_email(); |
209 | 209 | |
210 | - $email_content = give_get_option( 'donation_receipt' ); |
|
211 | - $email_content = ( $email_content ) ? stripslashes( $email_content ) : $default_email_body; |
|
210 | + $email_content = give_get_option('donation_receipt'); |
|
211 | + $email_content = ($email_content) ? stripslashes($email_content) : $default_email_body; |
|
212 | 212 | |
213 | - $email_body = wpautop( $email_content ); |
|
213 | + $email_body = wpautop($email_content); |
|
214 | 214 | |
215 | - $email_body = apply_filters( 'give_donation_receipt_' . Give()->emails->get_template(), $email_body, $payment_id, $payment_data ); |
|
215 | + $email_body = apply_filters('give_donation_receipt_'.Give()->emails->get_template(), $email_body, $payment_id, $payment_data); |
|
216 | 216 | |
217 | - return apply_filters( 'give_donation_receipt', $email_body, $payment_id, $payment_data ); |
|
217 | + return apply_filters('give_donation_receipt', $email_body, $payment_id, $payment_data); |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | /** |
@@ -227,36 +227,36 @@ discard block |
||
227 | 227 | * |
228 | 228 | * @return string $email_body Body of the email |
229 | 229 | */ |
230 | -function give_get_donation_notification_body_content( $payment_id = 0, $payment_data = array() ) { |
|
230 | +function give_get_donation_notification_body_content($payment_id = 0, $payment_data = array()) { |
|
231 | 231 | |
232 | - $user_info = maybe_unserialize( $payment_data['user_info'] ); |
|
233 | - $email = give_get_payment_user_email( $payment_id ); |
|
232 | + $user_info = maybe_unserialize($payment_data['user_info']); |
|
233 | + $email = give_get_payment_user_email($payment_id); |
|
234 | 234 | |
235 | - if ( isset( $user_info['id'] ) && $user_info['id'] > 0 ) { |
|
236 | - $user_data = get_userdata( $user_info['id'] ); |
|
235 | + if (isset($user_info['id']) && $user_info['id'] > 0) { |
|
236 | + $user_data = get_userdata($user_info['id']); |
|
237 | 237 | $name = $user_data->display_name; |
238 | - } elseif ( isset( $user_info['first_name'] ) && isset( $user_info['last_name'] ) ) { |
|
239 | - $name = $user_info['first_name'] . ' ' . $user_info['last_name']; |
|
238 | + } elseif (isset($user_info['first_name']) && isset($user_info['last_name'])) { |
|
239 | + $name = $user_info['first_name'].' '.$user_info['last_name']; |
|
240 | 240 | } else { |
241 | 241 | $name = $email; |
242 | 242 | } |
243 | 243 | |
244 | - $gateway = give_get_gateway_admin_label( give_get_meta( $payment_id, '_give_payment_gateway', true ) ); |
|
244 | + $gateway = give_get_gateway_admin_label(give_get_meta($payment_id, '_give_payment_gateway', true)); |
|
245 | 245 | |
246 | - $default_email_body = esc_html__( 'Hello', 'give' ) . "\n\n"; |
|
247 | - $default_email_body .= esc_html__( 'A donation has been made.', 'give' ) . "\n\n"; |
|
248 | - $default_email_body .= esc_html__( 'Donation:', 'give' ) . "\n\n"; |
|
249 | - $default_email_body .= esc_html__( 'Donor:', 'give' ) . ' ' . html_entity_decode( $name, ENT_COMPAT, 'UTF-8' ) . "\n"; |
|
250 | - $default_email_body .= esc_html__( 'Amount:', 'give' ) . ' ' . html_entity_decode( give_currency_filter( give_format_amount( give_get_payment_amount( $payment_id ), array( 'sanitize' => false ) ) ), ENT_COMPAT, 'UTF-8' ) . "\n"; |
|
251 | - $default_email_body .= esc_html__( 'Payment Method:', 'give' ) . ' ' . $gateway . "\n\n"; |
|
252 | - $default_email_body .= esc_html__( 'Thank you', 'give' ); |
|
246 | + $default_email_body = esc_html__('Hello', 'give')."\n\n"; |
|
247 | + $default_email_body .= esc_html__('A donation has been made.', 'give')."\n\n"; |
|
248 | + $default_email_body .= esc_html__('Donation:', 'give')."\n\n"; |
|
249 | + $default_email_body .= esc_html__('Donor:', 'give').' '.html_entity_decode($name, ENT_COMPAT, 'UTF-8')."\n"; |
|
250 | + $default_email_body .= esc_html__('Amount:', 'give').' '.html_entity_decode(give_currency_filter(give_format_amount(give_get_payment_amount($payment_id), array('sanitize' => false))), ENT_COMPAT, 'UTF-8')."\n"; |
|
251 | + $default_email_body .= esc_html__('Payment Method:', 'give').' '.$gateway."\n\n"; |
|
252 | + $default_email_body .= esc_html__('Thank you', 'give'); |
|
253 | 253 | |
254 | - $email = give_get_option( 'donation_notification' ); |
|
255 | - $email = isset( $email ) ? stripslashes( $email ) : $default_email_body; |
|
254 | + $email = give_get_option('donation_notification'); |
|
255 | + $email = isset($email) ? stripslashes($email) : $default_email_body; |
|
256 | 256 | |
257 | - $email_body = give_do_email_tags( $email, $payment_id ); |
|
257 | + $email_body = give_do_email_tags($email, $payment_id); |
|
258 | 258 | |
259 | - return apply_filters( 'give_donation_notification', wpautop( $email_body ), $payment_id, $payment_data ); |
|
259 | + return apply_filters('give_donation_notification', wpautop($email_body), $payment_id, $payment_data); |
|
260 | 260 | } |
261 | 261 | |
262 | 262 | /** |
@@ -269,19 +269,19 @@ discard block |
||
269 | 269 | * @since 1.0 |
270 | 270 | */ |
271 | 271 | function give_render_receipt_in_browser() { |
272 | - if ( ! isset( $_GET['payment_key'] ) ) { |
|
273 | - wp_die( esc_html__( 'Missing donation payment key.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 400 ) ); |
|
272 | + if ( ! isset($_GET['payment_key'])) { |
|
273 | + wp_die(esc_html__('Missing donation payment key.', 'give'), esc_html__('Error', 'give'), array('response' => 400)); |
|
274 | 274 | } |
275 | 275 | |
276 | - $key = urlencode( $_GET['payment_key'] ); |
|
276 | + $key = urlencode($_GET['payment_key']); |
|
277 | 277 | |
278 | 278 | ob_start(); |
279 | 279 | //Disallows caching of the page |
280 | - header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . " GMT" ); |
|
281 | - header( "Cache-Control: no-store, no-cache, must-revalidate" ); // HTTP/1.1 |
|
282 | - header( "Cache-Control: post-check=0, pre-check=0", false ); |
|
283 | - header( "Pragma: no-cache" ); // HTTP/1.0 |
|
284 | - header( "Expires: Sat, 23 Oct 1977 05:00:00 PST" ); // Date in the past |
|
280 | + header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
281 | + header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 |
|
282 | + header("Cache-Control: post-check=0, pre-check=0", false); |
|
283 | + header("Pragma: no-cache"); // HTTP/1.0 |
|
284 | + header("Expires: Sat, 23 Oct 1977 05:00:00 PST"); // Date in the past |
|
285 | 285 | ?> |
286 | 286 | <!DOCTYPE html> |
287 | 287 | <html lang="en"> |
@@ -292,10 +292,10 @@ discard block |
||
292 | 292 | * |
293 | 293 | * @since 1.0 |
294 | 294 | */ |
295 | - do_action( 'give_receipt_head' ); |
|
295 | + do_action('give_receipt_head'); |
|
296 | 296 | ?> |
297 | 297 | </head> |
298 | - <body class="<?php echo apply_filters( 'give_receipt_page_body_class', 'give_receipt_page' ); ?>"> |
|
298 | + <body class="<?php echo apply_filters('give_receipt_page_body_class', 'give_receipt_page'); ?>"> |
|
299 | 299 | |
300 | 300 | <div id="give_receipt_wrapper"> |
301 | 301 | <?php |
@@ -304,16 +304,16 @@ discard block |
||
304 | 304 | * |
305 | 305 | * @since 1.0 |
306 | 306 | */ |
307 | - do_action( 'give_render_receipt_in_browser_before' ); |
|
307 | + do_action('give_render_receipt_in_browser_before'); |
|
308 | 308 | |
309 | - echo do_shortcode( '[give_receipt payment_key=' . $key . ']' ); |
|
309 | + echo do_shortcode('[give_receipt payment_key='.$key.']'); |
|
310 | 310 | |
311 | 311 | /** |
312 | 312 | * Fires in the receipt template after the content. |
313 | 313 | * |
314 | 314 | * @since 1.0 |
315 | 315 | */ |
316 | - do_action( 'give_render_receipt_in_browser_after' ); |
|
316 | + do_action('give_render_receipt_in_browser_after'); |
|
317 | 317 | ?> |
318 | 318 | </div> |
319 | 319 | |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | * |
324 | 324 | * @since 1.0 |
325 | 325 | */ |
326 | - do_action( 'give_receipt_footer' ); |
|
326 | + do_action('give_receipt_footer'); |
|
327 | 327 | ?> |
328 | 328 | </body> |
329 | 329 | </html> |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | die(); |
333 | 333 | } |
334 | 334 | |
335 | -add_action( 'give_view_receipt', 'give_render_receipt_in_browser' ); |
|
335 | +add_action('give_view_receipt', 'give_render_receipt_in_browser'); |
|
336 | 336 | |
337 | 337 | |
338 | 338 | /** |
@@ -347,29 +347,29 @@ discard block |
||
347 | 347 | |
348 | 348 | //Payment receipt switcher |
349 | 349 | $payment_count = give_count_payments()->publish; |
350 | - $payment_id = (int) isset( $_GET['preview_id'] ) ? $_GET['preview_id'] : ''; |
|
350 | + $payment_id = (int) isset($_GET['preview_id']) ? $_GET['preview_id'] : ''; |
|
351 | 351 | |
352 | - if ( $payment_count <= 0 ) { |
|
352 | + if ($payment_count <= 0) { |
|
353 | 353 | return false; |
354 | 354 | } |
355 | 355 | |
356 | 356 | //Get payments. |
357 | - $payments = new Give_Payments_Query( array( |
|
357 | + $payments = new Give_Payments_Query(array( |
|
358 | 358 | 'number' => 100 |
359 | - ) ); |
|
359 | + )); |
|
360 | 360 | $payments = $payments->get_payments(); |
361 | 361 | $options = array(); |
362 | 362 | |
363 | 363 | //Provide nice human readable options. |
364 | - if ( $payments ) { |
|
365 | - $options[0] = esc_html__( '- Select a donation -', 'give' ); |
|
366 | - foreach ( $payments as $payment ) { |
|
364 | + if ($payments) { |
|
365 | + $options[0] = esc_html__('- Select a donation -', 'give'); |
|
366 | + foreach ($payments as $payment) { |
|
367 | 367 | |
368 | - $options[ $payment->ID ] = esc_html( '#' . $payment->ID . ' - ' . $payment->email . ' - ' . $payment->form_title ); |
|
368 | + $options[$payment->ID] = esc_html('#'.$payment->ID.' - '.$payment->email.' - '.$payment->form_title); |
|
369 | 369 | |
370 | 370 | } |
371 | 371 | } else { |
372 | - $options[0] = esc_html__( 'No donations found.', 'give' ); |
|
372 | + $options[0] = esc_html__('No donations found.', 'give'); |
|
373 | 373 | } |
374 | 374 | |
375 | 375 | //Start constructing HTML output. |
@@ -382,16 +382,16 @@ discard block |
||
382 | 382 | var selected_trans = transactions.options[transactions.selectedIndex]; |
383 | 383 | console.log(selected_trans); |
384 | 384 | if (selected_trans){ |
385 | - var url_string = "' . get_bloginfo( 'url' ) . '?give_action=preview_email&preview_id=" + selected_trans.value; |
|
385 | + var url_string = "' . get_bloginfo('url').'?give_action=preview_email&preview_id=" + selected_trans.value; |
|
386 | 386 | window.location = url_string; |
387 | 387 | } |
388 | 388 | } |
389 | 389 | </script>'; |
390 | 390 | |
391 | - $transaction_header .= '<label for="give_preview_email_payment_id" style="font-size:12px;color:#333;margin:0 4px 0 0;">' . esc_html__( 'Preview email with a donation:', 'give' ) . '</label>'; |
|
391 | + $transaction_header .= '<label for="give_preview_email_payment_id" style="font-size:12px;color:#333;margin:0 4px 0 0;">'.esc_html__('Preview email with a donation:', 'give').'</label>'; |
|
392 | 392 | |
393 | 393 | //The select field with 100 latest transactions |
394 | - $transaction_header .= Give()->html->select( array( |
|
394 | + $transaction_header .= Give()->html->select(array( |
|
395 | 395 | 'name' => 'preview_email_payment_id', |
396 | 396 | 'selected' => $payment_id, |
397 | 397 | 'id' => 'give_preview_email_payment_id', |
@@ -401,12 +401,12 @@ discard block |
||
401 | 401 | 'select_atts' => 'onchange="change_preview()">', |
402 | 402 | 'show_option_all' => false, |
403 | 403 | 'show_option_none' => false |
404 | - ) ); |
|
404 | + )); |
|
405 | 405 | |
406 | 406 | //Closing tag |
407 | 407 | $transaction_header .= '</div>'; |
408 | 408 | |
409 | - return apply_filters( 'give_preview_email_receipt_header', $transaction_header ); |
|
409 | + return apply_filters('give_preview_email_receipt_header', $transaction_header); |
|
410 | 410 | |
411 | 411 | } |
412 | 412 | |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | function give_receipt_head_content() { |
421 | 421 | |
422 | 422 | //Title. |
423 | - $output = '<title>' . esc_html__( 'Donation Receipt', 'give' ) . '</title>'; |
|
423 | + $output = '<title>'.esc_html__('Donation Receipt', 'give').'</title>'; |
|
424 | 424 | |
425 | 425 | //Meta. |
426 | 426 | $output .= '<meta charset="utf-8"/> |
@@ -434,10 +434,10 @@ discard block |
||
434 | 434 | <meta name="robots" content="noindex, nofollow"/>'; |
435 | 435 | |
436 | 436 | //CSS |
437 | - $output .= '<link rel="stylesheet" href="' . give_get_stylesheet_uri() . '?ver=' . GIVE_VERSION . '">'; |
|
437 | + $output .= '<link rel="stylesheet" href="'.give_get_stylesheet_uri().'?ver='.GIVE_VERSION.'">'; |
|
438 | 438 | |
439 | - echo apply_filters( 'give_receipt_head_content', $output ); |
|
439 | + echo apply_filters('give_receipt_head_content', $output); |
|
440 | 440 | |
441 | 441 | } |
442 | 442 | |
443 | -add_action( 'give_receipt_head', 'give_receipt_head_content' ); |
|
444 | 443 | \ No newline at end of file |
444 | +add_action('give_receipt_head', 'give_receipt_head_content'); |
|
445 | 445 | \ No newline at end of file |
@@ -6,16 +6,16 @@ discard block |
||
6 | 6 | * @version 1.0 |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) { |
|
9 | +if ( ! defined('ABSPATH')) { |
|
10 | 10 | exit; |
11 | 11 | } // Exit if accessed directly. |
12 | 12 | |
13 | 13 | // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline. !important; is a gmail hack to prevent styles being stripped if it doesn't like something. |
14 | -$body = " |
|
14 | +$body = " |
|
15 | 15 | background-color: #f6f6f6; |
16 | 16 | font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; |
17 | 17 | "; |
18 | -$wrapper = " |
|
18 | +$wrapper = " |
|
19 | 19 | width:100%; |
20 | 20 | -webkit-text-size-adjust:none !important; |
21 | 21 | margin:0; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | text-align: center; |
43 | 43 | vertical-align:middle; |
44 | 44 | "; |
45 | -$body_content = " |
|
45 | +$body_content = " |
|
46 | 46 | border-radius:3px !important; |
47 | 47 | font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; |
48 | 48 | "; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | line-height:150%; |
54 | 54 | text-align:left; |
55 | 55 | "; |
56 | -$header_content_h1 = " |
|
56 | +$header_content_h1 = " |
|
57 | 57 | color: #000000; |
58 | 58 | margin:0; |
59 | 59 | padding: 28px 24px; |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | font-weight: 500; |
64 | 64 | line-height: 1.2; |
65 | 65 | "; |
66 | -$header_img = give_get_option( 'email_logo', '' ); |
|
66 | +$header_img = give_get_option('email_logo', ''); |
|
67 | 67 | ?> |
68 | 68 | <!DOCTYPE html> |
69 | 69 | <html> |
70 | 70 | <head> |
71 | 71 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
72 | - <title><?php echo get_bloginfo( 'name' ); ?></title> |
|
72 | + <title><?php echo get_bloginfo('name'); ?></title> |
|
73 | 73 | </head> |
74 | 74 | <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" style="<?php echo $body; ?>"> |
75 | 75 | <div style="<?php echo $wrapper; ?>"> |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | <tr> |
78 | 78 | <td align="center" valign="top"> |
79 | 79 | <?php |
80 | - if ( ! empty( $header_img ) ) : ?> |
|
80 | + if ( ! empty($header_img)) : ?> |
|
81 | 81 | <div id="template_header_image"> |
82 | - <?php echo '<p style="margin-top:0;"><img style="' . $template_image . '" src="' . esc_url( $header_img ) . '" alt="' . get_bloginfo( 'name' ) . '" /></p>'; ?> |
|
82 | + <?php echo '<p style="margin-top:0;"><img style="'.$template_image.'" src="'.esc_url($header_img).'" alt="'.get_bloginfo('name').'" /></p>'; ?> |
|
83 | 83 | </div> |
84 | 84 | <?php endif; ?> |
85 | 85 | <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container" style="<?php echo $template_container; ?>"> |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @version 1.0 |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
9 | +if ( ! defined('ABSPATH')) exit; // Exit if accessed directly. |
|
10 | 10 | |
11 | 11 | // {email} is replaced by the content entered in Donations > Settings > Emails |
12 | 12 |
@@ -6,7 +6,10 @@ |
||
6 | 6 | * @version 1.0 |
7 | 7 | */ |
8 | 8 | |
9 | -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
|
9 | +if ( ! defined( 'ABSPATH' ) ) { |
|
10 | + exit; |
|
11 | +} |
|
12 | +// Exit if accessed directly. |
|
10 | 13 | |
11 | 14 | // {email} is replaced by the content entered in Donations > Settings > Emails |
12 | 15 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | */ |
13 | 13 | |
14 | 14 | // Exit if accessed directly. |
15 | -if ( ! defined( 'ABSPATH' ) ) { |
|
15 | +if ( ! defined('ABSPATH')) { |
|
16 | 16 | exit; |
17 | 17 | } |
18 | 18 | |
@@ -30,54 +30,54 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @return bool|array List of all user donations. |
32 | 32 | */ |
33 | -function give_get_users_donations( $user = 0, $number = 20, $pagination = false, $status = 'complete' ) { |
|
33 | +function give_get_users_donations($user = 0, $number = 20, $pagination = false, $status = 'complete') { |
|
34 | 34 | |
35 | - if ( empty( $user ) ) { |
|
35 | + if (empty($user)) { |
|
36 | 36 | $user = get_current_user_id(); |
37 | 37 | } |
38 | 38 | |
39 | - if ( 0 === $user && ! Give()->email_access->token_exists ) { |
|
39 | + if (0 === $user && ! Give()->email_access->token_exists) { |
|
40 | 40 | return false; |
41 | 41 | } |
42 | 42 | |
43 | 43 | $status = $status === 'complete' ? 'publish' : $status; |
44 | 44 | $paged = 1; |
45 | 45 | |
46 | - if ( $pagination ) { |
|
47 | - if ( get_query_var( 'paged' ) ) { |
|
48 | - $paged = get_query_var( 'paged' ); |
|
49 | - } elseif ( get_query_var( 'page' ) ) { |
|
50 | - $paged = get_query_var( 'page' ); |
|
46 | + if ($pagination) { |
|
47 | + if (get_query_var('paged')) { |
|
48 | + $paged = get_query_var('paged'); |
|
49 | + } elseif (get_query_var('page')) { |
|
50 | + $paged = get_query_var('page'); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
54 | - $args = apply_filters( 'give_get_users_donations_args', array( |
|
54 | + $args = apply_filters('give_get_users_donations_args', array( |
|
55 | 55 | 'user' => $user, |
56 | 56 | 'number' => $number, |
57 | 57 | 'status' => $status, |
58 | 58 | 'orderby' => 'date', |
59 | - ) ); |
|
59 | + )); |
|
60 | 60 | |
61 | - if ( $pagination ) { |
|
61 | + if ($pagination) { |
|
62 | 62 | $args['page'] = $paged; |
63 | 63 | } else { |
64 | 64 | $args['nopaging'] = true; |
65 | 65 | } |
66 | 66 | |
67 | - $by_user_id = is_numeric( $user ) ? true : false; |
|
68 | - $donor = new Give_Donor( $user, $by_user_id ); |
|
67 | + $by_user_id = is_numeric($user) ? true : false; |
|
68 | + $donor = new Give_Donor($user, $by_user_id); |
|
69 | 69 | |
70 | - if ( ! empty( $donor->payment_ids ) ) { |
|
70 | + if ( ! empty($donor->payment_ids)) { |
|
71 | 71 | |
72 | - unset( $args['user'] ); |
|
73 | - $args['post__in'] = array_map( 'absint', explode( ',', $donor->payment_ids ) ); |
|
72 | + unset($args['user']); |
|
73 | + $args['post__in'] = array_map('absint', explode(',', $donor->payment_ids)); |
|
74 | 74 | |
75 | 75 | } |
76 | 76 | |
77 | - $donations = give_get_payments( apply_filters( 'give_get_users_donations_args', $args ) ); |
|
77 | + $donations = give_get_payments(apply_filters('give_get_users_donations_args', $args)); |
|
78 | 78 | |
79 | 79 | // No donations |
80 | - if ( ! $donations ) { |
|
80 | + if ( ! $donations) { |
|
81 | 81 | return false; |
82 | 82 | } |
83 | 83 | |
@@ -96,65 +96,65 @@ discard block |
||
96 | 96 | * |
97 | 97 | * @return bool|object List of unique forms donated by user |
98 | 98 | */ |
99 | -function give_get_users_completed_donations( $user = 0, $status = 'complete' ) { |
|
100 | - if ( empty( $user ) ) { |
|
99 | +function give_get_users_completed_donations($user = 0, $status = 'complete') { |
|
100 | + if (empty($user)) { |
|
101 | 101 | $user = get_current_user_id(); |
102 | 102 | } |
103 | 103 | |
104 | - if ( empty( $user ) ) { |
|
104 | + if (empty($user)) { |
|
105 | 105 | return false; |
106 | 106 | } |
107 | 107 | |
108 | - $by_user_id = is_numeric( $user ) ? true : false; |
|
108 | + $by_user_id = is_numeric($user) ? true : false; |
|
109 | 109 | |
110 | - $donor = new Give_Donor( $user, $by_user_id ); |
|
110 | + $donor = new Give_Donor($user, $by_user_id); |
|
111 | 111 | |
112 | - if ( empty( $donor->payment_ids ) ) { |
|
112 | + if (empty($donor->payment_ids)) { |
|
113 | 113 | return false; |
114 | 114 | } |
115 | 115 | |
116 | 116 | // Get all the items donated. |
117 | - $payment_ids = array_reverse( explode( ',', $donor->payment_ids ) ); |
|
118 | - $limit_payments = apply_filters( 'give_users_completed_donations_payments', 50 ); |
|
119 | - if ( ! empty( $limit_payments ) ) { |
|
120 | - $payment_ids = array_slice( $payment_ids, 0, $limit_payments ); |
|
117 | + $payment_ids = array_reverse(explode(',', $donor->payment_ids)); |
|
118 | + $limit_payments = apply_filters('give_users_completed_donations_payments', 50); |
|
119 | + if ( ! empty($limit_payments)) { |
|
120 | + $payment_ids = array_slice($payment_ids, 0, $limit_payments); |
|
121 | 121 | } |
122 | 122 | $donation_data = array(); |
123 | - foreach ( $payment_ids as $payment_id ) { |
|
124 | - $donation_data[] = give_get_payment_meta( $payment_id ); |
|
123 | + foreach ($payment_ids as $payment_id) { |
|
124 | + $donation_data[] = give_get_payment_meta($payment_id); |
|
125 | 125 | } |
126 | 126 | |
127 | - if ( empty( $donation_data ) ) { |
|
127 | + if (empty($donation_data)) { |
|
128 | 128 | return false; |
129 | 129 | } |
130 | 130 | |
131 | 131 | // Grab only the post ids "form_id" of the forms donated on this order |
132 | 132 | $completed_donations_ids = array(); |
133 | - foreach ( $donation_data as $donation_meta ) { |
|
134 | - $completed_donations_ids[] = isset( $donation_meta['form_id'] ) ? $donation_meta['form_id'] : ''; |
|
133 | + foreach ($donation_data as $donation_meta) { |
|
134 | + $completed_donations_ids[] = isset($donation_meta['form_id']) ? $donation_meta['form_id'] : ''; |
|
135 | 135 | } |
136 | 136 | |
137 | - if ( empty( $completed_donations_ids ) ) { |
|
137 | + if (empty($completed_donations_ids)) { |
|
138 | 138 | return false; |
139 | 139 | } |
140 | 140 | |
141 | 141 | // Only include each donation once |
142 | - $form_ids = array_unique( $completed_donations_ids ); |
|
142 | + $form_ids = array_unique($completed_donations_ids); |
|
143 | 143 | |
144 | 144 | // Make sure we still have some products and a first item |
145 | - if ( empty( $form_ids ) || ! isset( $form_ids[0] ) ) { |
|
145 | + if (empty($form_ids) || ! isset($form_ids[0])) { |
|
146 | 146 | return false; |
147 | 147 | } |
148 | 148 | |
149 | - $post_type = get_post_type( $form_ids[0] ); |
|
149 | + $post_type = get_post_type($form_ids[0]); |
|
150 | 150 | |
151 | - $args = apply_filters( 'give_get_users_completed_donations_args', array( |
|
151 | + $args = apply_filters('give_get_users_completed_donations_args', array( |
|
152 | 152 | 'include' => $form_ids, |
153 | 153 | 'post_type' => $post_type, |
154 | - 'posts_per_page' => - 1, |
|
155 | - ) ); |
|
154 | + 'posts_per_page' => -1, |
|
155 | + )); |
|
156 | 156 | |
157 | - return apply_filters( 'give_users_completed_donations_list', get_posts( $args ) ); |
|
157 | + return apply_filters('give_users_completed_donations_list', get_posts($args)); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | |
@@ -170,12 +170,12 @@ discard block |
||
170 | 170 | * |
171 | 171 | * @return bool True if has donated, false other wise. |
172 | 172 | */ |
173 | -function give_has_donations( $user_id = null ) { |
|
174 | - if ( empty( $user_id ) ) { |
|
173 | +function give_has_donations($user_id = null) { |
|
174 | + if (empty($user_id)) { |
|
175 | 175 | $user_id = get_current_user_id(); |
176 | 176 | } |
177 | 177 | |
178 | - if ( give_get_users_donations( $user_id, 1 ) ) { |
|
178 | + if (give_get_users_donations($user_id, 1)) { |
|
179 | 179 | return true; // User has at least one donation. |
180 | 180 | } |
181 | 181 | |
@@ -196,23 +196,23 @@ discard block |
||
196 | 196 | * |
197 | 197 | * @return array |
198 | 198 | */ |
199 | -function give_get_donation_stats_by_user( $user = '' ) { |
|
199 | +function give_get_donation_stats_by_user($user = '') { |
|
200 | 200 | |
201 | 201 | $field = ''; |
202 | 202 | |
203 | - if ( is_email( $user ) ) { |
|
203 | + if (is_email($user)) { |
|
204 | 204 | $field = 'email'; |
205 | - } elseif ( is_numeric( $user ) ) { |
|
205 | + } elseif (is_numeric($user)) { |
|
206 | 206 | $field = 'user_id'; |
207 | 207 | } |
208 | 208 | |
209 | - $stats = array(); |
|
210 | - $donor = Give()->donors->get_donor_by( $field, $user ); |
|
209 | + $stats = array(); |
|
210 | + $donor = Give()->donors->get_donor_by($field, $user); |
|
211 | 211 | |
212 | - if ( $donor ) { |
|
213 | - $donor = new Give_Donor( $donor->id ); |
|
214 | - $stats['purchases'] = absint( $donor->purchase_count ); |
|
215 | - $stats['total_spent'] = give_maybe_sanitize_amount( $donor->purchase_value ); |
|
212 | + if ($donor) { |
|
213 | + $donor = new Give_Donor($donor->id); |
|
214 | + $stats['purchases'] = absint($donor->purchase_count); |
|
215 | + $stats['total_spent'] = give_maybe_sanitize_amount($donor->purchase_value); |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | /** |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | * |
221 | 221 | * @since 1.7 |
222 | 222 | */ |
223 | - $stats = (array) apply_filters( 'give_donation_stats_by_user', $stats, $user ); |
|
223 | + $stats = (array) apply_filters('give_donation_stats_by_user', $stats, $user); |
|
224 | 224 | |
225 | 225 | return $stats; |
226 | 226 | } |
@@ -238,21 +238,21 @@ discard block |
||
238 | 238 | * |
239 | 239 | * @return int The total number of donations. |
240 | 240 | */ |
241 | -function give_count_donations_of_donor( $user = null ) { |
|
241 | +function give_count_donations_of_donor($user = null) { |
|
242 | 242 | |
243 | 243 | // Logged in? |
244 | - if ( empty( $user ) ) { |
|
244 | + if (empty($user)) { |
|
245 | 245 | $user = get_current_user_id(); |
246 | 246 | } |
247 | 247 | |
248 | 248 | // Email access? |
249 | - if ( empty( $user ) && Give()->email_access->token_email ) { |
|
249 | + if (empty($user) && Give()->email_access->token_email) { |
|
250 | 250 | $user = Give()->email_access->token_email; |
251 | 251 | } |
252 | 252 | |
253 | - $stats = ! empty( $user ) ? give_get_donation_stats_by_user( $user ) : false; |
|
253 | + $stats = ! empty($user) ? give_get_donation_stats_by_user($user) : false; |
|
254 | 254 | |
255 | - return isset( $stats['purchases'] ) ? $stats['purchases'] : 0; |
|
255 | + return isset($stats['purchases']) ? $stats['purchases'] : 0; |
|
256 | 256 | } |
257 | 257 | |
258 | 258 | /** |
@@ -265,9 +265,9 @@ discard block |
||
265 | 265 | * |
266 | 266 | * @return float The total amount the user has spent |
267 | 267 | */ |
268 | -function give_donation_total_of_user( $user = null ) { |
|
268 | +function give_donation_total_of_user($user = null) { |
|
269 | 269 | |
270 | - $stats = give_get_donation_stats_by_user( $user ); |
|
270 | + $stats = give_get_donation_stats_by_user($user); |
|
271 | 271 | |
272 | 272 | return $stats['total_spent']; |
273 | 273 | } |
@@ -283,40 +283,40 @@ discard block |
||
283 | 283 | * |
284 | 284 | * @return bool |
285 | 285 | */ |
286 | -function give_validate_username( $username, $form_id = 0 ) { |
|
286 | +function give_validate_username($username, $form_id = 0) { |
|
287 | 287 | $valid = true; |
288 | 288 | |
289 | 289 | // Validate username. |
290 | - if ( ! empty( $username ) ) { |
|
290 | + if ( ! empty($username)) { |
|
291 | 291 | |
292 | 292 | // Sanitize username. |
293 | - $sanitized_user_name = sanitize_user( $username, false ); |
|
293 | + $sanitized_user_name = sanitize_user($username, false); |
|
294 | 294 | |
295 | 295 | // We have an user name, check if it already exists. |
296 | - if ( username_exists( $username ) ) { |
|
296 | + if (username_exists($username)) { |
|
297 | 297 | // Username already registered. |
298 | - give_set_error( 'username_unavailable', __( 'Username already taken.', 'give' ) ); |
|
298 | + give_set_error('username_unavailable', __('Username already taken.', 'give')); |
|
299 | 299 | $valid = false; |
300 | 300 | |
301 | 301 | // Check if it's valid. |
302 | - } elseif ( $sanitized_user_name !== $username ) { |
|
302 | + } elseif ($sanitized_user_name !== $username) { |
|
303 | 303 | // Invalid username. |
304 | - if ( is_multisite() ) { |
|
305 | - give_set_error( 'username_invalid', __( 'Invalid username. Only lowercase letters (a-z) and numbers are allowed.', 'give' ) ); |
|
304 | + if (is_multisite()) { |
|
305 | + give_set_error('username_invalid', __('Invalid username. Only lowercase letters (a-z) and numbers are allowed.', 'give')); |
|
306 | 306 | $valid = false; |
307 | 307 | } else { |
308 | - give_set_error( 'username_invalid', __( 'Invalid username.', 'give' ) ); |
|
308 | + give_set_error('username_invalid', __('Invalid username.', 'give')); |
|
309 | 309 | $valid = false; |
310 | 310 | } |
311 | 311 | } |
312 | 312 | } else { |
313 | 313 | // Username is empty. |
314 | - give_set_error( 'username_empty', __( 'Enter a username.', 'give' ) ); |
|
314 | + give_set_error('username_empty', __('Enter a username.', 'give')); |
|
315 | 315 | $valid = false; |
316 | 316 | |
317 | 317 | // Check if guest checkout is disable for form. |
318 | - if ( $form_id && give_logged_in_only( $form_id ) ) { |
|
319 | - give_set_error( 'registration_required', __( 'You must register or login to complete your donation.', 'give' ) ); |
|
318 | + if ($form_id && give_logged_in_only($form_id)) { |
|
319 | + give_set_error('registration_required', __('You must register or login to complete your donation.', 'give')); |
|
320 | 320 | $valid = false; |
321 | 321 | } |
322 | 322 | } |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | * @param string $username |
331 | 331 | * @param bool $form_id |
332 | 332 | */ |
333 | - $valid = (bool) apply_filters( 'give_validate_username', $valid, $username, $form_id ); |
|
333 | + $valid = (bool) apply_filters('give_validate_username', $valid, $username, $form_id); |
|
334 | 334 | |
335 | 335 | return $valid; |
336 | 336 | } |
@@ -346,22 +346,22 @@ discard block |
||
346 | 346 | * |
347 | 347 | * @return bool |
348 | 348 | */ |
349 | -function give_validate_user_email( $email, $registering_new_user = false ) { |
|
349 | +function give_validate_user_email($email, $registering_new_user = false) { |
|
350 | 350 | $valid = true; |
351 | 351 | |
352 | - if ( empty( $email ) ) { |
|
352 | + if (empty($email)) { |
|
353 | 353 | // No email. |
354 | - give_set_error( 'email_empty', __( 'Enter an email.', 'give' ) ); |
|
354 | + give_set_error('email_empty', __('Enter an email.', 'give')); |
|
355 | 355 | $valid = false; |
356 | 356 | |
357 | - } elseif ( ! is_email( $email ) ) { |
|
357 | + } elseif ( ! is_email($email)) { |
|
358 | 358 | // Validate email. |
359 | - give_set_error( 'email_invalid', __( 'Invalid email.', 'give' ) ); |
|
359 | + give_set_error('email_invalid', __('Invalid email.', 'give')); |
|
360 | 360 | $valid = false; |
361 | 361 | |
362 | - } elseif ( $registering_new_user && ( give_donor_email_exists( $email ) || email_exists( $email ) ) ) { |
|
362 | + } elseif ($registering_new_user && (give_donor_email_exists($email) || email_exists($email))) { |
|
363 | 363 | // Check if email exists. |
364 | - give_set_error( 'email_used', __( 'The email address provided is already active for another user.', 'give' ) ); |
|
364 | + give_set_error('email_used', __('The email address provided is already active for another user.', 'give')); |
|
365 | 365 | $valid = false; |
366 | 366 | } |
367 | 367 | |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | * @param string $email |
375 | 375 | * @param bool $registering_new_user |
376 | 376 | */ |
377 | - $valid = (bool) apply_filters( 'give_validate_user_email', $valid, $email, $registering_new_user ); |
|
377 | + $valid = (bool) apply_filters('give_validate_user_email', $valid, $email, $registering_new_user); |
|
378 | 378 | |
379 | 379 | return $valid; |
380 | 380 | } |
@@ -390,34 +390,34 @@ discard block |
||
390 | 390 | * |
391 | 391 | * @return bool |
392 | 392 | */ |
393 | -function give_validate_user_password( $password = '', $confirm_password = '', $registering_new_user = false ) { |
|
393 | +function give_validate_user_password($password = '', $confirm_password = '', $registering_new_user = false) { |
|
394 | 394 | $valid = true; |
395 | 395 | |
396 | 396 | // Passwords Validation For New Donors Only |
397 | - if ( $registering_new_user ) { |
|
397 | + if ($registering_new_user) { |
|
398 | 398 | // Password or confirmation missing. |
399 | - if ( ! $password ) { |
|
399 | + if ( ! $password) { |
|
400 | 400 | // The password is invalid. |
401 | - give_set_error( 'password_empty', __( 'Enter a password.', 'give' ) ); |
|
401 | + give_set_error('password_empty', __('Enter a password.', 'give')); |
|
402 | 402 | $valid = false; |
403 | - } elseif ( ! $confirm_password ) { |
|
403 | + } elseif ( ! $confirm_password) { |
|
404 | 404 | // Confirmation password is invalid. |
405 | - give_set_error( 'confirmation_empty', __( 'Enter the password confirmation.', 'give' ) ); |
|
405 | + give_set_error('confirmation_empty', __('Enter the password confirmation.', 'give')); |
|
406 | 406 | $valid = false; |
407 | 407 | } |
408 | 408 | } |
409 | 409 | // Passwords Validation For New Donors as well as Existing Donors |
410 | - if( $password || $confirm_password ) { |
|
411 | - if ( strlen( $password ) < 6 || strlen( $confirm_password ) < 6 ) { |
|
410 | + if ($password || $confirm_password) { |
|
411 | + if (strlen($password) < 6 || strlen($confirm_password) < 6) { |
|
412 | 412 | // Seems Weak Password |
413 | - give_set_error( 'password_weak', __( 'Passwords should have at least 6 characters.', 'give' ) ); |
|
413 | + give_set_error('password_weak', __('Passwords should have at least 6 characters.', 'give')); |
|
414 | 414 | $valid = false; |
415 | 415 | } |
416 | - if ( $password && $confirm_password ) { |
|
416 | + if ($password && $confirm_password) { |
|
417 | 417 | // Verify confirmation matches. |
418 | - if ( $password != $confirm_password ) { |
|
418 | + if ($password != $confirm_password) { |
|
419 | 419 | // Passwords do not match |
420 | - give_set_error( 'password_mismatch', __( 'Passwords you entered do not match. Please try again.', 'give' ) ); |
|
420 | + give_set_error('password_mismatch', __('Passwords you entered do not match. Please try again.', 'give')); |
|
421 | 421 | $valid = false; |
422 | 422 | } |
423 | 423 | } |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | * @param string $confirm_password |
434 | 434 | * @param bool $registering_new_user |
435 | 435 | */ |
436 | - $valid = (bool) apply_filters( 'give_validate_user_email', $valid, $password, $confirm_password, $registering_new_user ); |
|
436 | + $valid = (bool) apply_filters('give_validate_user_email', $valid, $password, $confirm_password, $registering_new_user); |
|
437 | 437 | |
438 | 438 | return $valid; |
439 | 439 | } |
@@ -451,33 +451,33 @@ discard block |
||
451 | 451 | * |
452 | 452 | * @return void |
453 | 453 | */ |
454 | -function give_add_past_donations_to_new_user( $user_id ) { |
|
454 | +function give_add_past_donations_to_new_user($user_id) { |
|
455 | 455 | |
456 | - $email = get_the_author_meta( 'user_email', $user_id ); |
|
456 | + $email = get_the_author_meta('user_email', $user_id); |
|
457 | 457 | |
458 | - $payments = give_get_payments( array( |
|
458 | + $payments = give_get_payments(array( |
|
459 | 459 | 's' => $email, |
460 | - ) ); |
|
460 | + )); |
|
461 | 461 | |
462 | - if ( $payments ) { |
|
463 | - foreach ( $payments as $payment ) { |
|
464 | - if ( intval( give_get_payment_user_id( $payment->ID ) ) > 0 ) { |
|
462 | + if ($payments) { |
|
463 | + foreach ($payments as $payment) { |
|
464 | + if (intval(give_get_payment_user_id($payment->ID)) > 0) { |
|
465 | 465 | continue; |
466 | 466 | } // End if(). |
467 | 467 | |
468 | - $meta = give_get_payment_meta( $payment->ID ); |
|
469 | - $meta['user_info'] = maybe_unserialize( $meta['user_info'] ); |
|
468 | + $meta = give_get_payment_meta($payment->ID); |
|
469 | + $meta['user_info'] = maybe_unserialize($meta['user_info']); |
|
470 | 470 | $meta['user_info']['id'] = $user_id; |
471 | 471 | |
472 | 472 | // Store the updated user ID in the payment meta. |
473 | - give_update_payment_meta( $payment->ID, '_give_payment_meta', $meta ); |
|
474 | - give_update_payment_meta( $payment->ID, '_give_payment_user_id', $user_id ); |
|
473 | + give_update_payment_meta($payment->ID, '_give_payment_meta', $meta); |
|
474 | + give_update_payment_meta($payment->ID, '_give_payment_user_id', $user_id); |
|
475 | 475 | } |
476 | 476 | } |
477 | 477 | |
478 | 478 | } |
479 | 479 | |
480 | -add_action( 'user_register', 'give_add_past_donations_to_new_user' ); |
|
480 | +add_action('user_register', 'give_add_past_donations_to_new_user'); |
|
481 | 481 | |
482 | 482 | |
483 | 483 | /** |
@@ -503,34 +503,34 @@ discard block |
||
503 | 503 | * |
504 | 504 | * @return array The donor's address, if any |
505 | 505 | */ |
506 | -function give_get_donor_address( $user_id = 0 ) { |
|
507 | - if ( empty( $user_id ) ) { |
|
506 | +function give_get_donor_address($user_id = 0) { |
|
507 | + if (empty($user_id)) { |
|
508 | 508 | $user_id = get_current_user_id(); |
509 | 509 | } |
510 | 510 | |
511 | - $address = get_user_meta( $user_id, '_give_user_address', true ); |
|
511 | + $address = get_user_meta($user_id, '_give_user_address', true); |
|
512 | 512 | |
513 | - if ( ! isset( $address['line1'] ) ) { |
|
513 | + if ( ! isset($address['line1'])) { |
|
514 | 514 | $address['line1'] = ''; |
515 | 515 | } |
516 | 516 | |
517 | - if ( ! isset( $address['line2'] ) ) { |
|
517 | + if ( ! isset($address['line2'])) { |
|
518 | 518 | $address['line2'] = ''; |
519 | 519 | } |
520 | 520 | |
521 | - if ( ! isset( $address['city'] ) ) { |
|
521 | + if ( ! isset($address['city'])) { |
|
522 | 522 | $address['city'] = ''; |
523 | 523 | } |
524 | 524 | |
525 | - if ( ! isset( $address['zip'] ) ) { |
|
525 | + if ( ! isset($address['zip'])) { |
|
526 | 526 | $address['zip'] = ''; |
527 | 527 | } |
528 | 528 | |
529 | - if ( ! isset( $address['country'] ) ) { |
|
529 | + if ( ! isset($address['country'])) { |
|
530 | 530 | $address['country'] = ''; |
531 | 531 | } |
532 | 532 | |
533 | - if ( ! isset( $address['state'] ) ) { |
|
533 | + if ( ! isset($address['state'])) { |
|
534 | 534 | $address['state'] = ''; |
535 | 535 | } |
536 | 536 | |
@@ -550,32 +550,32 @@ discard block |
||
550 | 550 | * |
551 | 551 | * @return void |
552 | 552 | */ |
553 | -function give_new_user_notification( $user_id = 0, $user_data = array() ) { |
|
553 | +function give_new_user_notification($user_id = 0, $user_data = array()) { |
|
554 | 554 | |
555 | - if ( empty( $user_id ) || empty( $user_data ) ) { |
|
555 | + if (empty($user_id) || empty($user_data)) { |
|
556 | 556 | return; |
557 | 557 | } |
558 | - $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); |
|
558 | + $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); |
|
559 | 559 | |
560 | 560 | |
561 | 561 | // New User Registration: Email sends to the site admin. |
562 | 562 | $emails = Give()->emails; |
563 | - $emails->__set( 'heading', esc_html__( 'New User Registration', 'give' ) ); |
|
563 | + $emails->__set('heading', esc_html__('New User Registration', 'give')); |
|
564 | 564 | |
565 | 565 | /* translators: %s: site name */ |
566 | - $message = sprintf( esc_attr__( 'A new user has registered on %s:', 'give' ), $blogname ) . "\r\n\r\n"; |
|
566 | + $message = sprintf(esc_attr__('A new user has registered on %s:', 'give'), $blogname)."\r\n\r\n"; |
|
567 | 567 | /* translators: %s: user login */ |
568 | - $message .= '<strong>' . esc_attr__( 'Username:', 'give' ) . '</strong> ' . $user_data['user_login'] . "\r\n"; |
|
568 | + $message .= '<strong>'.esc_attr__('Username:', 'give').'</strong> '.$user_data['user_login']."\r\n"; |
|
569 | 569 | /* translators: %s: user email */ |
570 | - $message .= '<strong>' . esc_attr__( 'E-mail:', 'give' ) . '</strong> ' . $user_data['user_email'] . "\r\n\r\n"; |
|
570 | + $message .= '<strong>'.esc_attr__('E-mail:', 'give').'</strong> '.$user_data['user_email']."\r\n\r\n"; |
|
571 | 571 | |
572 | - $message .= '<a href="' . admin_url('user-edit.php?user_id=' . $user_id) . '" target="_blank"> ' . esc_attr__( 'Click here to view »', 'give' ) . '</a>' . "\r\n"; |
|
572 | + $message .= '<a href="'.admin_url('user-edit.php?user_id='.$user_id).'" target="_blank"> '.esc_attr__('Click here to view »', 'give').'</a>'."\r\n"; |
|
573 | 573 | |
574 | 574 | $emails->send( |
575 | - get_option( 'admin_email' ), |
|
575 | + get_option('admin_email'), |
|
576 | 576 | sprintf( |
577 | 577 | /* translators: %s: site name */ |
578 | - esc_attr__( '[%s] New User Registration', 'give' ), |
|
578 | + esc_attr__('[%s] New User Registration', 'give'), |
|
579 | 579 | $blogname |
580 | 580 | ), |
581 | 581 | $message |
@@ -583,22 +583,22 @@ discard block |
||
583 | 583 | |
584 | 584 | |
585 | 585 | // Account Information: Email sends to donor who registered. |
586 | - $emails->__set( 'heading', esc_html__( 'Account Information', 'give' ) ); |
|
586 | + $emails->__set('heading', esc_html__('Account Information', 'give')); |
|
587 | 587 | |
588 | - $message = sprintf( esc_attr__( 'The following email contains your account information for %s:', 'give' ), $blogname ) . "\r\n\r\n"; |
|
588 | + $message = sprintf(esc_attr__('The following email contains your account information for %s:', 'give'), $blogname)."\r\n\r\n"; |
|
589 | 589 | |
590 | 590 | /* translators: %s: user login */ |
591 | - $message .= '<strong>' . esc_attr__( 'Username:', 'give' ) . '</strong> ' . $user_data['user_login'] . "\r\n"; |
|
591 | + $message .= '<strong>'.esc_attr__('Username:', 'give').'</strong> '.$user_data['user_login']."\r\n"; |
|
592 | 592 | /* translators: %s: password */ |
593 | - $message .= '<strong>' . esc_attr__( 'Password:', 'give' ) . '</strong> ' . esc_attr__( '[Password entered during donation]', 'give' ) . "\r\n\r\n"; |
|
593 | + $message .= '<strong>'.esc_attr__('Password:', 'give').'</strong> '.esc_attr__('[Password entered during donation]', 'give')."\r\n\r\n"; |
|
594 | 594 | |
595 | - $message .= '<a href="' . wp_login_url() . '" target="_blank"> ' . esc_attr__( 'Click here to login »', 'give' ) . '</a>' . "\r\n"; |
|
595 | + $message .= '<a href="'.wp_login_url().'" target="_blank"> '.esc_attr__('Click here to login »', 'give').'</a>'."\r\n"; |
|
596 | 596 | |
597 | 597 | $emails->send( |
598 | 598 | $user_data['user_email'], |
599 | 599 | sprintf( |
600 | 600 | /* translators: %s: site name */ |
601 | - esc_attr__( '[%s] Your username and password', 'give' ), |
|
601 | + esc_attr__('[%s] Your username and password', 'give'), |
|
602 | 602 | $blogname |
603 | 603 | ), |
604 | 604 | $message |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | |
607 | 607 | } |
608 | 608 | |
609 | -add_action( 'give_insert_user', 'give_new_user_notification', 10, 2 ); |
|
609 | +add_action('give_insert_user', 'give_new_user_notification', 10, 2); |
|
610 | 610 | |
611 | 611 | |
612 | 612 | /** |
@@ -622,34 +622,34 @@ discard block |
||
622 | 622 | * |
623 | 623 | * @return string |
624 | 624 | */ |
625 | -function give_get_donor_name_by( $id = 0, $from = 'donation' ) { |
|
625 | +function give_get_donor_name_by($id = 0, $from = 'donation') { |
|
626 | 626 | |
627 | 627 | // ID shouldn't be empty |
628 | - if ( empty( $id ) ) { |
|
628 | + if (empty($id)) { |
|
629 | 629 | return; |
630 | 630 | } |
631 | 631 | |
632 | 632 | $name = ''; |
633 | 633 | |
634 | - switch ( $from ) { |
|
634 | + switch ($from) { |
|
635 | 635 | |
636 | 636 | case 'donation': |
637 | 637 | |
638 | - $user_info = give_get_payment_meta_user_info( $id ); |
|
639 | - $name = $user_info['first_name'] . ' ' . $user_info['last_name']; |
|
638 | + $user_info = give_get_payment_meta_user_info($id); |
|
639 | + $name = $user_info['first_name'].' '.$user_info['last_name']; |
|
640 | 640 | |
641 | 641 | break; |
642 | 642 | |
643 | 643 | case 'donor': |
644 | 644 | |
645 | - $donor = new Give_Donor( $id ); |
|
645 | + $donor = new Give_Donor($id); |
|
646 | 646 | $name = $donor->name; |
647 | 647 | |
648 | 648 | break; |
649 | 649 | |
650 | 650 | } |
651 | 651 | |
652 | - return trim( $name ); |
|
652 | + return trim($name); |
|
653 | 653 | |
654 | 654 | } |
655 | 655 | |
@@ -661,8 +661,8 @@ discard block |
||
661 | 661 | * @param string $email Donor Email. |
662 | 662 | * @return boolean The user's ID on success, and false on failure. |
663 | 663 | */ |
664 | -function give_donor_email_exists( $email ) { |
|
665 | - if ( Give()->donors->get_donor_by( 'email', $email ) ) { |
|
664 | +function give_donor_email_exists($email) { |
|
665 | + if (Give()->donors->get_donor_by('email', $email)) { |
|
666 | 666 | return true; |
667 | 667 | } |
668 | 668 | return false; |
@@ -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 | |
@@ -20,19 +20,19 @@ discard block |
||
20 | 20 | * @since 1.8 |
21 | 21 | */ |
22 | 22 | function give_load_wp_editor() { |
23 | - if ( ! isset( $_POST['wp_editor'] ) ) { |
|
23 | + if ( ! isset($_POST['wp_editor'])) { |
|
24 | 24 | die(); |
25 | 25 | } |
26 | 26 | |
27 | - $wp_editor = json_decode( base64_decode( $_POST['wp_editor'] ), true ); |
|
27 | + $wp_editor = json_decode(base64_decode($_POST['wp_editor']), true); |
|
28 | 28 | $wp_editor[2]['textarea_name'] = $_POST['textarea_name']; |
29 | 29 | |
30 | - wp_editor( $wp_editor[0], $_POST['wp_editor_id'], $wp_editor[2] ); |
|
30 | + wp_editor($wp_editor[0], $_POST['wp_editor_id'], $wp_editor[2]); |
|
31 | 31 | |
32 | 32 | die(); |
33 | 33 | } |
34 | 34 | |
35 | -add_action( 'wp_ajax_give_load_wp_editor', 'give_load_wp_editor' ); |
|
35 | +add_action('wp_ajax_give_load_wp_editor', 'give_load_wp_editor'); |
|
36 | 36 | |
37 | 37 | |
38 | 38 | /** |
@@ -52,13 +52,13 @@ discard block |
||
52 | 52 | ); |
53 | 53 | |
54 | 54 | // Get current page. |
55 | - $current_page = isset( $_GET['page'] ) ? esc_attr( $_GET['page'] ) : ''; |
|
55 | + $current_page = isset($_GET['page']) ? esc_attr($_GET['page']) : ''; |
|
56 | 56 | |
57 | 57 | // Bailout. |
58 | 58 | if ( |
59 | - empty( $current_page ) |
|
60 | - || empty( $_GET['_wp_http_referer'] ) |
|
61 | - || ! in_array( $current_page, $give_pages ) |
|
59 | + empty($current_page) |
|
60 | + || empty($_GET['_wp_http_referer']) |
|
61 | + || ! in_array($current_page, $give_pages) |
|
62 | 62 | ) { |
63 | 63 | return false; |
64 | 64 | } |
@@ -68,21 +68,21 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @since 1.8 |
70 | 70 | */ |
71 | - $redirect = apply_filters( "give_validate_{$current_page}", true ); |
|
71 | + $redirect = apply_filters("give_validate_{$current_page}", true); |
|
72 | 72 | |
73 | - if ( $redirect ) { |
|
73 | + if ($redirect) { |
|
74 | 74 | // Redirect. |
75 | 75 | wp_redirect( |
76 | 76 | remove_query_arg( |
77 | - array( '_wp_http_referer', '_wpnonce' ), |
|
78 | - wp_unslash( $_SERVER['REQUEST_URI'] ) |
|
77 | + array('_wp_http_referer', '_wpnonce'), |
|
78 | + wp_unslash($_SERVER['REQUEST_URI']) |
|
79 | 79 | ) |
80 | 80 | ); |
81 | 81 | exit; |
82 | 82 | } |
83 | 83 | } |
84 | 84 | |
85 | -add_action( 'admin_init', 'give_redirect_to_clean_url_admin_pages' ); |
|
85 | +add_action('admin_init', 'give_redirect_to_clean_url_admin_pages'); |
|
86 | 86 | |
87 | 87 | |
88 | 88 | /** |
@@ -96,25 +96,25 @@ discard block |
||
96 | 96 | */ |
97 | 97 | function give_hide_outdated_php_notice() { |
98 | 98 | |
99 | - if ( ! isset( $_POST['_give_hide_outdated_php_notices_shortly'] ) ) { |
|
99 | + if ( ! isset($_POST['_give_hide_outdated_php_notices_shortly'])) { |
|
100 | 100 | give_die(); |
101 | 101 | } |
102 | 102 | |
103 | 103 | // Transient key name. |
104 | 104 | $transient_key = "_give_hide_outdated_php_notices_shortly"; |
105 | 105 | |
106 | - if ( Give_Cache::get( $transient_key, true ) ) { |
|
106 | + if (Give_Cache::get($transient_key, true)) { |
|
107 | 107 | return; |
108 | 108 | } |
109 | 109 | |
110 | 110 | // Hide notice for 24 hours. |
111 | - Give_Cache::set( $transient_key, true, DAY_IN_SECONDS, true ); |
|
111 | + Give_Cache::set($transient_key, true, DAY_IN_SECONDS, true); |
|
112 | 112 | |
113 | 113 | give_die(); |
114 | 114 | |
115 | 115 | } |
116 | 116 | |
117 | -add_action( 'wp_ajax_give_hide_outdated_php_notice', 'give_hide_outdated_php_notice' ); |
|
117 | +add_action('wp_ajax_give_hide_outdated_php_notice', 'give_hide_outdated_php_notice'); |
|
118 | 118 | |
119 | 119 | /** |
120 | 120 | * Register admin notices. |
@@ -123,23 +123,23 @@ discard block |
||
123 | 123 | */ |
124 | 124 | function _give_register_admin_notices() { |
125 | 125 | // Bailout. |
126 | - if( ! is_admin() ) { |
|
126 | + if ( ! is_admin()) { |
|
127 | 127 | return; |
128 | 128 | } |
129 | 129 | |
130 | 130 | // Add payment bulk notice. |
131 | 131 | if ( |
132 | - current_user_can( 'edit_give_payments' ) |
|
133 | - && isset( $_GET['action'] ) |
|
134 | - && ! empty( $_GET['action'] ) |
|
135 | - && isset( $_GET['payment'] ) |
|
136 | - && ! empty( $_GET['payment'] ) |
|
132 | + current_user_can('edit_give_payments') |
|
133 | + && isset($_GET['action']) |
|
134 | + && ! empty($_GET['action']) |
|
135 | + && isset($_GET['payment']) |
|
136 | + && ! empty($_GET['payment']) |
|
137 | 137 | ) { |
138 | - $payment_count = isset( $_GET['payment'] ) ? count( $_GET['payment'] ) : 0; |
|
138 | + $payment_count = isset($_GET['payment']) ? count($_GET['payment']) : 0; |
|
139 | 139 | |
140 | - switch ( $_GET['action'] ) { |
|
140 | + switch ($_GET['action']) { |
|
141 | 141 | case 'delete': |
142 | - Give()->notices->register_notice( array( |
|
142 | + Give()->notices->register_notice(array( |
|
143 | 143 | 'id' => 'bulk_action_delete', |
144 | 144 | 'type' => 'updated', |
145 | 145 | 'description' => sprintf( |
@@ -151,12 +151,12 @@ discard block |
||
151 | 151 | ), |
152 | 152 | $payment_count ), |
153 | 153 | 'show' => true, |
154 | - ) ); |
|
154 | + )); |
|
155 | 155 | |
156 | 156 | break; |
157 | 157 | |
158 | 158 | case 'resend-receipt': |
159 | - Give()->notices->register_notice( array( |
|
159 | + Give()->notices->register_notice(array( |
|
160 | 160 | 'id' => 'bulk_action_resend_receipt', |
161 | 161 | 'type' => 'updated', |
162 | 162 | 'description' => sprintf( |
@@ -169,196 +169,196 @@ discard block |
||
169 | 169 | $payment_count |
170 | 170 | ), |
171 | 171 | 'show' => true, |
172 | - ) ); |
|
172 | + )); |
|
173 | 173 | break; |
174 | 174 | } |
175 | 175 | } |
176 | 176 | |
177 | 177 | // Add give message notices. |
178 | - if ( ! empty( $_GET['give-message'] ) ) { |
|
178 | + if ( ! empty($_GET['give-message'])) { |
|
179 | 179 | // Donation reports errors. |
180 | - if ( current_user_can( 'view_give_reports' ) ) { |
|
181 | - switch ( $_GET['give-message'] ) { |
|
180 | + if (current_user_can('view_give_reports')) { |
|
181 | + switch ($_GET['give-message']) { |
|
182 | 182 | case 'donation_deleted' : |
183 | - Give()->notices->register_notice( array( |
|
183 | + Give()->notices->register_notice(array( |
|
184 | 184 | 'id' => 'give-donation-deleted', |
185 | 185 | 'type' => 'updated', |
186 | - 'description' => __( 'The donation has been deleted.', 'give' ), |
|
186 | + 'description' => __('The donation has been deleted.', 'give'), |
|
187 | 187 | 'show' => true, |
188 | - ) ); |
|
188 | + )); |
|
189 | 189 | break; |
190 | 190 | case 'email_sent' : |
191 | - Give()->notices->register_notice( array( |
|
191 | + Give()->notices->register_notice(array( |
|
192 | 192 | 'id' => 'give-payment-sent', |
193 | 193 | 'type' => 'updated', |
194 | - 'description' => __( 'The donation receipt has been resent.', 'give' ), |
|
194 | + 'description' => __('The donation receipt has been resent.', 'give'), |
|
195 | 195 | 'show' => true, |
196 | - ) ); |
|
196 | + )); |
|
197 | 197 | break; |
198 | 198 | case 'refreshed-reports' : |
199 | - Give()->notices->register_notice( array( |
|
199 | + Give()->notices->register_notice(array( |
|
200 | 200 | 'id' => 'give-refreshed-reports', |
201 | 201 | 'type' => 'updated', |
202 | - 'description' => __( 'The reports cache has been cleared.', 'give' ), |
|
202 | + 'description' => __('The reports cache has been cleared.', 'give'), |
|
203 | 203 | 'show' => true, |
204 | - ) ); |
|
204 | + )); |
|
205 | 205 | break; |
206 | 206 | case 'donation-note-deleted' : |
207 | - Give()->notices->register_notice( array( |
|
207 | + Give()->notices->register_notice(array( |
|
208 | 208 | 'id' => 'give-donation-note-deleted', |
209 | 209 | 'type' => 'updated', |
210 | - 'description' => __( 'The donation note has been deleted.', 'give' ), |
|
210 | + 'description' => __('The donation note has been deleted.', 'give'), |
|
211 | 211 | 'show' => true, |
212 | - ) ); |
|
212 | + )); |
|
213 | 213 | break; |
214 | 214 | } |
215 | 215 | } |
216 | 216 | |
217 | 217 | // Give settings notices and errors. |
218 | - if ( current_user_can( 'manage_give_settings' ) ) { |
|
219 | - switch ( $_GET['give-message'] ) { |
|
218 | + if (current_user_can('manage_give_settings')) { |
|
219 | + switch ($_GET['give-message']) { |
|
220 | 220 | case 'settings-imported' : |
221 | - Give()->notices->register_notice( array( |
|
221 | + Give()->notices->register_notice(array( |
|
222 | 222 | 'id' => 'give-settings-imported', |
223 | 223 | 'type' => 'updated', |
224 | - 'description' => __( 'The settings have been imported.', 'give' ), |
|
224 | + 'description' => __('The settings have been imported.', 'give'), |
|
225 | 225 | 'show' => true, |
226 | - ) ); |
|
226 | + )); |
|
227 | 227 | break; |
228 | 228 | case 'api-key-generated' : |
229 | - Give()->notices->register_notice( array( |
|
229 | + Give()->notices->register_notice(array( |
|
230 | 230 | 'id' => 'give-api-key-generated', |
231 | 231 | 'type' => 'updated', |
232 | - 'description' => __( 'API keys have been generated.', 'give' ), |
|
232 | + 'description' => __('API keys have been generated.', 'give'), |
|
233 | 233 | 'show' => true, |
234 | - ) ); |
|
234 | + )); |
|
235 | 235 | break; |
236 | 236 | case 'api-key-exists' : |
237 | - Give()->notices->register_notice( array( |
|
237 | + Give()->notices->register_notice(array( |
|
238 | 238 | 'id' => 'give-api-key-exists', |
239 | 239 | 'type' => 'updated', |
240 | - 'description' => __( 'The specified user already has API keys.', 'give' ), |
|
240 | + 'description' => __('The specified user already has API keys.', 'give'), |
|
241 | 241 | 'show' => true, |
242 | - ) ); |
|
242 | + )); |
|
243 | 243 | break; |
244 | 244 | case 'api-key-regenerated' : |
245 | - Give()->notices->register_notice( array( |
|
245 | + Give()->notices->register_notice(array( |
|
246 | 246 | 'id' => 'give-api-key-regenerated', |
247 | 247 | 'type' => 'updated', |
248 | - 'description' => __( 'API keys have been regenerated.', 'give' ), |
|
248 | + 'description' => __('API keys have been regenerated.', 'give'), |
|
249 | 249 | 'show' => true, |
250 | - ) ); |
|
250 | + )); |
|
251 | 251 | break; |
252 | 252 | case 'api-key-revoked' : |
253 | - Give()->notices->register_notice( array( |
|
253 | + Give()->notices->register_notice(array( |
|
254 | 254 | 'id' => 'give-api-key-revoked', |
255 | 255 | 'type' => 'updated', |
256 | - 'description' => __( 'API keys have been revoked.', 'give' ), |
|
256 | + 'description' => __('API keys have been revoked.', 'give'), |
|
257 | 257 | 'show' => true, |
258 | - ) ); |
|
258 | + )); |
|
259 | 259 | break; |
260 | 260 | case 'sent-test-email' : |
261 | - Give()->notices->register_notice( array( |
|
261 | + Give()->notices->register_notice(array( |
|
262 | 262 | 'id' => 'give-sent-test-email', |
263 | 263 | 'type' => 'updated', |
264 | - 'description' => __( 'The test email has been sent.', 'give' ), |
|
264 | + 'description' => __('The test email has been sent.', 'give'), |
|
265 | 265 | 'show' => true, |
266 | - ) ); |
|
266 | + )); |
|
267 | 267 | break; |
268 | 268 | case 'matched-success-failure-page': |
269 | - Give()->notices->register_notice( array( |
|
269 | + Give()->notices->register_notice(array( |
|
270 | 270 | 'id' => 'give-matched-success-failure-page', |
271 | 271 | 'type' => 'updated', |
272 | - 'description' => __( 'You cannot set the success and failed pages to the same page', 'give' ), |
|
272 | + 'description' => __('You cannot set the success and failed pages to the same page', 'give'), |
|
273 | 273 | 'show' => true, |
274 | - ) ); |
|
274 | + )); |
|
275 | 275 | break; |
276 | 276 | } |
277 | 277 | } |
278 | 278 | // Payments errors. |
279 | - if ( current_user_can( 'edit_give_payments' ) ) { |
|
280 | - switch ( $_GET['give-message'] ) { |
|
279 | + if (current_user_can('edit_give_payments')) { |
|
280 | + switch ($_GET['give-message']) { |
|
281 | 281 | case 'note-added' : |
282 | - Give()->notices->register_notice( array( |
|
282 | + Give()->notices->register_notice(array( |
|
283 | 283 | 'id' => 'give-note-added', |
284 | 284 | 'type' => 'updated', |
285 | - 'description' => __( 'The donation note has been added.', 'give' ), |
|
285 | + 'description' => __('The donation note has been added.', 'give'), |
|
286 | 286 | 'show' => true, |
287 | - ) ); |
|
287 | + )); |
|
288 | 288 | break; |
289 | 289 | case 'payment-updated' : |
290 | - Give()->notices->register_notice( array( |
|
290 | + Give()->notices->register_notice(array( |
|
291 | 291 | 'id' => 'give-payment-updated', |
292 | 292 | 'type' => 'updated', |
293 | - 'description' => __( 'The donation has been updated.', 'give' ), |
|
293 | + 'description' => __('The donation has been updated.', 'give'), |
|
294 | 294 | 'show' => true, |
295 | - ) ); |
|
295 | + )); |
|
296 | 296 | break; |
297 | 297 | } |
298 | 298 | } |
299 | 299 | |
300 | 300 | // Donor Notices. |
301 | - if ( current_user_can( 'edit_give_payments' ) ) { |
|
302 | - switch ( $_GET['give-message'] ) { |
|
301 | + if (current_user_can('edit_give_payments')) { |
|
302 | + switch ($_GET['give-message']) { |
|
303 | 303 | case 'donor-deleted' : |
304 | - Give()->notices->register_notice( array( |
|
304 | + Give()->notices->register_notice(array( |
|
305 | 305 | 'id' => 'give-donor-deleted', |
306 | 306 | 'type' => 'updated', |
307 | - 'description' => __( 'The donor has been deleted.', 'give' ), |
|
307 | + 'description' => __('The donor has been deleted.', 'give'), |
|
308 | 308 | 'show' => true, |
309 | - ) ); |
|
309 | + )); |
|
310 | 310 | break; |
311 | 311 | |
312 | 312 | case 'email-added' : |
313 | - Give()->notices->register_notice( array( |
|
313 | + Give()->notices->register_notice(array( |
|
314 | 314 | 'id' => 'give-donor-email-added', |
315 | 315 | 'type' => 'updated', |
316 | - 'description' => __( 'Donor email added.', 'give' ), |
|
316 | + 'description' => __('Donor email added.', 'give'), |
|
317 | 317 | 'show' => true, |
318 | - ) ); |
|
318 | + )); |
|
319 | 319 | break; |
320 | 320 | |
321 | 321 | case 'email-removed' : |
322 | - Give()->notices->register_notice( array( |
|
322 | + Give()->notices->register_notice(array( |
|
323 | 323 | 'id' => 'give-donor-email-removed', |
324 | 324 | 'type' => 'updated', |
325 | - 'description' => __( 'Donor email removed.', 'give' ), |
|
325 | + 'description' => __('Donor email removed.', 'give'), |
|
326 | 326 | 'show' => true, |
327 | - ) ); |
|
327 | + )); |
|
328 | 328 | break; |
329 | 329 | |
330 | 330 | case 'email-remove-failed' : |
331 | - Give()->notices->register_notice( array( |
|
331 | + Give()->notices->register_notice(array( |
|
332 | 332 | 'id' => 'give-donor-email-remove-failed', |
333 | 333 | 'type' => 'updated', |
334 | - 'description' => __( 'Failed to remove donor email.', 'give' ), |
|
334 | + 'description' => __('Failed to remove donor email.', 'give'), |
|
335 | 335 | 'show' => true, |
336 | - ) ); |
|
336 | + )); |
|
337 | 337 | break; |
338 | 338 | |
339 | 339 | case 'primary-email-updated' : |
340 | - Give()->notices->register_notice( array( |
|
340 | + Give()->notices->register_notice(array( |
|
341 | 341 | 'id' => 'give-donor-primary-email-updated', |
342 | 342 | 'type' => 'updated', |
343 | - 'description' => __( 'Primary email updated for donor.', 'give' ), |
|
343 | + 'description' => __('Primary email updated for donor.', 'give'), |
|
344 | 344 | 'show' => true, |
345 | - ) ); |
|
345 | + )); |
|
346 | 346 | break; |
347 | 347 | |
348 | 348 | case 'primary-email-failed' : |
349 | - Give()->notices->register_notice( array( |
|
349 | + Give()->notices->register_notice(array( |
|
350 | 350 | 'id' => 'give-donor-primary-email-failed', |
351 | 351 | 'type' => 'updated', |
352 | - 'description' => __( 'Failed to set primary email.', 'give' ), |
|
352 | + 'description' => __('Failed to set primary email.', 'give'), |
|
353 | 353 | 'show' => true, |
354 | - ) ); |
|
354 | + )); |
|
355 | 355 | break; |
356 | 356 | } |
357 | 357 | } |
358 | 358 | } |
359 | 359 | } |
360 | 360 | |
361 | -add_action( 'admin_notices', '_give_register_admin_notices', - 1 ); |
|
361 | +add_action('admin_notices', '_give_register_admin_notices', - 1); |
|
362 | 362 | |
363 | 363 | |
364 | 364 | /** |
@@ -368,27 +368,26 @@ discard block |
||
368 | 368 | * |
369 | 369 | * @return bool |
370 | 370 | */ |
371 | -function _give_show_test_mode_notice_in_admin_bar( $wp_admin_bar ) { |
|
372 | - $is_test_mode = ! empty( $_POST['test_mode'] ) ? |
|
373 | - give_is_setting_enabled( $_POST['test_mode'] ) : |
|
374 | - give_is_test_mode(); |
|
371 | +function _give_show_test_mode_notice_in_admin_bar($wp_admin_bar) { |
|
372 | + $is_test_mode = ! empty($_POST['test_mode']) ? |
|
373 | + give_is_setting_enabled($_POST['test_mode']) : give_is_test_mode(); |
|
375 | 374 | |
376 | 375 | if ( |
377 | - ! current_user_can( 'view_give_reports' ) || |
|
376 | + ! current_user_can('view_give_reports') || |
|
378 | 377 | ! $is_test_mode |
379 | 378 | ) { |
380 | 379 | return false; |
381 | 380 | } |
382 | 381 | |
383 | 382 | // Add the main siteadmin menu item. |
384 | - $wp_admin_bar->add_menu( array( |
|
383 | + $wp_admin_bar->add_menu(array( |
|
385 | 384 | 'id' => 'give-test-notice', |
386 | - 'href' => admin_url( 'edit.php?post_type=give_forms&page=give-settings&tab=gateways' ), |
|
385 | + 'href' => admin_url('edit.php?post_type=give_forms&page=give-settings&tab=gateways'), |
|
387 | 386 | 'parent' => 'top-secondary', |
388 | - 'title' => esc_html__( 'Give Test Mode Active', 'give' ), |
|
389 | - 'meta' => array( 'class' => 'give-test-mode-active' ), |
|
390 | - ) ); |
|
387 | + 'title' => esc_html__('Give Test Mode Active', 'give'), |
|
388 | + 'meta' => array('class' => 'give-test-mode-active'), |
|
389 | + )); |
|
391 | 390 | |
392 | 391 | return true; |
393 | 392 | } |
394 | -add_action( 'admin_bar_menu', '_give_show_test_mode_notice_in_admin_bar', 1000, 1 ); |
|
395 | 393 | \ No newline at end of file |
394 | +add_action('admin_bar_menu', '_give_show_test_mode_notice_in_admin_bar', 1000, 1); |
|
396 | 395 | \ No newline at end of file |