Advertisement
arowls

WP MailChimp WIdget Customization

Apr 23rd, 2013
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 23.92 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Displays a MailChimp Signup Form
  4.  **/
  5. function mailchimpSF_signup_form($args = array()) {
  6.     extract($args);
  7.  
  8.     $mv = get_option('mc_merge_vars');
  9.     $igs = get_option('mc_interest_groups');
  10.    
  11.     // See if we have valid Merge Vars
  12.     if (!is_array($mv)){
  13.         echo $before_widget;
  14.         ?>
  15.         <div class="mc_error_msg">
  16.             <?php esc_html_e('There was a problem loading your MailChimp details. Please re-run the setup process under Settings->MailChimp Setup', 'mailchimp_i18n'); ?>
  17.         </div>
  18.         <?php
  19.         echo $after_widget;
  20.         return;
  21.     }
  22.    
  23.     // Get some options
  24.     $uid = get_option('mc_user_id');
  25.     $list_name = get_option('mc_list_name');
  26.    
  27.     if (!empty($before_widget)) {
  28.         echo $before_widget;
  29.     }
  30.  
  31.     $header =  get_option('mc_header_content');
  32.     // See if we have custom header content
  33.     if (!empty($header)) {
  34.         // See if we need to wrap the header content in our own div
  35.         if (strlen($header) == strlen(strip_tags($header))){
  36.             echo !empty($before_title) ? $before_title : '<div class="mc_custom_border_hdr">';
  37.             echo $header; // don't escape $header b/c it may have HTML allowed
  38.             echo !empty($after_title) ? $after_title : '</div><!-- /mc_custom_border_hdr -->';
  39.         }
  40.         else {
  41.             echo $header; // don't escape $header b/c it may have HTML allowed
  42.         }
  43.     }
  44.    
  45.     $sub_heading = trim(get_option('mc_subheader_content'));
  46.     ?>
  47.    
  48. <div id="mc_signup">
  49. <!-- Replace default action of '#mc_signup' with action from custom ebed from, add method to post -->   <form method="post" action="INSERT URL YOUR FORM POST ACTION FROM MAILCHIMP HERE" method="post" name="mc-embedded-subscribe-form" class="validate" target="_blank" id="mc_signup_form">
  50.         <input type="hidden" id="mc_submit_type" name="mc_submit_type" value="html" />
  51.         <input type="hidden" name="mcsf_action" value="mc_submit_signup_form" />
  52.         <?php wp_nonce_field('mc_submit_signup_form', '_mc_submit_signup_form_nonce', false); ?>
  53.        
  54.     <?php
  55.     if ($sub_heading) {
  56.         ?>
  57.         <div id="mc_subheader">
  58.             <?php echo $sub_heading; ?>
  59.         </div><!-- /mc_subheader -->
  60.         <?php
  61.     }
  62.     ?>
  63.    
  64.     <div class="mc_form_inside">
  65.        
  66.         <div class="updated" id="mc_message">
  67.             <?php echo mailchimpSF_global_msg(); ?>
  68.         </div><!-- /mc_message -->
  69.  
  70.         <?php
  71.         //don't show the "required" stuff if there's only 1 field to display.
  72.         $num_fields = 0;
  73.         foreach((array)$mv as $var) {
  74.             $opt = 'mce-'.$var['tag'];//modified the prefix being appended here so that ID on inputs would match list settings to prevent form breaking on submission.
  75.             $name = $var['tag'];    //added so that name on inputs would match list settings to prevent form breaking on submission. replaced all instances of name=$opt with name=$name
  76.             if ($var['req'] || get_option($opt) == 'on') {
  77.                 $num_fields++;
  78.             }
  79.         }
  80.  
  81.         if (is_array($mv)) {
  82.             // head on back to the beginning of the array
  83.             reset($mv);
  84.         }
  85.        
  86.         // Loop over our vars, and output the ones that are set to display
  87.         foreach($mv as $var) {
  88.             if (!$var['public']) {
  89.                 echo '<div style="display:none;">'.mailchimp_form_field($var, $num_fields).'</div>';
  90.             }
  91.             else {
  92.                 echo mailchimp_form_field($var, $num_fields);
  93.             }
  94.         }
  95.        
  96.        
  97.         // Show an explanation of the * if there's more than one field
  98.         if ($num_fields > 1) {
  99.             ?>
  100.             <div id="mc-indicates-required">
  101.                 * = <?php esc_html_e('required field', 'mailchimp_i18n'); ?>
  102.             </div><!-- /mc-indicates-required -->
  103.             <?php
  104.         }
  105.        
  106.        
  107.         // Show our Interest groups fields if we have them, and they're set to on
  108.         if (is_array($igs) && !empty($igs)) {
  109.             foreach ($igs as $ig) {
  110.                 if (is_array($ig) && isset($ig['id'])) {
  111.                     if ($igs && get_option('mc_show_interest_groups_'.$ig['id']) == 'on') {
  112.                         if ($ig['form_field'] != 'hidden') {
  113.                         ?>             
  114.                             <div class="mc_interests_header">
  115.                                 <?php echo esc_html($ig['name']); ?>
  116.                             </div><!-- /mc_interests_header -->
  117.                             <div class="mc_interest">
  118.                         <?php
  119.                         }
  120.                         else {
  121.                         ?>
  122.                             <div class="mc_interest" style="display: none;">
  123.                         <?php                  
  124.                         }
  125.                     ?>         
  126.  
  127.                     <?php
  128.                         mailchimp_interest_group_field($ig);
  129.                     ?>             
  130.                     </div><!-- /mc_interest -->
  131.            
  132.                     <?php
  133.                     }
  134.                 }
  135.             }
  136.         }
  137.  
  138.         if (get_option('mc_email_type_option')) {
  139.         ?>
  140.         <div class="mergeRow">
  141.             <label><?php _e('Preferred Format', 'mailchimp_i18n'); ?></label>
  142.             <div class="field-group groups">
  143.                 <ul class="mc_list">
  144.                     <li><input type="radio" name="email_type" id="email_type_html" value="html" checked="checked"><label for="email_type_html"><?php _e('HTML', 'mailchimp_i18n'); ?></label></li>
  145.                     <li><input type="radio" name="email_type" id="email_type_text" value="text"><label for="email_type_text"><?php _e('Text', 'mailchimp_i18n'); ?></label></li>
  146.                     <li><input type="radio" name="email_type" id="email_type_mobile" value="mobile"><label for="email_type_mobile"><?php _e('Mobile', 'mailchimp_i18n'); ?></label></li>
  147.                 </ul>
  148.             </div>
  149.         </div> 
  150.  
  151.         <?php
  152.         }
  153.         ?>
  154.  
  155.         <div class="mc_signup_submit">
  156.             <input type="submit" name="mc_signup_submit" id="mc_signup_submit" value="<?php echo esc_attr(get_option('mc_submit_text')); ?>" class="button" />
  157.         </div><!-- /mc_signup_submit -->
  158.    
  159.    
  160.         <?php
  161.         if ( get_option('mc_use_unsub_link') == 'on') {
  162.             list($key, $dc) = explode("-",get_option('mc_apikey'),2);
  163.             if (!$dc) $dc = "us1";
  164.             $host = 'http://'.$dc.'.list-manage.com';
  165.             ?>
  166.             <div id="mc_unsub_link" align="center">
  167.                 <a href="<?php echo esc_url($host.'/unsubscribe/?u='.get_option('mc_user_id').'&amp;id='.get_option('mc_list_id')); ?>" target="_blank"><?php esc_html_e('unsubscribe from list', 'mailchimp_i18n'); ?></a>
  168.             </div><!-- /mc_unsub_link -->
  169.             <?php
  170.         }
  171.         if ( get_option('mc_rewards') == 'on') {
  172.             ?>
  173.             <br/>
  174.             <div id="mc_display_rewards" align="center">
  175.                 <?php esc_html_e('powered by', 'mailchimp_i18n'); ?> <a href="<?php echo esc_url('http://www.mailchimp.com/affiliates/?aid='.get_option('mc_user_id').'&amp;afl=1'); ?>">MailChimp</a>!
  176.             </div><!-- /mc_display_rewards -->
  177.             <?php
  178.         }
  179.         ?>
  180.        
  181.     </div><!-- /mc_form_inside -->
  182.     </form><!-- /mc_signup_form -->
  183. </div><!-- /mc_signup_container -->
  184.     <?php
  185.     if (!empty($before_widget)) {
  186.         echo $after_widget;
  187.     }
  188. }
  189.  
  190. /**
  191.  * Generate and display markup for Interest Groups
  192.  * @param array $ig Set of Interest Groups to generate markup for
  193.  * @return void
  194.  */
  195. function mailchimp_interest_group_field($ig) {
  196.     if (!is_array($ig)) {
  197.         return;
  198.     }
  199.     $html = '';
  200.     $set_name = 'group['.$ig['id'].']';
  201.     switch ($ig['form_field']) {
  202.         case 'checkbox':
  203.         case 'checkboxes':
  204.             $i = 1;
  205.             foreach($ig['groups'] as $interest){
  206.                 $interest = $interest['name'];
  207.                 $html .= '
  208.                 <input type="checkbox" name="'.esc_attr($set_name.'['.$i.']').'" id="'.esc_attr('mc_interest_'.$ig['id'].'_'.$interest).'" class="mc_interest" value="'.esc_attr($interest).'" />
  209.                 <label for="'. esc_attr('mc_interest_'.$ig['id'].'_'.$interest).'" class="mc_interest_label">'.esc_html($interest).'</label>
  210.                 <br/>';
  211.                 $i++;
  212.             }
  213.             break;
  214.         case 'radio':
  215.             foreach($ig['groups'] as $interest){
  216.                 $interest = $interest['name'];
  217.                 $html .= '
  218.                 <input type="radio" name="'.esc_attr($set_name).'" id="'.esc_attr('mc_interest_'.$ig['id'].'_'.$interest).'" class="mc_interest" value="'.esc_attr($interest).'"/>
  219.                 <label for="'.esc_attr('mc_interest_'.$ig['id'].'_'.$interest).'" class="mc_interest_label">'.esc_html($interest).'</label>
  220.                 <br/>';
  221.             }
  222.             break;
  223.         case 'select':
  224.         case 'dropdown':
  225.             $html .= '
  226.             <select name="'.esc_attr($set_name).'">
  227.                 <option value=""></option>';
  228.                 foreach($ig['groups'] as $interest){
  229.                     $interest = $interest['name'];
  230.                     $html .= '
  231.                     <option value="'.esc_attr($interest).'">'.esc_html($interest).'</option>';
  232.                 }
  233.                 $html .= '
  234.             </select>';
  235.             break;
  236.         case 'hidden':
  237.             $i = 1;
  238.             foreach($ig['groups'] as $interest) {
  239.                 $interest = $interest['name'];
  240.                 $html .= '
  241.                 <input type="checkbox" name="'.esc_attr($set_name.'['.$i.']').'" id="'.esc_attr('mc_interest_'.$ig['id'].'_'.$interest).'" class="mc_interest" value="'.esc_attr($interest).'" />
  242.                 <label for="'. esc_attr('mc_interest_'.$ig['id'].'_'.$interest).'" class="mc_interest_label">'.esc_html($interest).'</label>';
  243.                 $i++;
  244.             }
  245.             break;
  246.     }
  247.     echo $html;
  248. }
  249.  
  250. /**
  251.  * Generate and display markup for form fields
  252.  * @param array $var Array containing informaoin about the field
  253.  * @param int $num_fields The number of fields total we'll be generating markup for. Used in calculating required text logic
  254.  * @return void
  255.  */
  256. function mailchimp_form_field($var, $num_fields) {
  257.     @h@         $opt = 'mce-'.$var['tag'];//modified the prefix being appended here so that ID on inputs would match list settings to prevent form breaking on submission.
  258.             $name = $var['tag'];    //added so that name on inputs would match list settings to prevent form breaking on submission. replaced all instances of name=$opt with name=$name
  259.     $html = '';
  260.     // See if that var is set as required, or turned on (for display)
  261.     if ($var['req'] || get_option($opt) == 'on') {
  262.         $label = '<label for="'.esc_attr($opt).'" class="mc_var_label">'.esc_html($var['name']);
  263.         if ($var['req'] && $num_fields > 1) {
  264.             $label .= '<span class="mc_required">*</span>';
  265.         }
  266.         $label .= '</label>';
  267.    
  268.         $html .= '
  269. <div class="mc_merge_var">
  270.         '.$label;
  271.    
  272.         switch ($var['field_type']) {
  273.             case 'date':
  274.                 $html .= '
  275.     <input type="text" size="18" value="'.esc_attr($var['default']).'" name="'.esc_attr($name).'" id="'.esc_attr($opt).'" class="date-pick mc_input"/>';
  276.                 break;
  277.             case 'radio':
  278.                 if (is_array($var['choices'])) {
  279.                     $html .= '
  280.     <ul class="mc_list">';
  281.                     foreach ($var['choices'] as $key => $value) {
  282.                         $html .= '
  283.         <li>
  284.             <input type="radio" id="'.esc_attr($opt.'_'.$key).'" name="'.esc_attr($name).'" class="mc_radio" value="'.$value.'"'.checked($var['default'], $value, false).' />
  285.             <label for="'.esc_attr($opt.'_'.$key).'" class="mc_radio_label">'.esc_html($value).'</label>
  286.         </li>';
  287.                     }
  288.                     $html .= '
  289.     </ul>';
  290.                 }
  291.                 break;
  292.             case 'dropdown':
  293.                 if (is_array($var['choices'])) {
  294.                     $html .= '
  295.     <br /><select id="'.esc_attr($opt).'" name="'.esc_attr($name).'" class="mc_select">';
  296.                     foreach ($var['choices'] as $value) {
  297.                         $html .= '
  298.         <option value="'.esc_attr($value).'"'.selected($value, $var['default'], false).'>'.esc_html($value).'</option>';
  299.                     }
  300.                     $html .= '
  301.     </select>';
  302.                 }
  303.                 break;
  304.             case 'birthday':
  305.                 $html .= '
  306.     <input type="text" size="18" value="'.esc_attr($var['default']).'" name="'.esc_attr($name).'" id="'.esc_attr($opt).'" class="birthdate-pick mc_input"/>';
  307.                 break;
  308.             case 'birthday-old':
  309.                 $days = range(1, 31);
  310.                 $months = array(__('January', 'mailchimp_i18n'), __('February', 'mailchimp_i18n'), __('March', 'mailchimp_i18n'), __('April', 'mailchimp_i18n'), __('May', 'mailchimp_i18n'), __('June', 'mailchimp_i18n'), __('July', 'mailchimp_i18n'), __('August', 'mailchimp_i18n'), __('September', 'mailchimp_i18n'), __('October', 'mailchimp_i18n'), __('November', 'mailchimp_i18n'), __('December', 'mailchimp_i18n'), );
  311.                
  312.                 $html .= '
  313.     <br /><select id="'.esc_attr($opt).'" name="'.esc_attr($opt.'[month]').'" class="mc_select">';
  314.                 foreach ($months as $month_key => $month) {
  315.                     $html .= '
  316.         <option value="'.$month_key.'">'.$month.'</option>';
  317.                 }
  318.                 $html .= '
  319.     </select>';
  320.    
  321.                 $html .= '
  322.     <select id="'.esc_attr($opt).'" name="'.esc_attr($opt.'[day]').'" class="mc_select">';
  323.                 foreach ($days as $day) {
  324.                         $html .= '
  325.         <option value="'.$day.'">'.$day.'</option>';
  326.                     }          
  327.                 $html .= '
  328.     </select>';
  329.                 break;
  330.             case 'address':
  331.             $countries = mailchimp_country_list();
  332.             $html .= '
  333.     <br />
  334.     <label for="'.esc_attr($opt.'-addr1').'" class="mc_address_label">'.__('Street Address', 'mailchimp_i18n').'</label> <br />
  335.     <input type="text" size="18" value="" name="'.esc_attr($opt.'[addr1]').'" id="'.esc_attr($opt.'-addr1').'" class="mc_input" /> <br />
  336.     <label for="'.esc_attr($opt.'-addr2').'" class="mc_address_label">'.__('Address Line 2', 'mailchimp_i18n').'</label> <br />
  337.     <input type="text" size="18" value="" name="'.esc_attr($opt.'[addr2]').'" id="'.esc_attr($opt.'-addr2').'" class="mc_input" /> <br />
  338.     <label for="'.esc_attr($opt.'-city').'" class="mc_address_label">'.__('City', 'mailchimp_i18n').'</label>   <br />
  339.     <input type="text" size="18" value="" name="'.esc_attr($opt.'[city]').'" id="'.esc_attr($opt.'-city').'" class="mc_input" /> <br />
  340.     <label for="'.esc_attr($opt.'-state').'" class="mc_address_label">'.__('State', 'mailchimp_i18n').'</label> <br />
  341.     <input type="text" size="18" value="" name="'.esc_attr($opt.'[state]').'" id="'.esc_attr($opt.'-state').'" class="mc_input" /> <br />
  342.     <label for="'.esc_attr($opt.'-zip').'" class="mc_address_label">'.__('Zip / Postal', 'mailchimp_i18n').'</label> <br />
  343.     <input type="text" size="18" value="" maxlength="5" name="'.esc_attr($opt.'[zip]').'" id="'.esc_attr($opt.'-zip').'" class="mc_input" /> <br />
  344.     <label for="'.esc_attr($opt.'-country').'" class="mc_address_label">'.__('Country', 'mailchimp_i18n').'</label> <br />
  345.     <select name="'.esc_attr($opt.'[country]').'" id="'.esc_attr($opt.'-country').'">';
  346.             foreach ($countries as $country_code => $country_name) {
  347.                 $html .= '
  348.         <option value="'.esc_attr($country_code).'"'.selected($country_code, $var['defaultcountry'], false).'>'.esc_html($country_name).'</option>';
  349.             }
  350.             $html .= '
  351.     </select>';
  352.                 break;
  353.             case 'zip':
  354.                 $html .= '
  355.     <input type="text" size="18" maxlength="5" value="" name="'.esc_attr($name).'" id="'.esc_attr($opt).'" class="mc_input" />';
  356.                 break;
  357.             case 'phone':
  358.                 $html .= '<br />
  359.     &#40; <input type="text" size="3" maxlength="3" value="" name="'.esc_attr($opt.'[area]').'" id="'.esc_attr($opt.'-area').'" class="mc_input mc_phone" /> &#41; &ndash;
  360.     <input type="text" size="3" maxlength="3" value="" name="'.esc_attr($opt.'[detail1]').'" id="'.esc_attr($opt.'-detail1').'" class="mc_input mc_phone" /> &ndash;
  361.     <input type="text" size="4" maxlength="4" value="" name="'.esc_attr($opt.'[detail2]').'" id="'.esc_attr($opt.'-detail2').'" class="mc_input mc_phone" />
  362.             ';
  363.                 break;
  364.             case 'email':
  365.             case 'url':
  366.             case 'imageurl':
  367.             case 'text':
  368.             case 'number':
  369.             default:
  370.                 $html .= '
  371.     <input type="text" size="18" value="'.esc_html($var['default']).'" name="'.esc_attr($name).'" id="'.esc_attr($opt).'" class="mc_input"/>';
  372.                 break;
  373.         }
  374.         if (!empty($var['helptext'])) {
  375.             $html .= '<span class="mc_help">'.esc_html($var['helptext']).'</span>';
  376.         }
  377.         $html .= '
  378. </div><!-- /mc_merge_var -->';
  379.     }
  380.    
  381.     return $html;
  382. }
  383.  
  384. /**
  385.  * MailChimp Subscribe Box widget class
  386.  */
  387. class mailchimpSF_Widget extends WP_Widget {
  388.  
  389.     function mailchimpSF_Widget() {
  390.         $widget_ops = array(
  391.             'description' => __('Displays a MailChimp Subscribe box', 'mailchimp_i18n')
  392.         );
  393.         $this->WP_Widget('mailchimpSF_widget', __('MailChimp Widget', 'mailchimp_i18n'), $widget_ops);
  394.     }
  395.  
  396.     function widget( $args, $instance ) {
  397.         if (!is_array($instance)) {
  398.             $instance = array();
  399.         }
  400.         mailchimpSF_signup_form(array_merge($args, $instance));
  401.     }
  402. }
  403.  
  404. function mailchimp_country_list() {
  405.     return array(
  406.         '164' => __('USA', 'mailchimp_i18n'),
  407.         '286' => __('Aaland Islands', 'mailchimp_i18n'),
  408.         '274' => __('Afghanistan', 'mailchimp_i18n'),
  409.         '2' => __('Albania', 'mailchimp_i18n'),
  410.         '3' => __('Algeria', 'mailchimp_i18n'),
  411.         '178' => __('American Samoa', 'mailchimp_i18n'),
  412.         '4' => __('Andorra', 'mailchimp_i18n'),
  413.         '5' => __('Angola', 'mailchimp_i18n'),
  414.         '176' => __('Anguilla', 'mailchimp_i18n'),
  415.         '175' => __('Antigua And Barbuda', 'mailchimp_i18n'),
  416.         '6' => __('Argentina', 'mailchimp_i18n'),
  417.         '7' => __('Armenia', 'mailchimp_i18n'),
  418.         '179' => __('Aruba', 'mailchimp_i18n'),
  419.         '8' => __('Australia', 'mailchimp_i18n'),
  420.         '9' => __('Austria', 'mailchimp_i18n'),
  421.         '10' => __('Azerbaijan', 'mailchimp_i18n'),
  422.         '11' => __('Bahamas', 'mailchimp_i18n'),
  423.         '12' => __('Bahrain', 'mailchimp_i18n'),
  424.         '13' => __('Bangladesh', 'mailchimp_i18n'),
  425.         '14' => __('Barbados', 'mailchimp_i18n'),
  426.         '15' => __('Belarus', 'mailchimp_i18n'),
  427.         '16' => __('Belgium', 'mailchimp_i18n'),
  428.         '17' => __('Belize', 'mailchimp_i18n'),
  429.         '18' => __('Benin', 'mailchimp_i18n'),
  430.         '19' => __('Bermuda', 'mailchimp_i18n'),
  431.         '20' => __('Bhutan', 'mailchimp_i18n'),
  432.         '21' => __('Bolivia', 'mailchimp_i18n'),
  433.         '22' => __('Bosnia and Herzegovina', 'mailchimp_i18n'),
  434.         '23' => __('Botswana', 'mailchimp_i18n'),
  435.         '24' => __('Brazil', 'mailchimp_i18n'),
  436.         '180' => __('Brunei Darussalam', 'mailchimp_i18n'),
  437.         '25' => __('Bulgaria', 'mailchimp_i18n'),
  438.         '26' => __('Burkina Faso', 'mailchimp_i18n'),
  439.         '27' => __('Burundi', 'mailchimp_i18n'),
  440.         '28' => __('Cambodia', 'mailchimp_i18n'),
  441.         '29' => __('Cameroon', 'mailchimp_i18n'),
  442.         '30' => __('Canada', 'mailchimp_i18n'),
  443.         '31' => __('Cape Verde', 'mailchimp_i18n'),
  444.         '32' => __('Cayman Islands', 'mailchimp_i18n'),
  445.         '33' => __('Central African Republic', 'mailchimp_i18n'),
  446.         '34' => __('Chad', 'mailchimp_i18n'),
  447.         '35' => __('Chile', 'mailchimp_i18n'),
  448.         '36' => __('China', 'mailchimp_i18n'),
  449.         '37' => __('Colombia', 'mailchimp_i18n'),
  450.         '38' => __('Congo', 'mailchimp_i18n'),
  451.         '183' => __('Cook Islands', 'mailchimp_i18n'),
  452.         '268' => __('Costa Rica', 'mailchimp_i18n'),
  453.         '275' => __('Cote D\'Ivoire', 'mailchimp_i18n'),
  454.         '40' => __('Croatia', 'mailchimp_i18n'),
  455.         '276' => __('Cuba', 'mailchimp_i18n'),
  456.         '41' => __('Cyprus', 'mailchimp_i18n'),
  457.         '42' => __('Czech Republic', 'mailchimp_i18n'),
  458.         '43' => __('Denmark', 'mailchimp_i18n'),
  459.         '44' => __('Djibouti', 'mailchimp_i18n'),
  460.         '289' => __('Dominica', 'mailchimp_i18n'),
  461.         '187' => __('Dominican Republic', 'mailchimp_i18n'),
  462.         '233' => __('East Timor', 'mailchimp_i18n'),
  463.         '45' => __('Ecuador', 'mailchimp_i18n'),
  464.         '46' => __('Egypt', 'mailchimp_i18n'),
  465.         '47' => __('El Salvador', 'mailchimp_i18n'),
  466.         '48' => __('Equatorial Guinea', 'mailchimp_i18n'),
  467.         '49' => __('Eritrea', 'mailchimp_i18n'),
  468.         '50' => __('Estonia', 'mailchimp_i18n'),
  469.         '51' => __('Ethiopia', 'mailchimp_i18n'),
  470.         '191' => __('Faroe Islands', 'mailchimp_i18n'),
  471.         '52' => __('Fiji', 'mailchimp_i18n'),
  472.         '53' => __('Finland', 'mailchimp_i18n'),
  473.         '54' => __('France', 'mailchimp_i18n'),
  474.         '277' => __('French Polynesia', 'mailchimp_i18n'),
  475.         '59' => __('Germany', 'mailchimp_i18n'),
  476.         '60' => __('Ghana', 'mailchimp_i18n'),
  477.         '194' => __('Gibraltar', 'mailchimp_i18n'),
  478.         '61' => __('Greece', 'mailchimp_i18n'),
  479.         '195' => __('Greenland', 'mailchimp_i18n'),
  480.         '192' => __('Grenada', 'mailchimp_i18n'),
  481.         '62' => __('Guam', 'mailchimp_i18n'),
  482.         '198' => __('Guatemala', 'mailchimp_i18n'),
  483.         '270' => __('Guernsey', 'mailchimp_i18n'),
  484.         '65' => __('Guyana', 'mailchimp_i18n'),
  485.         '200' => __('Haiti', 'mailchimp_i18n'),
  486.         '66' => __('Honduras', 'mailchimp_i18n'),
  487.         '67' => __('Hong Kong', 'mailchimp_i18n'),
  488.         '68' => __('Hungary', 'mailchimp_i18n'),
  489.         '69' => __('Iceland', 'mailchimp_i18n'),
  490.         '70' => __('India', 'mailchimp_i18n'),
  491.         '71' => __('Indonesia', 'mailchimp_i18n'),
  492.         '278' => __('Iran', 'mailchimp_i18n'),
  493.         '279' => __('Iraq', 'mailchimp_i18n'),
  494.         '74' => __('Ireland', 'mailchimp_i18n'),
  495.         '75' => __('Israel', 'mailchimp_i18n'),
  496.         '76' => __('Italy', 'mailchimp_i18n'),
  497.         '202' => __('Jamaica', 'mailchimp_i18n'),
  498.         '78' => __('Japan', 'mailchimp_i18n'),
  499.         '288' => __('Jersey  (Channel Islands)', 'mailchimp_i18n'),
  500.         '79' => __('Jordan', 'mailchimp_i18n'),
  501.         '80' => __('Kazakhstan', 'mailchimp_i18n'),
  502.         '81' => __('Kenya', 'mailchimp_i18n'),
  503.         '82' => __('Kuwait', 'mailchimp_i18n'),
  504.         '83' => __('Kyrgyzstan', 'mailchimp_i18n'),
  505.         '84' => __('Lao People\'s Democratic Republic', 'mailchimp_i18n'),
  506.         '85' => __('Latvia', 'mailchimp_i18n'),
  507.         '86' => __('Lebanon', 'mailchimp_i18n'),
  508.         '281' => __('Libya', 'mailchimp_i18n'),
  509.         '90' => __('Liechtenstein', 'mailchimp_i18n'),
  510.         '91' => __('Lithuania', 'mailchimp_i18n'),
  511.         '92' => __('Luxembourg', 'mailchimp_i18n'),
  512.         '208' => __('Macau', 'mailchimp_i18n'),
  513.         '93' => __('Macedonia', 'mailchimp_i18n'),
  514.         '94' => __('Madagascar', 'mailchimp_i18n'),
  515.         '95' => __('Malawi', 'mailchimp_i18n'),
  516.         '96' => __('Malaysia', 'mailchimp_i18n'),
  517.         '97' => __('Maldives', 'mailchimp_i18n'),
  518.         '98' => __('Mali', 'mailchimp_i18n'),
  519.         '99' => __('Malta', 'mailchimp_i18n'),
  520.         '212' => __('Mauritius', 'mailchimp_i18n'),
  521.         '101' => __('Mexico', 'mailchimp_i18n'),
  522.         '102' => __('Moldova, Republic of', 'mailchimp_i18n'),
  523.         '103' => __('Monaco', 'mailchimp_i18n'),
  524.         '104' => __('Mongolia', 'mailchimp_i18n'),
  525.         '290' => __('Montenegro', 'mailchimp_i18n'),
  526.         '105' => __('Morocco', 'mailchimp_i18n'),
  527.         '106' => __('Mozambique', 'mailchimp_i18n'),
  528.         '242' => __('Myanmar', 'mailchimp_i18n'),
  529.         '107' => __('Namibia', 'mailchimp_i18n'),
  530.         '108' => __('Nepal', 'mailchimp_i18n'),
  531.         '109' => __('Netherlands', 'mailchimp_i18n'),
  532.         '110' => __('Netherlands Antilles', 'mailchimp_i18n'),
  533.         '213' => __('New Caledonia', 'mailchimp_i18n'),
  534.         '111' => __('New Zealand', 'mailchimp_i18n'),
  535.         '112' => __('Nicaragua', 'mailchimp_i18n'),
  536.         '113' => __('Niger', 'mailchimp_i18n'),
  537.         '114' => __('Nigeria', 'mailchimp_i18n'),
  538.         '272' => __('North Korea', 'mailchimp_i18n'),
  539.         '116' => __('Norway', 'mailchimp_i18n'),
  540.         '117' => __('Oman', 'mailchimp_i18n'),
  541.         '118' => __('Pakistan', 'mailchimp_i18n'),
  542.         '222' => __('Palau', 'mailchimp_i18n'),
  543.         '282' => __('Palestine', 'mailchimp_i18n'),
  544.         '119' => __('Panama', 'mailchimp_i18n'),
  545.         '219' => __('Papua New Guinea', 'mailchimp_i18n'),
  546.         '120' => __('Paraguay', 'mailchimp_i18n'),
  547.         '121' => __('Peru', 'mailchimp_i18n'),
  548.         '122' => __('Philippines', 'mailchimp_i18n'),
  549.         '123' => __('Poland', 'mailchimp_i18n'),
  550.         '124' => __('Portugal', 'mailchimp_i18n'),
  551.         '126' => __('Qatar', 'mailchimp_i18n'),
  552.         '58' => __('Republic of Georgia', 'mailchimp_i18n'),
  553.         '128' => __('Romania', 'mailchimp_i18n'),
  554.         '129' => __('Russia', 'mailchimp_i18n'),
  555.         '130' => __('Rwanda', 'mailchimp_i18n'),
  556.         '205' => __('Saint Kitts and Nevis', 'mailchimp_i18n'),
  557.         '206' => __('Saint Lucia', 'mailchimp_i18n'),
  558.         '132' => __('Samoa (Independent)', 'mailchimp_i18n'),
  559.         '227' => __('San Marino', 'mailchimp_i18n'),
  560.         '133' => __('Saudi Arabia', 'mailchimp_i18n'),
  561.         '134' => __('Senegal', 'mailchimp_i18n'),
  562.         '266' => __('Serbia', 'mailchimp_i18n'),
  563.         '135' => __('Seychelles', 'mailchimp_i18n'),
  564.         '137' => __('Singapore', 'mailchimp_i18n'),
  565.         '138' => __('Slovakia', 'mailchimp_i18n'),
  566.         '139' => __('Slovenia', 'mailchimp_i18n'),
  567.         '223' => __('Solomon Islands', 'mailchimp_i18n'),
  568.         '141' => __('South Africa', 'mailchimp_i18n'),
  569.         '142' => __('South Korea', 'mailchimp_i18n'),
  570.         '143' => __('Spain', 'mailchimp_i18n'),
  571.         '144' => __('Sri Lanka', 'mailchimp_i18n'),
  572.         '293' => __('Sudan', 'mailchimp_i18n'),
  573.         '146' => __('Suriname', 'mailchimp_i18n'),
  574.         '147' => __('Swaziland', 'mailchimp_i18n'),
  575.         '148' => __('Sweden', 'mailchimp_i18n'),
  576.         '149' => __('Switzerland', 'mailchimp_i18n'),
  577.         '152' => __('Taiwan', 'mailchimp_i18n'),
  578.         '153' => __('Tanzania', 'mailchimp_i18n'),
  579.         '154' => __('Thailand', 'mailchimp_i18n'),
  580.         '155' => __('Togo', 'mailchimp_i18n'),
  581.         '232' => __('Tonga', 'mailchimp_i18n'),
  582.         '234' => __('Trinidad and Tobago', 'mailchimp_i18n'),
  583.         '156' => __('Tunisia', 'mailchimp_i18n'),
  584.         '157' => __('Turkey', 'mailchimp_i18n'),
  585.         '287' => __('Turks &amp; Caicos Islands', 'mailchimp_i18n'),
  586.         '159' => __('Uganda', 'mailchimp_i18n'),
  587.         '161' => __('Ukraine', 'mailchimp_i18n'),
  588.         '162' => __('United Arab Emirates', 'mailchimp_i18n'),
  589.         '262' => __('United Kingdom', 'mailchimp_i18n'),
  590.         '163' => __('Uruguay', 'mailchimp_i18n'),
  591.         '239' => __('Vanuatu', 'mailchimp_i18n'),
  592.         '166' => __('Vatican City State (Holy See)', 'mailchimp_i18n'),
  593.         '167' => __('Venezuela', 'mailchimp_i18n'),
  594.         '168' => __('Vietnam', 'mailchimp_i18n'),
  595.         '169' => __('Virgin Islands (British)', 'mailchimp_i18n'),
  596.         '238' => __('Virgin Islands (U.S.)', 'mailchimp_i18n'),
  597.         '173' => __('Zambia', 'mailchimp_i18n'),
  598.         '174' => __('Zimbabwe', 'mailchimp_i18n'),
  599.     );
  600. }
  601. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement