PluginProbe
Mailchimp List Subscribe Form / 1.6.1
Mailchimp List Subscribe Form v1.6.1
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.6.1, at mailchimp_widget.php

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