PluginProbe
Mailchimp List Subscribe Form / 1.9.0
Mailchimp List Subscribe Form v1.9.0
1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 All 55 releases
mailchimp / mailchimp_widget.php

mailchimp_widget.php in Mailchimp List Subscribe Form 1.9.0, at mailchimp_widget.php

717 lines 25.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Mailchimp widget
4 *
5 * @package Mailchimp
6 */
7
8 /**
9 * Displays a Mailchimp Signup Form
10 *
11 * @param array $args Args
12 * @return void
13 */
14 function mailchimp_sf_signup_form( $args = array() ) {
15 // Check if we should display the form.
16 if ( ! mailchimp_sf_should_display_form() ) {
17 return;
18 }
19
20 $before_title = isset( $args['before_title'] ) ? $args['before_title'] : '';
21 $after_title = isset( $args['after_title'] ) ? $args['after_title'] : '';
22 $before_widget = isset( $args['before_widget'] ) ? $args['before_widget'] : '';
23 $after_widget = isset( $args['after_widget'] ) ? $args['after_widget'] : '';
24
25 $mv = get_option( 'mc_merge_vars' );
26 $igs = get_option( 'mc_interest_groups' );
27
28 // See if we have valid Merge Vars
29 if ( ! is_array( $mv ) ) {
30 if ( ! empty( $before_widget ) ) {
31 echo wp_kses_post( $before_widget );
32 } else {
33 echo '<div class="mc_container">';
34 }
35 ?>
36 <div class="mc_error_msg">
37 <?php
38 echo wp_kses(
39 __(
40 'Sorry, there was a problem loading your Mailchimp details. Please navigate to <strong>Settings</strong> and click <strong>Mailchimp Setup</strong> to try again.',
41 'mailchimp'
42 ),
43 [
44 'strong' => [],
45 ]
46 );
47 ?>
48 </div>
49 <?php
50 if ( ! empty( $after_widget ) ) {
51 echo wp_kses_post( $after_widget );
52 }
53
54 if ( empty( $before_widget ) ) {
55 echo '</div>';
56 }
57
58 return;
59 }
60
61 if ( ! empty( $before_widget ) ) {
62 echo wp_kses_post( $before_widget );
63 } else {
64 echo '<div class="mc_container">';
65 }
66
67 $header = get_option( 'mc_header_content' );
68
69 // See if we have custom header content
70 if ( ! empty( $header ) ) {
71 // See if we need to wrap the header content in our own div
72 if ( strlen( $header ) === strlen( wp_strip_all_tags( $header ) ) ) {
73 echo ! empty( $before_title ) ? wp_kses_post( $before_title ) : '<div class="mc_custom_border_hdr">';
74 echo wp_kses_post( $header );
75 echo ! empty( $after_title ) ? wp_kses_post( $after_title ) : '</div><!-- /mc_custom_border_hdr -->';
76 } else {
77 echo wp_kses_post( $header );
78 }
79 }
80
81 $sub_heading = trim( get_option( 'mc_subheader_content' ) );
82 ?>
83
84 <div id="mc_signup">
85 <form method="post" action="#mc_signup" id="mc_signup_form" class="mc_signup_form">
86 <input type="hidden" id="mc_submit_type" class="mc_submit_type" name="mc_submit_type" value="html" />
87 <input type="hidden" name="mcsf_action" value="mc_submit_signup_form" />
88 <?php wp_nonce_field( 'mc_submit_signup_form', '_mc_submit_signup_form_nonce', false ); ?>
89
90 <?php
91 if ( $sub_heading ) {
92 ?>
93 <div id="mc_subheader">
94 <?php echo wp_kses_post( $sub_heading ); ?>
95 </div><!-- /mc_subheader -->
96 <?php
97 }
98 ?>
99
100 <div class="mc_form_inside">
101
102 <div class="mc_message_wrapper" id="mc_message">
103 <?php echo wp_kses_post( mailchimp_sf_frontend_msg() ); ?>
104 </div><!-- /mc_message -->
105
106 <?php
107 // don't show the "required" stuff if there's only 1 field to display.
108 $num_fields = 0;
109 foreach ( (array) $mv as $mv_var ) {
110 $opt = 'mc_mv_' . $mv_var['tag'];
111 if ( $mv_var['required'] || get_option( $opt ) === 'on' ) {
112 ++$num_fields;
113 }
114 }
115
116 if ( is_array( $mv ) ) {
117 // head on back to the beginning of the array
118 reset( $mv );
119 }
120
121 // Loop over our vars, and output the ones that are set to display
122 foreach ( $mv as $mv_var ) {
123 echo mailchimp_form_field( $mv_var, $num_fields ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Ignoring because form field is escaped in function
124 }
125
126 // Show an explanation of the * if there's more than one field
127 if ( $num_fields > 1 ) {
128 ?>
129 <div id="mc-indicates-required">
130 * = <?php esc_html_e( 'required field', 'mailchimp' ); ?>
131 </div><!-- /mc-indicates-required -->
132 <?php
133 }
134
135 // Show our Interest groups fields if we have them, and they're set to on
136 if ( is_array( $igs ) && ! empty( $igs ) ) {
137 foreach ( $igs as $ig ) {
138 if ( is_array( $ig ) && isset( $ig['id'] ) ) {
139 if ( ( $igs && get_option( 'mc_show_interest_groups_' . $ig['id'] ) === 'on' ) ) {
140 if ( 'hidden' !== $ig['type'] ) {
141 ?>
142 <div class="mc_interests_header">
143 <?php echo esc_html( $ig['title'] ); ?>
144 </div><!-- /mc_interests_header -->
145 <div class="mc_interest">
146 <?php
147 } else {
148 ?>
149 <div class="mc_interest" style="display: none;">
150 <?php
151 }
152 ?>
153
154 <?php
155 mailchimp_interest_group_field( $ig );
156 ?>
157 </div><!-- /mc_interest -->
158
159 <?php
160 }
161 }
162 }
163 }
164
165 if ( get_option( 'mc_email_type_option' ) ) {
166 ?>
167 <div class="mergeRow">
168 <label class="mc_email_format"><?php esc_html_e( 'Preferred Format', 'mailchimp' ); ?></label>
169 <div class="field-group groups mc_email_options">
170 <ul class="mc_list">
171 <li><input type="radio" name="email_type" id="email_type_html" value="html" checked="checked"><label for="email_type_html" class="mc_email_type"><?php esc_html_e( 'HTML', 'mailchimp' ); ?></label></li>
172 <li><input type="radio" name="email_type" id="email_type_text" value="text"><label for="email_type_text" class="mc_email_type"><?php esc_html_e( 'Text', 'mailchimp' ); ?></label></li>
173 </ul>
174 </div>
175 </div>
176
177 <?php
178 }
179
180 // Add a honeypot field.
181 mailchimp_sf_honeypot_field();
182
183 $submit_text = get_option( 'mc_submit_text' );
184 ?>
185
186 <div class="mc_signup_submit">
187 <input type="submit" name="mc_signup_submit" class="mc_signup_submit_button" id="mc_signup_submit" value="<?php echo esc_attr( $submit_text ); ?>" class="button" />
188 </div><!-- /mc_signup_submit -->
189
190 <?php
191 $user = get_option( 'mc_user' );
192 if ( $user && get_option( 'mc_use_unsub_link' ) === 'on' ) {
193 $api = mailchimp_sf_get_api();
194 $host = 'http://' . $api->datacenter . '.list-manage.com';
195 ?>
196 <div id="mc_unsub_link" align="center">
197 <a href="<?php echo esc_url( $host . '/unsubscribe/?u=' . $user['account_id'] . '&amp;id=' . get_option( 'mc_list_id' ) ); ?>" target="_blank"><?php esc_html_e( 'unsubscribe from list', 'mailchimp' ); ?></a>
198 </div><!-- /mc_unsub_link -->
199 <?php
200 }
201 ?>
202
203 </div><!-- /mc_form_inside -->
204 </form><!-- /mc_signup_form -->
205 </div><!-- /mc_signup_container -->
206 <?php
207 if ( ! empty( $after_widget ) ) {
208 echo wp_kses_post( $after_widget );
209 }
210
211 if ( empty( $before_widget ) ) {
212 echo '</div>';
213 }
214 }
215
216 /**
217 * Add a hidden honeypot field
218 *
219 * @return void
220 */
221 function mailchimp_sf_honeypot_field() {
222 ?>
223 <div style="display: none; !important">
224 <label for="mailchimp_sf_alt_email"><?php esc_html_e( 'Alternative Email:', 'mailchimp' ); ?></label>
225 <input type="text" name="mailchimp_sf_alt_email" autocomplete="off"/>
226 </div>
227 <input type="hidden" class="mailchimp_sf_no_js" name="mailchimp_sf_no_js" value="1" />
228 <?php
229 }
230
231 /**
232 * Generate and display markup for Interest Groups
233 *
234 * @param array $ig Set of Interest Groups to generate markup for
235 * @return void
236 */
237 function mailchimp_interest_group_field( $ig ) {
238 if ( ! is_array( $ig ) ) {
239 return;
240 }
241 $html = '';
242 $set_name = 'group[' . $ig['id'] . ']';
243 switch ( $ig['type'] ) {
244 case 'checkboxes':
245 $i = 1;
246 foreach ( $ig['groups'] as $interest ) {
247 $interest_name = $interest['name'];
248 $interest_id = $interest['id'];
249 $html .= '
250
251 <input type="checkbox" name="' . esc_attr( $set_name . '[' . $interest_id . ']' ) . '" id="' . esc_attr( 'mc_interest_' . $ig['id'] . '_' . $interest_id ) . '" class="mc_interest" value="' . esc_attr( $interest_name ) . '" />
252 <label for="' . esc_attr( 'mc_interest_' . $ig['id'] . '_' . $interest_id ) . '" class="mc_interest_label">' . esc_html( $interest_name ) . '</label>
253 <br/>';
254 ++$i;
255 }
256 break;
257 case 'radio':
258 foreach ( $ig['groups'] as $interest ) {
259 $interest_name = $interest['name'];
260 $interest_id = $interest['id'];
261 $html .= '
262 <input type="radio" name="' . esc_attr( $set_name ) . '" id="' . esc_attr( 'mc_interest_' . $ig['id'] . '_' . $interest_id ) . '" class="mc_interest" value="' . esc_attr( $interest_id ) . '"/>
263 <label for="' . esc_attr( 'mc_interest_' . $ig['id'] . '_' . $interest_id ) . '" class="mc_interest_label">' . esc_html( $interest_name ) . '</label>
264 <br/>';
265 }
266 break;
267 case 'dropdown':
268 $html .= '
269 <select name="' . esc_attr( $set_name ) . '">
270 <option value=""></option>';
271 foreach ( $ig['groups'] as $interest ) {
272 $interest_name = $interest['name'];
273 $interest_id = $interest['id'];
274 $html .= '
275 <option value="' . esc_attr( $interest_id ) . '">' . esc_html( $interest_name ) . '</option>';
276 }
277 $html .= '
278 </select>';
279 break;
280 case 'hidden':
281 $i = 1;
282 foreach ( $ig['groups'] as $interest ) {
283 $interest_name = $interest['name'];
284 $interest_id = $interest['id'];
285 $html .= '
286 <input type="checkbox" name="' . esc_attr( $set_name . '[' . $i . ']' ) . '" id="' . esc_attr( 'mc_interest_' . $ig['id'] . '_' . $interest_id ) . '" class="mc_interest" value="' . esc_attr( $interest_name ) . '" />
287 <label for="' . esc_attr( 'mc_interest_' . $ig['id'] . '_' . $interest_id ) . '" class="mc_interest_label">' . esc_html( $interest_name ) . '</label>';
288 ++$i;
289 }
290 break;
291 }
292 echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Ignoring because html is previously escaped
293 }
294
295 /**
296 * Generate and display markup for form fields
297 *
298 * @param array $data Array containing informaoin about the field.
299 * @param int $num_fields The number of fields total we'll be generating markup for. Used in calculating required text logic.
300 * @param bool $should_display Whether or not the field should be displayed.
301 * @param string $label The label for the field.
302 * @return string
303 */
304 function mailchimp_form_field( $data, $num_fields, $should_display = null, $label = '' ) {
305 $html = '';
306 $opt = 'mc_mv_' . $data['tag'];
307 if ( is_null( $should_display ) ) {
308 $should_display = 'on' === get_option( $opt );
309 }
310
311 $label = ( ! empty( $label ) ) ? $label : $data['name'];
312
313 // See if that var is set as required, or turned on (for display)
314 if ( $data['required'] || $should_display ) {
315 $label = '<label for="' . esc_attr( $opt ) . '" class="mc_var_label mc_header mc_header_' . esc_attr( $data['type'] ) . '">' . wp_kses_post( $label );
316 if ( $data['required'] && $num_fields > 1 ) {
317 $label .= '<span class="mc_required">*</span>';
318 }
319 $label .= '</label>';
320
321 $html .= '
322 <div class="mc_merge_var">
323 ' . $label;
324 switch ( $data['type'] ) {
325 case 'date':
326 $html .= '
327 <input type="text" size="18" placeholder="' . esc_attr( $data['default_value'] ) . '" data-format="' . esc_attr( $data['options']['date_format'] ) . '" name="' . esc_attr( $opt ) . '" id="' . esc_attr( $opt ) . '" class="date-pick mc_input"/>';
328 break;
329 case 'radio':
330 if ( is_array( $data['options']['choices'] ) ) {
331 $html .= '
332 <ul class="mc_list">';
333 foreach ( $data['options']['choices'] as $key => $value ) {
334 $html .= '
335 <li>
336 <input type="radio" id="' . esc_attr( $opt . '_' . $key ) . '" name="' . esc_attr( $opt ) . '" class="mc_radio" value="' . $value . '"' . checked( $data['default_value'], $value, false ) . ' />
337 <label for="' . esc_attr( $opt . '_' . $key ) . '" class="mc_radio_label">' . esc_html( $value ) . '</label>
338 </li>';
339 }
340 $html .= '
341 </ul>';
342 }
343 break;
344 case 'dropdown':
345 if ( is_array( $data['options']['choices'] ) ) {
346 $html .= '
347 <select id="' . esc_attr( $opt ) . '" name="' . esc_attr( $opt ) . '" class="mc_select">';
348 foreach ( $data['options']['choices'] as $value ) {
349 $html .= '
350 <option value="' . esc_attr( $value ) . '"' . selected( $value, $data['default_value'], false ) . '>' . esc_html( $value ) . '</option>';
351 }
352 $html .= '
353 </select>';
354 }
355 break;
356 case 'birthday':
357 $html .= '
358 <input type="text" size="18" placeholder="' . esc_attr( $data['default_value'] ) . '" data-format="' . esc_attr( $data['options']['date_format'] ) . '" name="' . esc_attr( $opt ) . '" id="' . esc_attr( $opt ) . '" class="birthdate-pick mc_input"/>';
359 break;
360 case 'birthday-old':
361 $days = range( 1, 31 );
362 $months = array(
363 esc_html__( 'January', 'mailchimp' ),
364 esc_html__( 'February', 'mailchimp' ),
365 esc_html__( 'March', 'mailchimp' ),
366 esc_html__( 'April', 'mailchimp' ),
367 esc_html__( 'May', 'mailchimp' ),
368 esc_html__( 'June', 'mailchimp' ),
369 esc_html__( 'July', 'mailchimp' ),
370 esc_html__( 'August', 'mailchimp' ),
371 esc_html__( 'September', 'mailchimp' ),
372 esc_html__( 'October', 'mailchimp' ),
373 esc_html__( 'November', 'mailchimp' ),
374 esc_html__( 'December', 'mailchimp' ),
375 );
376
377 $html .= '
378 <br /><select id="' . esc_attr( $opt ) . '" name="' . esc_attr( $opt . '[month]' ) . '" class="mc_select">';
379 foreach ( $months as $month_key => $month ) {
380 $html .= '
381 <option value="' . $month_key . '">' . $month . '</option>';
382 }
383 $html .= '
384 </select>';
385
386 $html .= '
387 <select id="' . esc_attr( $opt ) . '" name="' . esc_attr( $opt . '[day]' ) . '" class="mc_select">';
388 foreach ( $days as $day ) {
389 $html .= '
390 <option value="' . $day . '">' . $day . '</option>';
391 }
392 $html .= '
393 </select>';
394 break;
395 case 'address':
396 $countries = mailchimp_country_list();
397 $html .= '
398
399 <label for="' . esc_attr( $opt . '-addr1' ) . '" class="mc_address_label">' . esc_html__( 'Street Address', 'mailchimp' ) . '</label>
400 <input type="text" size="18" value="" name="' . esc_attr( $opt . '[addr1]' ) . '" id="' . esc_attr( $opt . '-addr1' ) . '" class="mc_input" />
401 <label for="' . esc_attr( $opt . '-addr2' ) . '" class="mc_address_label">' . esc_html__( 'Address Line 2', 'mailchimp' ) . '</label>
402 <input type="text" size="18" value="" name="' . esc_attr( $opt . '[addr2]' ) . '" id="' . esc_attr( $opt . '-addr2' ) . '" class="mc_input" />
403 <label for="' . esc_attr( $opt . '-city' ) . '" class="mc_address_label">' . esc_html__( 'City', 'mailchimp' ) . '</label>
404 <input type="text" size="18" value="" name="' . esc_attr( $opt . '[city]' ) . '" id="' . esc_attr( $opt . '-city' ) . '" class="mc_input" />
405 <label for="' . esc_attr( $opt . '-state' ) . '" class="mc_address_label">' . esc_html__( 'State', 'mailchimp' ) . '</label>
406 <input type="text" size="18" value="" name="' . esc_attr( $opt . '[state]' ) . '" id="' . esc_attr( $opt . '-state' ) . '" class="mc_input" />
407 <label for="' . esc_attr( $opt . '-zip' ) . '" class="mc_address_label">' . esc_html__( 'Zip / Postal', 'mailchimp' ) . '</label>
408 <input type="text" size="18" value="" maxlength="5" name="' . esc_attr( $opt . '[zip]' ) . '" id="' . esc_attr( $opt . '-zip' ) . '" class="mc_input" />
409 <label for="' . esc_attr( $opt . '-country' ) . '" class="mc_address_label">' . esc_html__( 'Country', 'mailchimp' ) . '</label>
410 <select name="' . esc_attr( $opt . '[country]' ) . '" id="' . esc_attr( $opt . '-country' ) . '">';
411 foreach ( $countries as $country_code => $country_name ) {
412 $html .= '
413 <option value="' . esc_attr( $country_code ) . '"' . selected( $country_code, $data['options']['default_country'], false ) . '>' . esc_html( $country_name ) . '</option>';
414 }
415 $html .= '
416 </select>';
417 break;
418 case 'zip':
419 $html .= '
420 <input type="text" size="18" maxlength="5" value="" name="' . esc_attr( $opt ) . '" id="' . esc_attr( $opt ) . '" class="mc_input" />';
421 break;
422 case 'phone':
423 if ( isset( $data['options']['phone_format'] ) && 'US' === $data['options']['phone_format'] ) {
424 $html .= '
425 <input type="text" size="2" maxlength="3" value="" name="' . esc_attr( $opt . '[area]' ) . '" id="' . esc_attr( $opt . '-area' ) . '" class="mc_input mc_phone" />
426 <input type="text" size="2" maxlength="3" value="" name="' . esc_attr( $opt . '[detail1]' ) . '" id="' . esc_attr( $opt . '-detail1' ) . '" class="mc_input mc_phone" />
427 <input type="text" size="5" maxlength="4" value="" name="' . esc_attr( $opt . '[detail2]' ) . '" id="' . esc_attr( $opt . '-detail2' ) . '" class="mc_input mc_phone" />
428 ';
429 } else {
430 $html .= '
431 <input type="text" size="18" value="" name="' . esc_attr( $opt ) . '" id="' . esc_attr( $opt ) . '" class="mc_input" />
432 ';
433 }
434 break;
435 case 'email':
436 case 'url':
437 case 'imageurl':
438 case 'text':
439 case 'number':
440 default:
441 $html .= '
442 <input type="text" size="18" placeholder="' . esc_attr( $data['default_value'] ) . '" name="' . esc_attr( $opt ) . '" id="' . esc_attr( $opt ) . '" class="mc_input"/>';
443 break;
444 }
445 if ( ! empty( $data['help_text'] ) ) {
446 $html .= '<span class="mc_help">' . esc_html( $data['help_text'] ) . '</span>';
447 }
448 $html .= '
449 </div><!-- /mc_merge_var -->';
450 }
451
452 return $html;
453 }
454
455 /**
456 * Mailchimp Subscribe Box widget class
457 */
458 class Mailchimp_SF_Widget extends WP_Widget /* phpcs:ignore Universal.Files.SeparateFunctionsFromOO.Mixed */ {
459
460 /**
461 * Initialize class
462 */
463 public function __construct() {
464 $widget_ops = array(
465 'description' => __( 'Displays a Mailchimp Subscribe box', 'mailchimp' ),
466 );
467 parent::__construct( 'Mailchimp_SF_Widget', __( 'Mailchimp Widget', 'mailchimp' ), $widget_ops );
468 }
469
470 /**
471 * Echoes the widget content.
472 *
473 * @param array $args Display arguments including 'before_title', 'after_title',
474 * 'before_widget', and 'after_widget'.
475 * @param array $instance The settings for the particular instance of the widget.
476 * @return void
477 */
478 public function widget( $args, $instance ) {
479 if ( ! is_array( $instance ) ) {
480 $instance = array();
481 }
482 mailchimp_sf_signup_form( array_merge( $args, $instance ) );
483 }
484
485 /**
486 * Outputs the settings update form.
487 *
488 * @param array $instance Current settings.
489 */
490 public function form( $instance ) {
491 ?>
492 <p>
493 <?php
494 echo wp_kses(
495 sprintf(
496 /* translators: 1: admin url */
497 __(
498 'Great work! Your widget is ready to go — just head <a href="%1$s">over here</a> if you\'d like to adjust your settings.',
499 'mailchimp'
500 ),
501 esc_url( admin_url( 'admin.php?page=mailchimp_sf_options' ) )
502 ),
503 [
504 'a' => [
505 'href' => [],
506 ],
507 ]
508 );
509 ?>
510 </p>
511 <?php
512 }
513 }
514
515 /**
516 * Return country list
517 *
518 * @return array
519 */
520 function mailchimp_country_list() {
521 return array(
522 '164' => __( 'USA', 'mailchimp' ),
523 '286' => __( 'Aaland Islands', 'mailchimp' ),
524 '274' => __( 'Afghanistan', 'mailchimp' ),
525 '2' => __( 'Albania', 'mailchimp' ),
526 '3' => __( 'Algeria', 'mailchimp' ),
527 '178' => __( 'American Samoa', 'mailchimp' ),
528 '4' => __( 'Andorra', 'mailchimp' ),
529 '5' => __( 'Angola', 'mailchimp' ),
530 '176' => __( 'Anguilla', 'mailchimp' ),
531 '175' => __( 'Antigua And Barbuda', 'mailchimp' ),
532 '6' => __( 'Argentina', 'mailchimp' ),
533 '7' => __( 'Armenia', 'mailchimp' ),
534 '179' => __( 'Aruba', 'mailchimp' ),
535 '8' => __( 'Australia', 'mailchimp' ),
536 '9' => __( 'Austria', 'mailchimp' ),
537 '10' => __( 'Azerbaijan', 'mailchimp' ),
538 '11' => __( 'Bahamas', 'mailchimp' ),
539 '12' => __( 'Bahrain', 'mailchimp' ),
540 '13' => __( 'Bangladesh', 'mailchimp' ),
541 '14' => __( 'Barbados', 'mailchimp' ),
542 '15' => __( 'Belarus', 'mailchimp' ),
543 '16' => __( 'Belgium', 'mailchimp' ),
544 '17' => __( 'Belize', 'mailchimp' ),
545 '18' => __( 'Benin', 'mailchimp' ),
546 '19' => __( 'Bermuda', 'mailchimp' ),
547 '20' => __( 'Bhutan', 'mailchimp' ),
548 '21' => __( 'Bolivia', 'mailchimp' ),
549 '22' => __( 'Bosnia and Herzegovina', 'mailchimp' ),
550 '23' => __( 'Botswana', 'mailchimp' ),
551 '24' => __( 'Brazil', 'mailchimp' ),
552 '180' => __( 'Brunei Darussalam', 'mailchimp' ),
553 '25' => __( 'Bulgaria', 'mailchimp' ),
554 '26' => __( 'Burkina Faso', 'mailchimp' ),
555 '27' => __( 'Burundi', 'mailchimp' ),
556 '28' => __( 'Cambodia', 'mailchimp' ),
557 '29' => __( 'Cameroon', 'mailchimp' ),
558 '30' => __( 'Canada', 'mailchimp' ),
559 '31' => __( 'Cape Verde', 'mailchimp' ),
560 '32' => __( 'Cayman Islands', 'mailchimp' ),
561 '33' => __( 'Central African Republic', 'mailchimp' ),
562 '34' => __( 'Chad', 'mailchimp' ),
563 '35' => __( 'Chile', 'mailchimp' ),
564 '36' => __( 'China', 'mailchimp' ),
565 '37' => __( 'Colombia', 'mailchimp' ),
566 '38' => __( 'Congo', 'mailchimp' ),
567 '183' => __( 'Cook Islands', 'mailchimp' ),
568 '268' => __( 'Costa Rica', 'mailchimp' ),
569 '275' => __( 'Cote D\'Ivoire', 'mailchimp' ),
570 '40' => __( 'Croatia', 'mailchimp' ),
571 '276' => __( 'Cuba', 'mailchimp' ),
572 '41' => __( 'Cyprus', 'mailchimp' ),
573 '42' => __( 'Czech Republic', 'mailchimp' ),
574 '43' => __( 'Denmark', 'mailchimp' ),
575 '44' => __( 'Djibouti', 'mailchimp' ),
576 '289' => __( 'Dominica', 'mailchimp' ),
577 '187' => __( 'Dominican Republic', 'mailchimp' ),
578 '233' => __( 'East Timor', 'mailchimp' ),
579 '45' => __( 'Ecuador', 'mailchimp' ),
580 '46' => __( 'Egypt', 'mailchimp' ),
581 '47' => __( 'El Salvador', 'mailchimp' ),
582 '48' => __( 'Equatorial Guinea', 'mailchimp' ),
583 '49' => __( 'Eritrea', 'mailchimp' ),
584 '50' => __( 'Estonia', 'mailchimp' ),
585 '51' => __( 'Ethiopia', 'mailchimp' ),
586 '191' => __( 'Faroe Islands', 'mailchimp' ),
587 '52' => __( 'Fiji', 'mailchimp' ),
588 '53' => __( 'Finland', 'mailchimp' ),
589 '54' => __( 'France', 'mailchimp' ),
590 '277' => __( 'French Polynesia', 'mailchimp' ),
591 '59' => __( 'Germany', 'mailchimp' ),
592 '60' => __( 'Ghana', 'mailchimp' ),
593 '194' => __( 'Gibraltar', 'mailchimp' ),
594 '61' => __( 'Greece', 'mailchimp' ),
595 '195' => __( 'Greenland', 'mailchimp' ),
596 '192' => __( 'Grenada', 'mailchimp' ),
597 '62' => __( 'Guam', 'mailchimp' ),
598 '198' => __( 'Guatemala', 'mailchimp' ),
599 '270' => __( 'Guernsey', 'mailchimp' ),
600 '65' => __( 'Guyana', 'mailchimp' ),
601 '200' => __( 'Haiti', 'mailchimp' ),
602 '66' => __( 'Honduras', 'mailchimp' ),
603 '67' => __( 'Hong Kong', 'mailchimp' ),
604 '68' => __( 'Hungary', 'mailchimp' ),
605 '69' => __( 'Iceland', 'mailchimp' ),
606 '70' => __( 'India', 'mailchimp' ),
607 '71' => __( 'Indonesia', 'mailchimp' ),
608 '278' => __( 'Iran', 'mailchimp' ),
609 '279' => __( 'Iraq', 'mailchimp' ),
610 '74' => __( 'Ireland', 'mailchimp' ),
611 '75' => __( 'Israel', 'mailchimp' ),
612 '76' => __( 'Italy', 'mailchimp' ),
613 '202' => __( 'Jamaica', 'mailchimp' ),
614 '78' => __( 'Japan', 'mailchimp' ),
615 '288' => __( 'Jersey (Channel Islands)', 'mailchimp' ),
616 '79' => __( 'Jordan', 'mailchimp' ),
617 '80' => __( 'Kazakhstan', 'mailchimp' ),
618 '81' => __( 'Kenya', 'mailchimp' ),
619 '82' => __( 'Kuwait', 'mailchimp' ),
620 '83' => __( 'Kyrgyzstan', 'mailchimp' ),
621 '84' => __( 'Lao People\'s Democratic Republic', 'mailchimp' ),
622 '85' => __( 'Latvia', 'mailchimp' ),
623 '86' => __( 'Lebanon', 'mailchimp' ),
624 '281' => __( 'Libya', 'mailchimp' ),
625 '90' => __( 'Liechtenstein', 'mailchimp' ),
626 '91' => __( 'Lithuania', 'mailchimp' ),
627 '92' => __( 'Luxembourg', 'mailchimp' ),
628 '208' => __( 'Macau', 'mailchimp' ),
629 '93' => __( 'Macedonia', 'mailchimp' ),
630 '94' => __( 'Madagascar', 'mailchimp' ),
631 '95' => __( 'Malawi', 'mailchimp' ),
632 '96' => __( 'Malaysia', 'mailchimp' ),
633 '97' => __( 'Maldives', 'mailchimp' ),
634 '98' => __( 'Mali', 'mailchimp' ),
635 '99' => __( 'Malta', 'mailchimp' ),
636 '212' => __( 'Mauritius', 'mailchimp' ),
637 '101' => __( 'Mexico', 'mailchimp' ),
638 '102' => __( 'Moldova, Republic of', 'mailchimp' ),
639 '103' => __( 'Monaco', 'mailchimp' ),
640 '104' => __( 'Mongolia', 'mailchimp' ),
641 '290' => __( 'Montenegro', 'mailchimp' ),
642 '105' => __( 'Morocco', 'mailchimp' ),
643 '106' => __( 'Mozambique', 'mailchimp' ),
644 '242' => __( 'Myanmar', 'mailchimp' ),
645 '107' => __( 'Namibia', 'mailchimp' ),
646 '108' => __( 'Nepal', 'mailchimp' ),
647 '109' => __( 'Netherlands', 'mailchimp' ),
648 '110' => __( 'Netherlands Antilles', 'mailchimp' ),
649 '213' => __( 'New Caledonia', 'mailchimp' ),
650 '111' => __( 'New Zealand', 'mailchimp' ),
651 '112' => __( 'Nicaragua', 'mailchimp' ),
652 '113' => __( 'Niger', 'mailchimp' ),
653 '114' => __( 'Nigeria', 'mailchimp' ),
654 '272' => __( 'North Korea', 'mailchimp' ),
655 '116' => __( 'Norway', 'mailchimp' ),
656 '117' => __( 'Oman', 'mailchimp' ),
657 '118' => __( 'Pakistan', 'mailchimp' ),
658 '222' => __( 'Palau', 'mailchimp' ),
659 '282' => __( 'Palestine', 'mailchimp' ),
660 '119' => __( 'Panama', 'mailchimp' ),
661 '219' => __( 'Papua New Guinea', 'mailchimp' ),
662 '120' => __( 'Paraguay', 'mailchimp' ),
663 '121' => __( 'Peru', 'mailchimp' ),
664 '122' => __( 'Philippines', 'mailchimp' ),
665 '123' => __( 'Poland', 'mailchimp' ),
666 '124' => __( 'Portugal', 'mailchimp' ),
667 '126' => __( 'Qatar', 'mailchimp' ),
668 '58' => __( 'Republic of Georgia', 'mailchimp' ),
669 '128' => __( 'Romania', 'mailchimp' ),
670 '129' => __( 'Russia', 'mailchimp' ),
671 '130' => __( 'Rwanda', 'mailchimp' ),
672 '205' => __( 'Saint Kitts and Nevis', 'mailchimp' ),
673 '206' => __( 'Saint Lucia', 'mailchimp' ),
674 '132' => __( 'Samoa (Independent)', 'mailchimp' ),
675 '227' => __( 'San Marino', 'mailchimp' ),
676 '133' => __( 'Saudi Arabia', 'mailchimp' ),
677 '134' => __( 'Senegal', 'mailchimp' ),
678 '266' => __( 'Serbia', 'mailchimp' ),
679 '135' => __( 'Seychelles', 'mailchimp' ),
680 '137' => __( 'Singapore', 'mailchimp' ),
681 '138' => __( 'Slovakia', 'mailchimp' ),
682 '139' => __( 'Slovenia', 'mailchimp' ),
683 '223' => __( 'Solomon Islands', 'mailchimp' ),
684 '141' => __( 'South Africa', 'mailchimp' ),
685 '142' => __( 'South Korea', 'mailchimp' ),
686 '143' => __( 'Spain', 'mailchimp' ),
687 '144' => __( 'Sri Lanka', 'mailchimp' ),
688 '293' => __( 'Sudan', 'mailchimp' ),
689 '146' => __( 'Suriname', 'mailchimp' ),
690 '147' => __( 'Swaziland', 'mailchimp' ),
691 '148' => __( 'Sweden', 'mailchimp' ),
692 '149' => __( 'Switzerland', 'mailchimp' ),
693 '152' => __( 'Taiwan', 'mailchimp' ),
694 '153' => __( 'Tanzania', 'mailchimp' ),
695 '154' => __( 'Thailand', 'mailchimp' ),
696 '155' => __( 'Togo', 'mailchimp' ),
697 '232' => __( 'Tonga', 'mailchimp' ),
698 '234' => __( 'Trinidad and Tobago', 'mailchimp' ),
699 '156' => __( 'Tunisia', 'mailchimp' ),
700 '157' => __( 'Turkey', 'mailchimp' ),
701 '287' => __( 'Turks &amp; Caicos Islands', 'mailchimp' ),
702 '159' => __( 'Uganda', 'mailchimp' ),
703 '161' => __( 'Ukraine', 'mailchimp' ),
704 '162' => __( 'United Arab Emirates', 'mailchimp' ),
705 '262' => __( 'United Kingdom', 'mailchimp' ),
706 '163' => __( 'Uruguay', 'mailchimp' ),
707 '239' => __( 'Vanuatu', 'mailchimp' ),
708 '166' => __( 'Vatican City State (Holy See)', 'mailchimp' ),
709 '167' => __( 'Venezuela', 'mailchimp' ),
710 '168' => __( 'Vietnam', 'mailchimp' ),
711 '169' => __( 'Virgin Islands (British)', 'mailchimp' ),
712 '238' => __( 'Virgin Islands (U.S.)', 'mailchimp' ),
713 '173' => __( 'Zambia', 'mailchimp' ),
714 '174' => __( 'Zimbabwe', 'mailchimp' ),
715 );
716 }
717