diff --git a/mailchimp.php b/mailchimp.php index 76620a1..2e8f1c3 100644 --- a/mailchimp.php +++ b/mailchimp.php @@ -25,7 +25,7 @@ */ // Version constant for easy CSS refreshes -define('MCSF_VER', '1.5.8'); +define( 'MCSF_VER', '1.5.8' ); // What's our permission (capability) threshold define('MCSF_CAP_THRESHOLD', 'manage_options'); @@ -281,7 +281,7 @@ function mailchimpSF_migrate_sopresto() { } $verify = mailchimpSF_verify_key($api); - + //something went wrong with the key that we had if(is_wp_error($verify)) { return; @@ -375,7 +375,7 @@ function mailchimpSF_delete_setup() { $options[] = $opt; } } - + mailchimpSF_delete_options($options); } @@ -463,7 +463,7 @@ function mailchimpSF_save_general_form_settings() { } /*Enable double optin toggle*/ - + if(isset($_POST['mc_double_optin'])) { update_option('mc_double_optin', true); $msg = '

'.__('Double opt-in turned On!', 'mailchimp_i18n').'

'; @@ -538,7 +538,7 @@ function mailchimpSF_save_general_form_settings() { update_option('mc_form_text_color', str_replace('#', '', $_POST['mc_form_text_color'])); } - + // IF NOT DEV MODE $igs = get_option('mc_interest_groups'); if (is_array($igs)) { @@ -607,7 +607,7 @@ function mailchimpSF_change_list_if_necessary() { if ($orig_list != $list_id){ // The user changed the list, Reset the Form Defaults mailchimpSF_set_form_defaults($list_name); - + $new_list = true; } // email_type_option @@ -636,7 +636,7 @@ function mailchimpSF_change_list_if_necessary() { function mailchimpSF_get_merge_vars($list_id, $new_list) { $api = mailchimpSF_get_api(); $mv = $api->get('lists/' . $list_id . '/merge-fields', 80); - + //if we get an error back from the api, exit this process. if(is_wp_error($mv)) { return; @@ -655,7 +655,7 @@ function mailchimpSF_get_merge_vars($list_id, $new_list) { } function mailchimpSF_add_email_field($merge) { - + $email = array( 'tag' => 'EMAIL', 'name' => __('Email Address', 'mailchimp_i18n'), @@ -740,7 +740,7 @@ function mailchimpSF_signup_submit() { $merge = $errs = $html_errs = array(); // Set up some vars $merge = mailchimpSF_merge_submit($mv); - + //Catch errors and fail early. if(is_wp_error($merge)) { $msg = "" . $merge->get_error_message() . ""; @@ -835,7 +835,7 @@ function mailchimpSF_subscribe_body($merge, $igs, $email_type, $email, $status, return $body; } -function mailchimpSF_check_status($endpoint) { +function mailchimpSF_check_status($endpoint) { $endpoint .= '?fields=status'; $api = mailchimpSF_get_api(); $subscriber = $api->get($endpoint, null); @@ -852,9 +852,9 @@ function mailchimpSF_merge_submit($mv) { // We also want to create an array where the keys are the tags for easier validation later $tag = $var['tag']; $mv_tag_keys[$tag] = $var; - + $opt = 'mc_mv_' . $tag; - + $opt_val = isset($_POST[$opt]) ? stripslashes_deep($_POST[$opt]) : ''; // Handle phone number logic @@ -966,7 +966,7 @@ function mailchimpSF_groups_submit($igs) { if(empty($igs)) { return new StdClass(); } - + //get groups and ids //set all to false @@ -1114,7 +1114,7 @@ function mailchimpSF_where_am_i() { /** - * MODIFIED VERSION of wp_verify_nonce from WP Core. Core was not overridden to prevent problems when replacing + * MODIFIED VERSION of wp_verify_nonce from WP Core. Core was not overridden to prevent problems when replacing * something universally. * * Verify that correct nonce was used with time limit. @@ -1158,7 +1158,7 @@ function mailchimpSF_verify_nonce($nonce, $action = -1) { /** - * MODIFIED VERSION of wp_create_nonce from WP Core. Core was not overridden to prevent problems when replacing + * MODIFIED VERSION of wp_create_nonce from WP Core. Core was not overridden to prevent problems when replacing * something universally. * * Creates a cryptographic token tied to a specific action, user, and window of time.