Completed
Push — master ( 2f95aa...1df65a )
by Evan
05:36
created
admin/partials/menu/options.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@  discard block
 block discarded – undo
5 5
 */
6 6
 
7 7
 	/* Get and Store Option Values */
8
-	if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) == 'valid_api_key' ) {
9
-		$api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the MailChimp API" , "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
8
+	if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'valid_api_key' ) {
9
+		$api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the MailChimp API", "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected", 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
10 10
 		$api_error_response = '';
11 11
 	} else {
12
-		$api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span>  ' . __( "Not Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
-		if( get_option( 'yikes-mc-api-invalid-key-response' , '' ) != '' ) {
14
-			$api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response' , '' ) . '</small></p>';
12
+		$api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span>  ' . __( "Not Connected", 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
+		if ( get_option( 'yikes-mc-api-invalid-key-response', '' ) != '' ) {
14
+			$api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response', '' ) . '</small></p>';
15 15
 		} else {
16 16
 			$api_error_response = '';
17 17
 		}
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
 	<div class="wrap">
26 26
 
27 27
 		<!-- Freddie Logo -->
28
-		<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - MailChimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
28
+		<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - MailChimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
29 29
 
30
-		<h1>YIKES Easy Forms for MailChimp | <?php if ( isset( $_REQUEST['section'] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST['section'] ) ); } else { echo __( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
30
+		<h1>YIKES Easy Forms for MailChimp | <?php if ( isset( $_REQUEST[ 'section' ] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST[ 'section' ] ) ); } else { echo __( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
31 31
 
32 32
 		<!-- Settings Page Description -->
33
-		<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Easy Forms for MailChimp allows you to painlessly add MailChimp sign up forms to your WordPress site and track user activity with interactive reports.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
33
+		<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Easy Forms for MailChimp allows you to painlessly add MailChimp sign up forms to your WordPress site and track user activity with interactive reports.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
34 34
 		<?php
35 35
 			/* Success Messages on Options Updated */
36
-			if( isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ) {
36
+			if ( isset( $_REQUEST[ 'settings-updated' ] ) && $_REQUEST[ 'settings-updated' ] == 'true' ) {
37 37
 				?>
38 38
 				<div class="updated manage-form-admin-notice">
39 39
 					<p><?php _e( 'Settings successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 				<?php
42 42
 			}
43 43
 			/* MailChimp API Cleared Successfully message */
44
-			if( isset( $_REQUEST['transient-cleared'] ) && $_REQUEST['transient-cleared'] == 'true' ) {
44
+			if ( isset( $_REQUEST[ 'transient-cleared' ] ) && $_REQUEST[ 'transient-cleared' ] == 'true' ) {
45 45
 				?>
46 46
 				<div class="updated manage-form-admin-notice">
47 47
 					<p><?php _e( 'MailChimp API Cache successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 			}
51 51
 			/* Error Log Clear Messages */
52 52
 				/* Success Messages on Options Updated */
53
-				if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'true' ) {
53
+				if ( isset( $_REQUEST[ 'error-log-cleared' ] ) && $_REQUEST[ 'error-log-cleared' ] == 'true' ) {
54 54
 					?>
55 55
 					<div class="updated manage-form-admin-notice">
56 56
 						<p><?php _e( 'Error log successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 					<?php
59 59
 				}
60 60
 				/* MailChimp API Cleared Successfully message */
61
-				if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'false' ) {
61
+				if ( isset( $_REQUEST[ 'error-log-cleared' ] ) && $_REQUEST[ 'error-log-cleared' ] == 'false' ) {
62 62
 					?>
63 63
 					<div class="error manage-form-admin-notice">
64 64
 						<p><?php _e( "Whoops! We've encountered an error while trying to clear the error log. Please refresh the page and try again. If the error persists please get in touch with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -67,28 +67,28 @@  discard block
 block discarded – undo
67 67
 				}
68 68
 
69 69
 				/* Display a success message if our error log was sucessfully created, or display an error if not */
70
-				if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'true' ) {
70
+				if ( isset( $_GET[ 'error_log_created' ] ) && $_GET[ 'error_log_created' ] == 'true' ) {
71 71
 					?>
72 72
 					<div class="updated">
73 73
 						<p><?php _e( 'Error log successfully created. You may now start logging errors.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
74 74
 					</div>
75 75
 					<?php
76
-				} else if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'false' ) {
76
+				} else if ( isset( $_GET[ 'error_log_created' ] ) && $_GET[ 'error_log_created' ] == 'false' ) {
77 77
 					?>
78 78
 					<div class="error">
79
-						<p><?php _e( urldecode( $_GET['error_message'] ) , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
79
+						<p><?php _e( urldecode( $_GET[ 'error_message' ] ), 'yikes-inc-easy-mailchimp-extender' ); ?></p>
80 80
 					</div>
81 81
 					<?php
82 82
 				}
83 83
 
84 84
 				/* Display a success message if the user successfully imported some forms */
85
-				if( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-forms'] ) && $_GET['import-forms'] == 'true' ) {
85
+				if ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'import-export-forms' && isset( $_GET[ 'import-forms' ] ) && $_GET[ 'import-forms' ] == 'true' ) {
86 86
 					?>
87 87
 					<div class="updated">
88 88
 						<p><?php printf( __( 'Opt-in forms successfully imported. <a href="%s" title="View Forms">View Forms</a>', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
89 89
 					</div>
90 90
 					<?php
91
-				} elseif( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-settings'] ) && $_GET['import-settings'] == 'true' ) {
91
+				} elseif ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'import-export-forms' && isset( $_GET[ 'import-settings' ] ) && $_GET[ 'import-settings' ] == 'true' ) {
92 92
 					?>
93 93
 					<div class="updated">
94 94
 						<p><?php printf( __( 'YIKES Easy Forms for MailChimp settings successfully imported.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
 
110 110
 						<div class="postbox yikes-easy-mc-postbox">
111 111
 
112
-							<?php if( !isset( $_REQUEST['section'] ) || $_REQUEST['section'] == '' ) {
112
+							<?php if ( ! isset( $_REQUEST[ 'section' ] ) || $_REQUEST[ 'section' ] == '' ) {
113 113
 								include YIKES_MC_PATH . 'admin/partials/menu/options-sections/general-settings.php';
114 114
 							} else {
115
-								if( isset( $_REQUEST['addon'] ) && $_REQUEST['addon'] == 'true' ) {
116
-									include apply_filters( 'yikes-mailchimp-'.$_REQUEST['section'].'-options-path' , '' );
115
+								if ( isset( $_REQUEST[ 'addon' ] ) && $_REQUEST[ 'addon' ] == 'true' ) {
116
+									include apply_filters( 'yikes-mailchimp-' . $_REQUEST[ 'section' ] . '-options-path', '' );
117 117
 								} else {
118 118
 									// White list a set of files that are allowed to be included here
119 119
 									$file_base = 'admin/partials/menu/options-sections/';
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 										$file_base . 'recaptcha-settings.php',
127 127
 									);
128 128
 									// Ensure the included file is allowed and whitelisted above, before including it
129
-									if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php', $acceptable_files ) ) {
130
-										include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php';
129
+									if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST[ 'section' ] . '.php', $acceptable_files ) ) {
130
+										include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST[ 'section' ] . '.php';
131 131
 									} else {
132 132
 										wp_die( esc_attr_e( 'Invalid file. If this error persists, please contact support.', 'yikes-inc-easy-mailchimp' ) );
133 133
 									}
Please login to merge, or discard this patch.
admin/partials/helpers/knowledge-base-article-links.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 	printf( '<h2>' . esc_attr__( 'Popular Knowledge Base Articles', 'yikes-inc-easy-mailchimp-extender' ) . '</h2>' );
31 31
 	printf( '<ol>' );
32 32
 	foreach ( $knowledge_base_links as $kb_link ) {
33
-		echo wp_kses_post( '<li><a href="' . esc_url( $kb_link['href'] ) . '" title="' . esc_attr( $kb_link['title'] ) . '" target="_blank">' . esc_attr( $kb_link['title'] ) . '</a></li>' );
33
+		echo wp_kses_post( '<li><a href="' . esc_url( $kb_link[ 'href' ] ) . '" title="' . esc_attr( $kb_link[ 'title' ] ) . '" target="_blank">' . esc_attr( $kb_link[ 'title' ] ) . '</a></li>' );
34 34
 	}
35 35
 	printf( '</ol>' );
36 36
 }
Please login to merge, or discard this patch.
public/partials/shortcodes/process/process_form_submission_ajax.php 1 patch
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -5,34 +5,34 @@  discard block
 block discarded – undo
5 5
 */
6 6
 
7 7
 // parse our form data
8
-parse_str( $_POST['form_data'], $data );
8
+parse_str( $_POST[ 'form_data' ], $data );
9 9
 // store the form ID to use in our hooks and filters
10
-$form = $_POST['form_id'];
10
+$form = $_POST[ 'form_id' ];
11 11
 
12 12
 // Retreive the form data from the database instead of posting it with the form-submission
13 13
 global $wpdb;
14 14
 // return it as an array, so we can work with it to build our form below
15 15
 $form_results = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'yikes_easy_mc_forms WHERE id = ' . $form . '', ARRAY_A );
16 16
 
17
-if( $form_results ) {
18
-	$form_data = $form_results[0];
17
+if ( $form_results ) {
18
+	$form_data = $form_results[ 0 ];
19 19
 	// List ID
20
-	$list_id = $form_data['list_id'];
20
+	$list_id = $form_data[ 'list_id' ];
21 21
 	// decode our submission settings
22
-	$submission_settings = json_decode( stripslashes( $form_data['submission_settings'] ), true );
22
+	$submission_settings = json_decode( stripslashes( $form_data[ 'submission_settings' ] ), true );
23 23
 	// decode our optin settings
24
-	$optin_settings = json_decode( stripslashes( $form_data['optin_settings'] ), true );
24
+	$optin_settings = json_decode( stripslashes( $form_data[ 'optin_settings' ] ), true );
25 25
 	// decode our fields
26
-	$form_fields = json_decode( stripslashes( $form_data['fields'] ), true );
26
+	$form_fields = json_decode( stripslashes( $form_data[ 'fields' ] ), true );
27 27
 	/*	Decode our error messages
28 28
 	*	Workaround for international characters (cyrillic etc)
29 29
 	* 	See: https://wordpress.org/support/topic/custom-messages-do-not-support-cyrillic-characters?replies=11#post-7629620
30 30
 	*/
31
-	$error_messages = ( get_magic_quotes_gpc() ) ? json_decode( stripslashes( $form_data['error_messages'] ), true ) : json_decode( $form_data['error_messages'], true );
31
+	$error_messages = ( get_magic_quotes_gpc() ) ? json_decode( stripslashes( $form_data[ 'error_messages' ] ), true ) : json_decode( $form_data[ 'error_messages' ], true );
32 32
 	/** Submit Process **/
33
-	$notifications = json_decode( stripslashes( $form_data['custom_notifications'] ), true );
33
+	$notifications = json_decode( stripslashes( $form_data[ 'custom_notifications' ] ), true );
34 34
 	/* Page Data */
35
-	$page_data = $_POST['page_data'];
35
+	$page_data = $_POST[ 'page_data' ];
36 36
 }
37 37
 
38 38
 // Empty array to build up merge variables
@@ -42,39 +42,39 @@  discard block
 block discarded – undo
42 42
 $error = 0;
43 43
 
44 44
 /* Check for Honeypot filled */
45
-$honey_pot_filled = ( isset( $data['yikes-mailchimp-honeypot'] ) && $data['yikes-mailchimp-honeypot'] != '' ) ? true : false;
45
+$honey_pot_filled = ( isset( $data[ 'yikes-mailchimp-honeypot' ] ) && $data[ 'yikes-mailchimp-honeypot' ] != '' ) ? true : false;
46 46
 // if it was filled out, return an error...
47
-if( $honey_pot_filled ) {
47
+if ( $honey_pot_filled ) {
48 48
 	wp_send_json_error( array(
49 49
 		'hide' => '0',
50 50
 		'error' => 1,
51
-		'response' => __( "Error: It looks like the honeypot was filled out and the form was not properly be submitted." , 'yikes-inc-easy-mailchimp-extender' )
51
+		'response' => __( "Error: It looks like the honeypot was filled out and the form was not properly be submitted.", 'yikes-inc-easy-mailchimp-extender' )
52 52
 	) );
53 53
 	return;
54 54
 }
55 55
 
56 56
 // Check reCAPTCHA Response was submitted with the form data
57
-if( isset( $data['g-recaptcha-response'] ) ) {
58
-	$url = esc_url_raw( 'https://www.google.com/recaptcha/api/siteverify?secret=' . get_option( 'yikes-mc-recaptcha-secret-key' , '' ) . '&response=' . $data['g-recaptcha-response'] . '&remoteip=' . $_SERVER["REMOTE_ADDR"] );
57
+if ( isset( $data[ 'g-recaptcha-response' ] ) ) {
58
+	$url = esc_url_raw( 'https://www.google.com/recaptcha/api/siteverify?secret=' . get_option( 'yikes-mc-recaptcha-secret-key', '' ) . '&response=' . $data[ 'g-recaptcha-response' ] . '&remoteip=' . $_SERVER[ "REMOTE_ADDR" ] );
59 59
 	$response = wp_remote_get( $url );
60
-	$response_body = json_decode( $response['body'] , true );
60
+	$response_body = json_decode( $response[ 'body' ], true );
61 61
 	// if we've hit an error, lets return the error!
62
-	if( $response_body['success'] != 1 ) {
62
+	if ( $response_body[ 'success' ] != 1 ) {
63 63
 		$error_messages = array(); // empty array to store error messages
64
-		if( isset( $response_body['error-codes'] ) ) {
65
-			foreach( $response_body['error-codes'] as $error_code ) {
66
-				if( $error_code == 'missing-input-response' ) {
64
+		if ( isset( $response_body[ 'error-codes' ] ) ) {
65
+			foreach ( $response_body[ 'error-codes' ] as $error_code ) {
66
+				if ( $error_code == 'missing-input-response' ) {
67 67
 					$error_code = __( 'Please check the reCAPTCHA field.', 'yikes-inc-easy-mailchimp-extender' );
68 68
 				}
69
-				$error_messages[] = __( 'Error', 'yikes-inc-easy-mailchimp-extender' ) . ': ' . $error_code;
69
+				$error_messages[ ] = __( 'Error', 'yikes-inc-easy-mailchimp-extender' ) . ': ' . $error_code;
70 70
 			}
71 71
 		} else {
72
-			$error_messages[] = __( 'Please refresh the page and try again.', 'yikes-inc-easy-mailchimp-extender' );
72
+			$error_messages[ ] = __( 'Please refresh the page and try again.', 'yikes-inc-easy-mailchimp-extender' );
73 73
 		}
74 74
 		$error = 1;
75 75
 		wp_send_json_error( array(
76 76
 			'hide' => '0',
77
-			'error' => $error ,
77
+			'error' => $error,
78 78
 			'response' => apply_filters( 'yikes-mailchimp-recaptcha-required-error', implode( ' ', $error_messages ) ),
79 79
 		) );
80 80
 		exit();
@@ -83,12 +83,12 @@  discard block
 block discarded – undo
83 83
 
84 84
 // loop to push variables to our array
85 85
 foreach ( $data as $merge_tag => $value ) {
86
-	if( $merge_tag != 'yikes_easy_mc_new_subscriber' && $merge_tag != '_wp_http_referer' ) {
86
+	if ( $merge_tag != 'yikes_easy_mc_new_subscriber' && $merge_tag != '_wp_http_referer' ) {
87 87
 		// check if the current iteration has a 'date_format' key set
88 88
 		// (aka - date/birthday fields)
89
-		if( isset( $form_fields[$merge_tag]['date_format'] ) ) {
89
+		if ( isset( $form_fields[ $merge_tag ][ 'date_format' ] ) ) {
90 90
 			// check if EU date format
91
-			if( $form_fields[$merge_tag]['date_format'] == 'DD/MM/YYYY' ) {
91
+			if ( $form_fields[ $merge_tag ][ 'date_format' ] == 'DD/MM/YYYY' ) {
92 92
 				// convert '/' to '.' and to UNIX timestamp
93 93
 				$value = date( 'Y-m-d', strtotime( str_replace( '/', '.', $value ) ) );
94 94
 			} else {
@@ -96,22 +96,22 @@  discard block
 block discarded – undo
96 96
 				$value = date( 'Y-m-d', strtotime( $value ) );
97 97
 			}
98 98
 		}
99
-		if( is_numeric( $merge_tag ) ) { // this is is an interest group!
100
-			$merge_variables['groupings'][] = array( 'id' => $merge_tag , 'groups' => ( is_array( $value ) ) ? $value : array( $value ) );
99
+		if ( is_numeric( $merge_tag ) ) { // this is is an interest group!
100
+			$merge_variables[ 'groupings' ][ ] = array( 'id' => $merge_tag, 'groups' => ( is_array( $value ) ) ? $value : array( $value ) );
101 101
 		} else { // or else it's just a standard merge variable
102
-			$merge_variables[$merge_tag] = $value;
102
+			$merge_variables[ $merge_tag ] = $value;
103 103
 		}
104 104
 	}
105 105
 }
106 106
 // store the opt-in time
107
-$merge_variables['optin_time'] = current_time( 'Y-m-d H:i:s', 1 );
107
+$merge_variables[ 'optin_time' ] = current_time( 'Y-m-d H:i:s', 1 );
108 108
 
109 109
 // Submit our form data
110
-$api_key = trim( get_option( 'yikes-mc-api-key' , '' ) );
110
+$api_key = trim( get_option( 'yikes-mc-api-key', '' ) );
111 111
 $dash_position = strpos( $api_key, '-' );
112 112
 
113 113
 // setup the end point
114
-if( $dash_position !== false ) {
114
+if ( $dash_position !== false ) {
115 115
 	$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/subscribe.json';
116 116
 }
117 117
 
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
 *	Allow users to check for submit value
138 138
 *	and pass back an error to the user
139 139
 */
140
-if( isset( $merge_variables['error'] ) ) {
140
+if ( isset( $merge_variables[ 'error' ] ) ) {
141 141
 	// send our error response back
142
-	wp_send_json_error( array( 'hide' => '0', 'error' => $merge_variables['error']  , 'response' => $merge_variables['message']  ) );
142
+	wp_send_json_error( array( 'hide' => '0', 'error' => $merge_variables[ 'error' ], 'response' => $merge_variables[ 'message' ] ) );
143 143
 	return;
144 144
 }
145 145
 
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
  * Setup whether or not we should update the user, or display the error with email generation
148 148
  * @since 6.1
149 149
  */
150
-if ( isset( $optin_settings['update_existing_user'] ) && 1 === absint( $optin_settings['update_existing_user'] ) ) {
150
+if ( isset( $optin_settings[ 'update_existing_user' ] ) && 1 === absint( $optin_settings[ 'update_existing_user' ] ) ) {
151 151
 	// Should we send the update email
152
-	if ( isset( $optin_settings['send_update_email'] ) && 1 === absint( $optin_settings['send_update_email'] ) ) {
152
+	if ( isset( $optin_settings[ 'send_update_email' ] ) && 1 === absint( $optin_settings[ 'send_update_email' ] ) ) {
153 153
 		$update_existing_user = 0;
154 154
 	} else {
155 155
 		$update_existing_user = 1;
@@ -164,73 +164,73 @@  discard block
 block discarded – undo
164 164
 		'body' => apply_filters( 'yikes-mailchimp-user-subscribe-api-request', array(
165 165
 			'apikey' => $api_key,
166 166
 			'id' => $list_id,
167
-			'email' => array( 'email' => sanitize_email( $data['EMAIL'] ) ),
167
+			'email' => array( 'email' => sanitize_email( $data[ 'EMAIL' ] ) ),
168 168
 			'merge_vars' => $merge_variables,
169
-			'double_optin' => $optin_settings['optin'],
169
+			'double_optin' => $optin_settings[ 'optin' ],
170 170
 			'update_existing' => $update_existing_user, // Decide if we should update the user or not
171
-			'send_welcome' => $optin_settings['send_welcome_email'],
172
-			'replace_interests' => ( isset( $submission_settings['replace_interests'] ) ) ? $submission_settings['replace_interests'] : 1, // defaults to replace
173
-		), $form, $list_id, $data['EMAIL'] ),
171
+			'send_welcome' => $optin_settings[ 'send_welcome_email' ],
172
+			'replace_interests' => ( isset( $submission_settings[ 'replace_interests' ] ) ) ? $submission_settings[ 'replace_interests' ] : 1, // defaults to replace
173
+		), $form, $list_id, $data[ 'EMAIL' ] ),
174 174
 		'timeout' => 10,
175 175
 		'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
176 176
 	) );
177 177
 
178 178
 	$subscribe_response = json_decode( wp_remote_retrieve_body( $subscribe_response ), true );
179 179
 
180
-	if( isset( $subscribe_response['error'] ) ) {
180
+	if ( isset( $subscribe_response[ 'error' ] ) ) {
181 181
 
182
-		if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
182
+		if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
183 183
 			require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
184 184
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
185
-			$error_logging->yikes_easy_mailchimp_write_to_error_log( $subscribe_response['error'], __( "Subscribe New User" , 'yikes-inc-easy-mailchimp-extender' ), "process_form_submission_ajax.php" );
185
+			$error_logging->yikes_easy_mailchimp_write_to_error_log( $subscribe_response[ 'error' ], __( "Subscribe New User", 'yikes-inc-easy-mailchimp-extender' ), "process_form_submission_ajax.php" );
186 186
 		}
187 187
 
188 188
 		$update_account_details_link = '';
189 189
 		$error = 1;
190
-		switch( $subscribe_response['code'] ) {
190
+		switch ( $subscribe_response[ 'code' ] ) {
191 191
 			// user already subscribed
192 192
 			case '214':
193
-				$custom_already_subscribed_text = apply_filters( 'yikes-easy-mailchimp-update-existing-subscriber-text', sprintf( __( ' To update your MailChimp profile, please %s.', 'yikes-inc-easy-mailchimp-extender' ), '<a class="send-update-email" data-list-id="' . $list_id . '" data-user-email="' . sanitize_email( $data['EMAIL'] ) . '" href="#">' . __( 'click to send yourself an update link', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' ), $form, '<a class="send-update-email" data-list-id="' . $_POST['yikes-mailchimp-associated-list-id'] . '" data-user-email="' . sanitize_email( $data['EMAIL'] ) . '" href="#">' . __( 'click to send yourself an update link', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' );
194
-				$update_account_details_link = ( 1 === absint( $optin_settings['update_existing_user'] ) && 1 === absint( $optin_settings['send_update_email'] ) ) ? $custom_already_subscribed_text : false;
195
-				if( ! empty( $error_messages['already-subscribed'] ) ) {
196
-					$error_response = apply_filters( 'yikes-easy-mailchimp-user-already-subscribed-text', $error_messages['already-subscribed'] , $form, $data['EMAIL'] ) . ' ' . $update_account_details_link;
193
+				$custom_already_subscribed_text = apply_filters( 'yikes-easy-mailchimp-update-existing-subscriber-text', sprintf( __( ' To update your MailChimp profile, please %s.', 'yikes-inc-easy-mailchimp-extender' ), '<a class="send-update-email" data-list-id="' . $list_id . '" data-user-email="' . sanitize_email( $data[ 'EMAIL' ] ) . '" href="#">' . __( 'click to send yourself an update link', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' ), $form, '<a class="send-update-email" data-list-id="' . $_POST[ 'yikes-mailchimp-associated-list-id' ] . '" data-user-email="' . sanitize_email( $data[ 'EMAIL' ] ) . '" href="#">' . __( 'click to send yourself an update link', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' );
194
+				$update_account_details_link = ( 1 === absint( $optin_settings[ 'update_existing_user' ] ) && 1 === absint( $optin_settings[ 'send_update_email' ] ) ) ? $custom_already_subscribed_text : false;
195
+				if ( ! empty( $error_messages[ 'already-subscribed' ] ) ) {
196
+					$error_response = apply_filters( 'yikes-easy-mailchimp-user-already-subscribed-text', $error_messages[ 'already-subscribed' ], $form, $data[ 'EMAIL' ] ) . ' ' . $update_account_details_link;
197 197
 				} else {
198
-					$error_response = $subscribe_response['error'] . ' ' . $update_account_details_link;
198
+					$error_response = $subscribe_response[ 'error' ] . ' ' . $update_account_details_link;
199 199
 				}
200 200
 				break;
201 201
 			// missing a required field
202 202
 			case '250':
203 203
 					// get all merge variables in array, loop and str_replace error code with field name
204
-					$api_key = trim( get_option( 'yikes-mc-api-key' , '' ) );
204
+					$api_key = trim( get_option( 'yikes-mc-api-key', '' ) );
205 205
 					$dash_position = strpos( $api_key, '-' );
206
-					if( $dash_position !== false ) {
206
+					if ( $dash_position !== false ) {
207 207
 						$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/merge-vars.json';
208 208
 					}
209 209
 					$merge_variables = wp_remote_post( $api_endpoint, array(
210 210
 						'body' => array(
211 211
 							'apikey' => $api_key,
212
-							'id' => array( $list_id ) ,
212
+							'id' => array( $list_id ),
213 213
 						),
214 214
 						'timeout' => 10,
215 215
 						'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true ),
216 216
 					) );
217 217
 					$merge_variables = json_decode( wp_remote_retrieve_body( $merge_variables ), true );
218
-					if( is_wp_error( $merge_variables ) || isset( $merge_variables['error'] ) ) {
219
-						if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
218
+					if ( is_wp_error( $merge_variables ) || isset( $merge_variables[ 'error' ] ) ) {
219
+						if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
220 220
 							require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
221 221
 							$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
222
-							$error_logging->yikes_easy_mailchimp_write_to_error_log( $merge_variables['error'], __( "Get Merge Variables" , 'yikes-inc-easy-mailchimp-extender' ), "process_form_submission_ajax.php" );
222
+							$error_logging->yikes_easy_mailchimp_write_to_error_log( $merge_variables[ 'error' ], __( "Get Merge Variables", 'yikes-inc-easy-mailchimp-extender' ), "process_form_submission_ajax.php" );
223 223
 						}
224 224
 					}
225 225
 					// re-store our data
226
-					$merge_variables = $merge_variables['data'][0]['merge_vars'];
226
+					$merge_variables = $merge_variables[ 'data' ][ 0 ][ 'merge_vars' ];
227 227
 					$merge_variable_name_array = array();
228
-					foreach( $merge_variables as $merge_var ) {
229
-						$merge_variables_name_array[$merge_var['tag']] = $merge_var['name'];
228
+					foreach ( $merge_variables as $merge_var ) {
229
+						$merge_variables_name_array[ $merge_var[ 'tag' ] ] = $merge_var[ 'name' ];
230 230
 					}
231
-					$error_message = $subscribe_response['error'];
231
+					$error_message = $subscribe_response[ 'error' ];
232 232
 					// replace tag with name in the error message.
233
-					foreach( $merge_variables_name_array as $tag => $name ) {
233
+					foreach ( $merge_variables_name_array as $tag => $name ) {
234 234
 						$error_message = str_replace( $tag, $name, $error_message );
235 235
 					}
236 236
 					$error_response = $error_message;
@@ -238,14 +238,14 @@  discard block
 block discarded – undo
238 238
 			// [email protected] is not allowed
239 239
 			case '-99':
240 240
 				// generic error
241
-				$error_response = str_replace( ' and cannot be imported', '', str_replace( 'List_RoleEmailMember:', '', $subscribe_response['error'] ) );
241
+				$error_response = str_replace( ' and cannot be imported', '', str_replace( 'List_RoleEmailMember:', '', $subscribe_response[ 'error' ] ) );
242 242
 				break;
243 243
 			// invalid email (or no email at all)
244 244
 				case '-100':
245
-					$error_response = ( ! empty( $error_messages['invalid-email'] ) ) ? $error_messages['invalid-email'] : __( 'Please provide a valid email address.', 'yikes-inc-easy-mailchimp-extender' );
245
+					$error_response = ( ! empty( $error_messages[ 'invalid-email' ] ) ) ? $error_messages[ 'invalid-email' ] : __( 'Please provide a valid email address.', 'yikes-inc-easy-mailchimp-extender' );
246 246
 					break;
247 247
 			default:
248
-				$error_response = ( ! empty( $error_messages['general-error'] ) ) ? $error_messages['general-error'] : $subscribe_response['error'];
248
+				$error_response = ( ! empty( $error_messages[ 'general-error' ] ) ) ? $error_messages[ 'general-error' ] : $subscribe_response[ 'error' ];
249 249
 				break;
250 250
 		}
251 251
 		// send the response
@@ -263,9 +263,9 @@  discard block
 block discarded – undo
263 263
 	/*
264 264
 	*	Successful form submission redirect
265 265
 	*/
266
-	if( $submission_settings['redirect_on_submission'] == '1' ) {
266
+	if ( $submission_settings[ 'redirect_on_submission' ] == '1' ) {
267 267
 		$redirection = '1';
268
-		$redirect_url = ( 'custom_url' != $submission_settings['redirect_page'] ) ? get_permalink( $submission_settings['redirect_page'] ) : $submission_settings['custom_redirect_url'];
268
+		$redirect_url = ( 'custom_url' != $submission_settings[ 'redirect_page' ] ) ? get_permalink( $submission_settings[ 'redirect_page' ] ) : $submission_settings[ 'custom_redirect_url' ];
269 269
 		$redirect = '<script type="text/javascript">setTimeout(function() { window.location="' . apply_filters( 'yikes-mailchimp-redirect-url', esc_url( $redirect_url ), $form, $page_data ) . '"; }, ' . apply_filters( 'yikes-mailchimp-redirect-timer', 1500 ) . ');</script>';
270 270
 	}
271 271
 
@@ -281,16 +281,16 @@  discard block
 block discarded – undo
281 281
 	do_action( 'yikes-mailchimp-after-submission-' . $form, $merge_variables );
282 282
 
283 283
 	// send our notifications if setup (must go before wp_send_json())
284
-	do_action( 'yikes-mailchimp-form-submission' , sanitize_email( $data['EMAIL'] ), $merge_variables , $form , $notifications );
285
-	do_action( 'yikes-mailchimp-form-submission-' . $form, sanitize_email( $data['EMAIL'] ), $merge_variables , $form , $notifications );
284
+	do_action( 'yikes-mailchimp-form-submission', sanitize_email( $data[ 'EMAIL' ] ), $merge_variables, $form, $notifications );
285
+	do_action( 'yikes-mailchimp-form-submission-' . $form, sanitize_email( $data[ 'EMAIL' ] ), $merge_variables, $form, $notifications );
286 286
 
287
-	$default_success_response = ( 1 === $optin_settings['optin'] ) ? __( "Thank you for subscribing! Check your email for the confirmation message." , 'yikes-inc-easy-mailchimp-extender' ) : __( "Thank you for subscribing!" , 'yikes-inc-easy-mailchimp-extender' );
287
+	$default_success_response = ( 1 === $optin_settings[ 'optin' ] ) ? __( "Thank you for subscribing! Check your email for the confirmation message.", 'yikes-inc-easy-mailchimp-extender' ) : __( "Thank you for subscribing!", 'yikes-inc-easy-mailchimp-extender' );
288 288
 
289 289
 	wp_send_json_success(
290 290
 		array(
291
-			'hide' => $submission_settings['hide_form_post_signup'],
291
+			'hide' => $submission_settings[ 'hide_form_post_signup' ],
292 292
 			'error' => $error,
293
-			'response' => apply_filters( 'yikes-mailchimp-success-response', ( ! empty( $error_messages['success'] ) ? $error_messages['success'] : $default_success_response ), $form, $merge_variables ),
293
+			'response' => apply_filters( 'yikes-mailchimp-success-response', ( ! empty( $error_messages[ 'success' ] ) ? $error_messages[ 'success' ] : $default_success_response ), $form, $merge_variables ),
294 294
 			'redirection' => isset( $redirection ) ? '1' : '0',
295 295
 			'redirect' => isset( $redirect ) ? $redirect : '',
296 296
 		)
Please login to merge, or discard this patch.
admin/partials/edit-form.php 1 patch
Spacing   +210 added lines, -210 removed lines patch added patch discarded remove patch
@@ -2,45 +2,45 @@  discard block
 block discarded – undo
2 2
 	<?php
3 3
 
4 4
 		// if an error was returned in the most recent query
5
-		if( isset( $_GET['sql_error'] ) ) {
5
+		if ( isset( $_GET[ 'sql_error' ] ) ) {
6 6
 			// if error logging is turned on, lets display a better error to help narrow things down
7 7
 			// lets also log things to the error log
8
-			if( get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
9
-				wp_die( '<strong>' . __( 'Error Creating Form' , 'yikes-inc-easy-mailchimp-extender' ) . '</strong> <p>' . stripslashes( urldecode( $_GET['sql_error'] ) ) . '</p>' , __( 'Error Creating Form' , 'yikes-inc-easy-mailchimp-extender' ) );
8
+			if ( get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
9
+				wp_die( '<strong>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) . '</strong> <p>' . stripslashes( urldecode( $_GET[ 'sql_error' ] ) ) . '</p>', __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) );
10 10
 			} else {
11
-				wp_die( '<strong>' . __( 'Error Creating Form' , 'yikes-inc-easy-mailchimp-extender' ) . '</strong><p>' . __( "Please try again. If the error persists please get in contact with the YIKES Inc. support team." , 'yikes-inc-easy-mailchimp-extender' ) . '</p>' );
11
+				wp_die( '<strong>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) . '</strong><p>' . __( "Please try again. If the error persists please get in contact with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>' );
12 12
 			}
13 13
 		}
14 14
 
15 15
 		/* Get The Form ID we need to edit */
16
-		if( isset( $_GET['id'] ) ) {
16
+		if ( isset( $_GET[ 'id' ] ) ) {
17 17
 			global $wpdb;
18 18
 			// grab and store the form ID
19
-			$form_id = (int) $_GET['id'];
19
+			$form_id = (int) $_GET[ 'id' ];
20 20
 			// return it as an array, so we can work with it to build our form below
21 21
 			$form_results = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'yikes_easy_mc_forms WHERE id = ' . $form_id . '', ARRAY_A );
22 22
 			// Get all results for our form switcher
23 23
 			$all_forms = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'yikes_easy_mc_forms', ARRAY_A );
24 24
 
25 25
 			// if the form was not found return an error
26
-			if( !$form_results ) {
27
-				wp_die( printf( __( "Whoops! It looks like this form doesn't exist. If this error persists you may want to toggle on debugging on the <a href='%s'>%s</a> " , 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings' ) ), __( 'debug settings page' , 'yikes-inc-easy-mailchimp-extender' ) ), __( 'Error' , 'yikes-inc-easy-mailchimp-extender' ) );
26
+			if ( ! $form_results ) {
27
+				wp_die( printf( __( "Whoops! It looks like this form doesn't exist. If this error persists you may want to toggle on debugging on the <a href='%s'>%s</a> ", 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings' ) ), __( 'debug settings page', 'yikes-inc-easy-mailchimp-extender' ) ), __( 'Error', 'yikes-inc-easy-mailchimp-extender' ) );
28 28
 			}
29 29
 
30 30
 			// store our results
31
-			$form = $form_results[0];
31
+			$form = $form_results[ 0 ];
32 32
 			// set global form data, mainly for use in custom form field declarations
33
-			$GLOBALS["form_data"] = $form;
33
+			$GLOBALS[ "form_data" ] = $form;
34 34
 
35
-			$custom_styles = json_decode( $form['custom_styles'] , true );
36
-			$optin_settings = json_decode( $form['optin_settings'] , true );
37
-			$submission_settings = json_decode( $form['submission_settings'] , true );
38
-			$error_messages = json_decode( $form['error_messages'] , true );
39
-			$form_settings = ( isset( $form['form_settings'] ) ) ? json_decode( $form['form_settings'] , true ) : false;
40
-			$custom_notifications = json_decode( $form['custom_notifications'] , true );
35
+			$custom_styles = json_decode( $form[ 'custom_styles' ], true );
36
+			$optin_settings = json_decode( $form[ 'optin_settings' ], true );
37
+			$submission_settings = json_decode( $form[ 'submission_settings' ], true );
38
+			$error_messages = json_decode( $form[ 'error_messages' ], true );
39
+			$form_settings = ( isset( $form[ 'form_settings' ] ) ) ? json_decode( $form[ 'form_settings' ], true ) : false;
40
+			$custom_notifications = json_decode( $form[ 'custom_notifications' ], true );
41 41
 
42 42
 			// get defaults if none are saved in the database yet
43
-			if( ! isset( $form_settings ) || empty( $form_settings ) ) {
43
+			if ( ! isset( $form_settings ) || empty( $form_settings ) ) {
44 44
 				// setup defaults if none are saved
45 45
 				$form_settings = array(
46 46
 					'yikes-easy-mc-form-class-names' => '',
@@ -52,19 +52,19 @@  discard block
 block discarded – undo
52 52
 					'yikes-easy-mc-form-schedule' => '0',
53 53
 					'yikes-easy-mc-form-restriction-start' => strtotime( current_time( 'm/d/Y g:iA' ) ), // current date & time
54 54
 					'yikes-easy-mc-form-restriction-end' => strtotime( current_time( 'm/d/Y g:iA' ) ) + ( 3600 * 24 ), // current date & time + 1 day
55
-					'yikes-easy-mc-form-restriction-pending-message' => sprintf( __( 'Signup is not yet open, and will be available on %s. Please come back then to signup.', 'yikes-inc-easy-mailchimp-extender' ), current_time( str_replace( '-', '/', get_option( 'date_format' ) ) ) . ' ' . __( 'at', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . current_time( 'g:iA' ) ) ,
56
-					'yikes-easy-mc-form-restriction-expired-message' => sprintf( __( 'This signup for this form ended on %s.', 'yikes-inc-easy-mailchimp-extender' ), date( str_replace( '-', '/', get_option( 'date_format' ) ), strtotime( current_time( str_replace( '-', '/', get_option( 'date_format' ) ) ) ) + ( 3600 * 24 ) ) . ' ' . __( 'at', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . date( 'g:iA', strtotime( current_time( 'g:iA' ) ) + ( 3600 * 24 ) ) ) ,
55
+					'yikes-easy-mc-form-restriction-pending-message' => sprintf( __( 'Signup is not yet open, and will be available on %s. Please come back then to signup.', 'yikes-inc-easy-mailchimp-extender' ), current_time( str_replace( '-', '/', get_option( 'date_format' ) ) ) . ' ' . __( 'at', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . current_time( 'g:iA' ) ),
56
+					'yikes-easy-mc-form-restriction-expired-message' => sprintf( __( 'This signup for this form ended on %s.', 'yikes-inc-easy-mailchimp-extender' ), date( str_replace( '-', '/', get_option( 'date_format' ) ), strtotime( current_time( str_replace( '-', '/', get_option( 'date_format' ) ) ) ) + ( 3600 * 24 ) ) . ' ' . __( 'at', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . date( 'g:iA', strtotime( current_time( 'g:iA' ) ) + ( 3600 * 24 ) ) ),
57 57
 					'yikes-easy-mc-form-login-required' => '0',
58 58
 					'yikes-easy-mc-form-restriction-login-message' => __( 'You need to be logged in to sign up for this mailing list.', 'yikes-inc-easy-mailchimp-extender' ),
59 59
 				);
60 60
 			}
61 61
 
62
-			$api_key = trim( get_option( 'yikes-mc-api-key' , '' ) );
62
+			$api_key = trim( get_option( 'yikes-mc-api-key', '' ) );
63 63
 			$dash_position = strpos( $api_key, '-' );
64 64
 
65 65
 			// Check for a transient, if not - set one up for one hour
66 66
 			if ( false === ( $list_data = get_transient( 'yikes-easy-mailchimp-list-data' ) ) ) {
67
-				if( $dash_position !== false ) {
67
+				if ( $dash_position !== false ) {
68 68
 					$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/list.json';
69 69
 				}
70 70
 				$list_data = wp_remote_post( $api_endpoint, array(
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
 					'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
77 77
 				) );
78 78
 				$list_data = json_decode( wp_remote_retrieve_body( $list_data ), true );
79
-				if( isset( $list_data['error'] ) ) {
80
-					if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
79
+				if ( isset( $list_data[ 'error' ] ) ) {
80
+					if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
81 81
 						require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
82 82
 						$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
83
-						$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data['error'], __( "Get Account Lists" , 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
83
+						$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data[ 'error' ], __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
84 84
 					}
85 85
 				} else {
86 86
 					// set our transient
@@ -89,57 +89,57 @@  discard block
 block discarded – undo
89 89
 			}
90 90
 
91 91
 			// get the list data
92
-			if( $dash_position !== false ) {
92
+			if ( $dash_position !== false ) {
93 93
 				$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/merge-vars.json';
94 94
 			}
95 95
 			$available_merge_variables = wp_remote_post( $api_endpoint, array(
96 96
 				'body' => array(
97 97
 					'apikey' => $api_key,
98
-					'id' => array( $form['list_id'] ),
98
+					'id' => array( $form[ 'list_id' ] ),
99 99
 				),
100 100
 				'timeout' => 10,
101 101
 				'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
102 102
 			) );
103 103
 			$available_merge_variables = json_decode( wp_remote_retrieve_body( $available_merge_variables ), true );
104
-			if( isset( $available_merge_variables['error'] ) ) {
105
-				if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
104
+			if ( isset( $available_merge_variables[ 'error' ] ) ) {
105
+				if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
106 106
 					require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
107 107
 					$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
108
-					$error_logging->yikes_easy_mailchimp_write_to_error_log( $available_merge_variables['error'], __( "Get Merge Variables" , 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
108
+					$error_logging->yikes_easy_mailchimp_write_to_error_log( $available_merge_variables[ 'error' ], __( "Get Merge Variables", 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
109 109
 				}
110 110
 			}
111 111
 
112 112
 			// get the interest group data
113
-			if( $dash_position !== false ) {
113
+			if ( $dash_position !== false ) {
114 114
 				$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/interest-groupings.json';
115 115
 			}
116 116
 			$interest_groupings = wp_remote_post( $api_endpoint, array(
117 117
 				'body' => array(
118 118
 					'apikey' => $api_key,
119
-					'id' => $form['list_id']
119
+					'id' => $form[ 'list_id' ]
120 120
 				),
121 121
 				'timeout' => 10,
122 122
 				'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
123 123
 			) );
124 124
 			$interest_groupings = json_decode( wp_remote_retrieve_body( $interest_groupings ), true );
125
-			$no_interest_groupings = '<p class="description error-descripion">' . __( 'No Interest Groups Found' , 'yikes-inc-easy-mailchimp-extender' ) . '.</p>';
126
-			if( isset( $interest_groupings['error'] ) ) {
127
-				if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
125
+			$no_interest_groupings = '<p class="description error-descripion">' . __( 'No Interest Groups Found', 'yikes-inc-easy-mailchimp-extender' ) . '.</p>';
126
+			if ( isset( $interest_groupings[ 'error' ] ) ) {
127
+				if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
128 128
 					require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
129 129
 					$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
130
-					$error_logging->yikes_easy_mailchimp_write_to_error_log( $interest_groupings['error'], __( "Get Interest Groups" , 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
130
+					$error_logging->yikes_easy_mailchimp_write_to_error_log( $interest_groupings[ 'error' ], __( "Get Interest Groups", 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
131 131
 				}
132 132
 			}
133 133
 
134 134
 
135 135
 		} else {
136
-			wp_die( __( 'Oh No!' , 'yikes-inc-easy-mailchimp-extender' ) , __( 'Error' , 'yikes-inc-easy-mailchimp-extender' ) );
136
+			wp_die( __( 'Oh No!', 'yikes-inc-easy-mailchimp-extender' ), __( 'Error', 'yikes-inc-easy-mailchimp-extender' ) );
137 137
 		}
138 138
 
139 139
 		/* Confirm we've retreived our form data */
140
-		if( empty( $form ) ) {
140
+		if ( empty( $form ) ) {
141 141
 
142
-			wp_die( __( "We've encountered an error. Please try again. If the error persists, please contact support." , 'yikes-inc-easy-mailchimp-extender' ) , __( 'Error' , 'yikes-inc-easy-mailchimp-extender' ) );
142
+			wp_die( __( "We've encountered an error. Please try again. If the error persists, please contact support.", 'yikes-inc-easy-mailchimp-extender' ), __( 'Error', 'yikes-inc-easy-mailchimp-extender' ) );
143 143
 
144 144
 		} else {
145 145
 
@@ -149,22 +149,22 @@  discard block
 block discarded – undo
149 149
 				add_query_arg(
150 150
 					array(
151 151
 						'action' => 'yikes-easy-mc-update-form',
152
-						'nonce' => wp_create_nonce( 'update-mailchimp-form'.-$form['id'] )
152
+						'nonce' => wp_create_nonce( 'update-mailchimp-form' . -$form[ 'id' ] )
153 153
 					)
154 154
 				)
155 155
 			);
156 156
 			/* Display Our Form */
157 157
 			?>
158 158
 				<!-- Freddie Logo -->
159
-				<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - MailChimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
159
+				<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - MailChimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
160 160
 
161
-				<h1>YIKES Easy Forms for MailChimp | <?php echo __( 'Edit' , 'yikes-inc-easy-mailchimp-extender' ) . ' ' . $form['form_name']; ?></h1>
161
+				<h1>YIKES Easy Forms for MailChimp | <?php echo __( 'Edit', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . $form[ 'form_name' ]; ?></h1>
162 162
 
163 163
 				<!-- Settings Page Description -->
164
-				<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Update this MailChimp form\'s fields, styles and settings below.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
164
+				<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Update this MailChimp form\'s fields, styles and settings below.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
165 165
 
166 166
 				<?php
167
-				if( isset( $_REQUEST['updated-form'] ) && $_REQUEST['updated-form'] == 'true' ) {
167
+				if ( isset( $_REQUEST[ 'updated-form' ] ) && $_REQUEST[ 'updated-form' ] == 'true' ) {
168 168
 					?>
169 169
 					<div class="updated manage-form-admin-notice">
170 170
 						<p><?php _e( 'Opt-in form successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -188,15 +188,15 @@  discard block
 block discarded – undo
188 188
 									<div class="inside">
189 189
 
190 190
 										<label for="form-name">
191
-											<h3 class="bg-transparent"><?php _e( 'Form Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
192
-											<input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo stripslashes( esc_html( $form['form_name'] ) ); ?>" class="widefat" />
193
-											<p class="description"><?php _e( "The title of this signup form." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
191
+											<h3 class="bg-transparent"><?php _e( 'Form Name', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
192
+											<input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo stripslashes( esc_html( $form[ 'form_name' ] ) ); ?>" class="widefat" />
193
+											<p class="description"><?php _e( "The title of this signup form.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
194 194
 										</label>
195 195
 
196 196
 										<label for="form-description">
197
-											<h3 class="bg-transparent"><?php _e( 'Form Description' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
198
-											<textarea name="form-description" id="form-description" class="large-text edit-form-form-description"><?php echo isset( $form['form_description'] ) ? stripslashes( esc_textarea( $form['form_description'] ) ) : ''; ?></textarea>
199
-											<p class="description"><?php _e( "Descriptions are optional and you may choose to display it to visitors to your site." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
197
+											<h3 class="bg-transparent"><?php _e( 'Form Description', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
198
+											<textarea name="form-description" id="form-description" class="large-text edit-form-form-description"><?php echo isset( $form[ 'form_description' ] ) ? stripslashes( esc_textarea( $form[ 'form_description' ] ) ) : ''; ?></textarea>
199
+											<p class="description"><?php _e( "Descriptions are optional and you may choose to display it to visitors to your site.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
200 200
 											<p class="description"><?php printf( __( 'To display the number of subscribers for the list associated with this form, use %s in the form description field above.', 'yikes-inc-easy-mailchimp-extender' ), '<code>[yikes-mailchimp-subscriber-count]</code>' ); ?><p>
201 201
 										</label>
202 202
 
@@ -212,16 +212,16 @@  discard block
 block discarded – undo
212 212
 
213 213
 									<ul id="yikes_easy_mc_toolbar_links">
214 214
 										<li class="hidden_setting_list">
215
-											<a class="hidden_setting form-builder selected_hidden_setting" data-attr-container="form-builder" onclick="return false;" title="<?php esc_attr_e( 'Customize Form Fields' , 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Form Builder' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
215
+											<a class="hidden_setting form-builder selected_hidden_setting" data-attr-container="form-builder" onclick="return false;" title="<?php esc_attr_e( 'Customize Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
216 216
 											<div class="selected_setting_triangle"></div>
217 217
 										</li>
218 218
 										<li class="hidden_setting_list">
219
-											<a class="hidden_setting form-settings" onclick="return false;" data-attr-container="form-settings" title="<?php esc_attr_e( 'Form Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Form Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
219
+											<a class="hidden_setting form-settings" onclick="return false;" data-attr-container="form-settings" title="<?php esc_attr_e( 'Form Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Form Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
220 220
 										</li>
221 221
 										<li class="hidden_setting_list">
222
-											<a class="hidden_setting error-messages" onclick="return false;" data-attr-container="error-messages" title="<?php esc_attr_e( 'Customize Form Messages' , 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Custom Messages' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
222
+											<a class="hidden_setting error-messages" onclick="return false;" data-attr-container="error-messages" title="<?php esc_attr_e( 'Customize Form Messages', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="#"> <?php _e( 'Custom Messages', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
223 223
 										</li>
224
-										<?php do_action( 'yikes-mailchimp-edit-form-section-links' , $form ); ?>
224
+										<?php do_action( 'yikes-mailchimp-edit-form-section-links', $form ); ?>
225 225
 									</ul>
226 226
 
227 227
 								</div>
@@ -242,22 +242,22 @@  discard block
 block discarded – undo
242 242
 														<div class="meta-box-sortables ui-sortable">
243 243
 															<div class="postbox yikes-easy-mc-postbox">
244 244
 																<!-- container title -->
245
-																<h3 class="edit-form-title"><?php _e( 'Form Builder' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
246
-																<p id="edit-form-description" class="description"><?php _e( 'Select fields from the right to add to this form, you can click a field to reveal advanced options, or drag it to re-arrange its position in the form.' , 'yikes-inc-easy-mailchimp-extender' );?></p>
245
+																<h3 class="edit-form-title"><?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
246
+																<p id="edit-form-description" class="description"><?php _e( 'Select fields from the right to add to this form, you can click a field to reveal advanced options, or drag it to re-arrange its position in the form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
247 247
 																<div id="form-builder-container" class="inside">
248 248
 																	<!-- #poststuff -->
249
-																	<?php echo $this->generate_form_editor( json_decode( $form['fields'] , true ) , $form['list_id'] , $available_merge_variables , isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
249
+																	<?php echo $this->generate_form_editor( json_decode( $form[ 'fields' ], true ), $form[ 'list_id' ], $available_merge_variables, isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
250 250
 																</div>
251 251
 
252 252
 																<!-- Bulk Delete Form Fields -->
253
-																<a href="#" class="clear-form-fields" <?php if( isset( $form['fields'] ) && count( json_decode( $form['fields'] , true ) ) <= 0 ) { ?> style="display:none;" <?php } ?>><?php _e( 'Clear Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
253
+																<a href="#" class="clear-form-fields" <?php if ( isset( $form[ 'fields' ] ) && count( json_decode( $form[ 'fields' ], true ) ) <= 0 ) { ?> style="display:none;" <?php } ?>><?php _e( 'Clear Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
254 254
 
255 255
 																<?php
256
-																	$display_none = ( isset( $form['fields'] ) && count( json_decode( $form['fields'] , true ) ) <= 0 ) ? 'display:none;' : '';
256
+																	$display_none = ( isset( $form[ 'fields' ] ) && count( json_decode( $form[ 'fields' ], true ) ) <= 0 ) ? 'display:none;' : '';
257 257
 																?>
258 258
 
259 259
 																<!-- Save Fields Button -->
260
-																<?php echo submit_button( __( 'Update Form' ) , 'primary' , '' , false , array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;'.$display_none ) ); ?>
260
+																<?php echo submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;' . $display_none ) ); ?>
261 261
 
262 262
 																<!-- .inside -->
263 263
 															</div>
@@ -270,15 +270,15 @@  discard block
 block discarded – undo
270 270
 													<div id="postbox-container-1" class="postbox-container">
271 271
 														<div class="meta-box-sortables">
272 272
 															<div class="postbox yikes-easy-mc-postbox">
273
-																<h3 class="edit-form-title"><span><?php _e( "Form Fields &amp; Interest Groups" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
273
+																<h3 class="edit-form-title"><span><?php _e( "Form Fields &amp; Interest Groups", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
274 274
 																<div class="inside">
275 275
 
276 276
 																	<h3 class="nav-tab-wrapper mv_ig_list">
277
-																		<a href="#" class="nav-tab nav-tab-active" alt="merge-variables"><div class="arrow-down"></div><?php _e( 'Form Fields' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
278
-																		<?php if( !isset( $merge_variable_error ) ) { ?>
279
-																			<a href="#" class="nav-tab"><?php _e( 'Interest Groups' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
277
+																		<a href="#" class="nav-tab nav-tab-active" alt="merge-variables"><div class="arrow-down"></div><?php _e( 'Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
278
+																		<?php if ( ! isset( $merge_variable_error ) ) { ?>
279
+																			<a href="#" class="nav-tab"><?php _e( 'Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
280 280
 																		<?php } else { ?>
281
-																			<a href="#" class="nav-tab no-interest-groups-found-message" disabled="disabled" title="<?php _e( "No Interest Groups Exist" , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Interest Groups' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
281
+																			<a href="#" class="nav-tab no-interest-groups-found-message" disabled="disabled" title="<?php _e( "No Interest Groups Exist", 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
282 282
 																		<?php } ?>
283 283
 																	</h3>
284 284
 
@@ -286,11 +286,11 @@  discard block
 block discarded – undo
286 286
 
287 287
 																		<div id="merge-variables-container" class="list-container">
288 288
 																			<?php
289
-																				if( ! isset( $merge_variable_error ) ) {
289
+																				if ( ! isset( $merge_variable_error ) ) {
290 290
 																					// build a list of available merge variables,
291 291
 																					// but exclude the ones already assigned to the form
292
-																					echo '<p class="description">' . __( "Select a field below to add to the form builder." , 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
293
-																					$this->build_available_merge_vars( json_decode( $form['fields'] , true ) , $available_merge_variables );
292
+																					echo '<p class="description">' . __( "Select a field below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
293
+																					$this->build_available_merge_vars( json_decode( $form[ 'fields' ], true ), $available_merge_variables );
294 294
 																				} else {
295 295
 																					echo $merge_variable_error;
296 296
 																				}
@@ -299,14 +299,14 @@  discard block
 block discarded – undo
299 299
 
300 300
 																		<div id="interest-groups-container" class="list-container">
301 301
 																			<?php
302
-																				if( isset( $interest_groupings ) && ! isset( $interest_groupings['error'] ) ) {
302
+																				if ( isset( $interest_groupings ) && ! isset( $interest_groupings[ 'error' ] ) ) {
303 303
 																					// build a list of available merge variables,
304 304
 																					// but exclude the ones already assigned to the form
305
-																					echo '<p class="description">' . __( "Select an interest group below to add to the form builder." , 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
305
+																					echo '<p class="description">' . __( "Select an interest group below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
306 306
 																					// $this->build_available_merge_vars( json_decode( $form['fields'] , true ) , $available_merge_variables );
307
-																					$this->build_available_interest_groups( json_decode( $form['fields'] , true ) , $interest_groupings , $form['list_id'] );
307
+																					$this->build_available_interest_groups( json_decode( $form[ 'fields' ], true ), $interest_groupings, $form[ 'list_id' ] );
308 308
 																				} else {
309
-																					echo '<p class="description">' . $interest_groupings['error'] . '</p>';
309
+																					echo '<p class="description">' . $interest_groupings[ 'error' ] . '</p>';
310 310
 																				}
311 311
 																			?>
312 312
 																		</div>
@@ -339,19 +339,19 @@  discard block
 block discarded – undo
339 339
 													<div id="post-body-content">
340 340
 														<div class="meta-box-sortables ui-sortable">
341 341
 															<div class="postbox yikes-easy-mc-postbox">
342
-																<h3 class="edit-form-title"><span><?php _e( "Additional Form Settings" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
342
+																<h3 class="edit-form-title"><span><?php _e( "Additional Form Settings", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
343 343
 
344 344
 																<div class="inside form-settings-container">
345 345
 
346
-																	<p class="edit-form-description"><?php _e( "Adjust some additional form settings below." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
346
+																	<p class="edit-form-description"><?php _e( "Adjust some additional form settings below.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
347 347
 
348 348
 																	<!-- begin form classes section -->
349 349
 																	<strong class="section-title first"><?php _e( 'Overall Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
350 350
 																	<section class="section-interior">
351 351
 
352 352
 																		<!-- form classes -->
353
-																		<label for="yikes-easy-mc-form-class-names"><strong><?php _e( 'Form Classes' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
354
-																			<input type="text" class="widefat" name="yikes-easy-mc-form-class-names" id="yikes-easy-mc-form-class-names" value="<?php echo $form_settings['yikes-easy-mc-form-class-names']; ?>" placeholder="<?php _e( 'Add additional classes to this opt-in form.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
353
+																		<label for="yikes-easy-mc-form-class-names"><strong><?php _e( 'Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
354
+																			<input type="text" class="widefat" name="yikes-easy-mc-form-class-names" id="yikes-easy-mc-form-class-names" value="<?php echo $form_settings[ 'yikes-easy-mc-form-class-names' ]; ?>" placeholder="<?php _e( 'Add additional classes to this opt-in form.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
355 355
 																			<p class="description"><?php printf( __( 'Add additional class names to the %s element.', 'yikes-inc-easy-mailchimp-extender' ), '<code>' . htmlentities( '<form>' ) . '</code>' ); ?></p>
356 356
 																		</label>
357 357
 
@@ -364,12 +364,12 @@  discard block
 block discarded – undo
364 364
 
365 365
 																		<!-- setup the checked state here -->
366 366
 																		<!-- inline form -->
367
-																		<strong><?php _e( 'Inline Form' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
367
+																		<strong><?php _e( 'Inline Form', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
368 368
 																		<label class="inline-form-label">
369
-																			<input type="radio" name="yikes-easy-mc-inline-form[]" value="1" <?php checked( $form_settings['yikes-easy-mc-inline-form'], '1' ); ?>/><?php _e( 'Enable', 'yikes-inc-easy-mailchimp-extender' ); ?>
369
+																			<input type="radio" name="yikes-easy-mc-inline-form[]" value="1" <?php checked( $form_settings[ 'yikes-easy-mc-inline-form' ], '1' ); ?>/><?php _e( 'Enable', 'yikes-inc-easy-mailchimp-extender' ); ?>
370 370
 																		</label>
371 371
 																		<label class="inline-form-label">
372
-																			<input type="radio" name="yikes-easy-mc-inline-form[]" value="0" <?php checked( $form_settings['yikes-easy-mc-inline-form'], '0' ); ?> /><?php _e( 'Disable', 'yikes-inc-easy-mailchimp-extender' ); ?>
372
+																			<input type="radio" name="yikes-easy-mc-inline-form[]" value="0" <?php checked( $form_settings[ 'yikes-easy-mc-inline-form' ], '0' ); ?> /><?php _e( 'Disable', 'yikes-inc-easy-mailchimp-extender' ); ?>
373 373
 																		</label>
374 374
 																		<p class="description"><?php _e( 'Programatically setup this form so that all fields are on the same line.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
375 375
 																		<p class="description"><?php printf( __( 'If you are having issues with your theme not displaying the inline form properly, please see the following %s.', 'yikes-inc-easy-mailchimp-extender' ), '<a href="https://yikesplugins.com/support/knowledge-base/my-form-fields-are-not-fully-inline-after-enabling-the-inline-form-option-how-come/" target="_blank">' . __( 'knowledge base article', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' ); ?></p>
@@ -382,30 +382,30 @@  discard block
 block discarded – undo
382 382
 																	<section class="section-interior">
383 383
 
384 384
 																		<!-- Submit button type -->
385
-																		<strong><?php _e( 'Submit Button Type' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
385
+																		<strong><?php _e( 'Submit Button Type', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
386 386
 																		<label class="inline-form-label">
387
-																			<input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="text" <?php checked( $form_settings['yikes-easy-mc-submit-button-type'], 'text' ); ?> /><?php _e( 'Text', 'yikes-inc-easy-mailchimp-extender' ); ?>
387
+																			<input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="text" <?php checked( $form_settings[ 'yikes-easy-mc-submit-button-type' ], 'text' ); ?> /><?php _e( 'Text', 'yikes-inc-easy-mailchimp-extender' ); ?>
388 388
 																		</label>
389 389
 																		<label class="inline-form-label">
390
-																			<input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="image" <?php checked( $form_settings['yikes-easy-mc-submit-button-type'], 'image' ); ?> /><?php _e( 'Image', 'yikes-inc-easy-mailchimp-extender' ); ?>
390
+																			<input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="image" <?php checked( $form_settings[ 'yikes-easy-mc-submit-button-type' ], 'image' ); ?> /><?php _e( 'Image', 'yikes-inc-easy-mailchimp-extender' ); ?>
391 391
 																		</label>
392 392
 																		<p class="description"><?php _e( 'Select the submit button type for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
393 393
 																		<!-- end submit button type -->
394 394
 
395 395
 																			<!-- Text submit button type -->
396
-																			<section class="submit-button-type-text nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'image' ) { echo ' hidden'; } ?>">
396
+																			<section class="submit-button-type-text nested-child<?php if ( $form_settings[ 'yikes-easy-mc-submit-button-type' ] == 'image' ) { echo ' hidden'; } ?>">
397 397
 																				<!-- submit button text -->
398
-																				<label for="yikes-easy-mc-submit-button-text"><strong><?php _e( 'Submit Button Text' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
399
-																					<input type="text" class="widefat" name="yikes-easy-mc-submit-button-text" id="yikes-easy-mc-submit-button-text" value="<?php echo $form_settings['yikes-easy-mc-submit-button-text']; ?>" placeholder="<?php _e( 'Submit', 'yikes-inc-easy-mailchimp-extender' ); ?>">
398
+																				<label for="yikes-easy-mc-submit-button-text"><strong><?php _e( 'Submit Button Text', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
399
+																					<input type="text" class="widefat" name="yikes-easy-mc-submit-button-text" id="yikes-easy-mc-submit-button-text" value="<?php echo $form_settings[ 'yikes-easy-mc-submit-button-text' ]; ?>" placeholder="<?php _e( 'Submit', 'yikes-inc-easy-mailchimp-extender' ); ?>">
400 400
 																					<p class="description"><?php printf( __( 'Set the submit button text. Leaving this blank will default to %s.', 'yikes-inc-easy-mailchimp-extender' ), '"' . __( 'Submit', 'yikes-inc-easy-mailchimp-extender' ) . '"' ); ?></p>
401 401
 																				</label>
402 402
 																			</section>
403 403
 																			<!-- end text submit button type -->
404 404
 
405 405
 																			<!-- Image submit button type -->
406
-																			<section class="submit-button-type-image nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'text' ) { echo ' hidden'; } ?>">
407
-																				<label for="yikes-easy-mc-submit-button-image"><strong><?php _e( 'Submit Button URL' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
408
-																					<input type="text" class="widefat" name="yikes-easy-mc-submit-button-image" id="yikes-easy-mc-submit-button-image" value="<?php echo $form_settings['yikes-easy-mc-submit-button-image']; ?>" placeholder="<?php _e( 'http://', 'yikes-inc-easy-mailchimp-extender' ); ?>">
406
+																			<section class="submit-button-type-image nested-child<?php if ( $form_settings[ 'yikes-easy-mc-submit-button-type' ] == 'text' ) { echo ' hidden'; } ?>">
407
+																				<label for="yikes-easy-mc-submit-button-image"><strong><?php _e( 'Submit Button URL', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
408
+																					<input type="text" class="widefat" name="yikes-easy-mc-submit-button-image" id="yikes-easy-mc-submit-button-image" value="<?php echo $form_settings[ 'yikes-easy-mc-submit-button-image' ]; ?>" placeholder="<?php _e( 'http://', 'yikes-inc-easy-mailchimp-extender' ); ?>">
409 409
 																					<p class="description"><?php _e( 'Enter the URL of an image you would like to use as the submit button for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
410 410
 																				</label>
411 411
 																			</section>
@@ -413,8 +413,8 @@  discard block
 block discarded – undo
413 413
 
414 414
 
415 415
 																		<!-- submit button classes -->
416
-																		<label for="yikes-easy-mc-form-submit-button-classes"><strong style="float:left;"><?php _e( 'Submit Button Classes' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
417
-																			<input type="text" class="widefat" name="yikes-easy-mc-submit-button-classes" id="yikes-easy-mc-submit-button-classes" value="<?php echo $form_settings['yikes-easy-mc-submit-button-classes']; ?>" placeholder="<?php _e( 'Add additional classes to this submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
416
+																		<label for="yikes-easy-mc-form-submit-button-classes"><strong style="float:left;"><?php _e( 'Submit Button Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
417
+																			<input type="text" class="widefat" name="yikes-easy-mc-submit-button-classes" id="yikes-easy-mc-submit-button-classes" value="<?php echo $form_settings[ 'yikes-easy-mc-submit-button-classes' ]; ?>" placeholder="<?php _e( 'Add additional classes to this submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
418 418
 																			<p class="description"><?php _e( 'Add custom classes to the submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
419 419
 																		</label>
420 420
 																		<!-- end submit button classes -->
@@ -427,45 +427,45 @@  discard block
 block discarded – undo
427 427
 																	<section class="section-interior">
428 428
 																		<!-- Schedule form -->
429 429
 																		<label class="inline-form-label">
430
-																			<input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-schedule" value="1" <?php checked( $form_settings['yikes-easy-mc-form-schedule'], '1' ); ?>/><?php _e( 'Schedule Form', 'yikes-inc-easy-mailchimp-extender' ); ?>
430
+																			<input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-schedule" value="1" <?php checked( $form_settings[ 'yikes-easy-mc-form-schedule' ], '1' ); ?>/><?php _e( 'Schedule Form', 'yikes-inc-easy-mailchimp-extender' ); ?>
431 431
 																		</label>
432 432
 																		<p class="description" style="margin-bottom:0;"><?php _e( 'Set a time period that this form should be active on your site. (mm/dd/yyyy)', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
433 433
 																		<p class="description" style="margin: 0 0 .5em 0;"><?php _e( 'Once the end date & time have passed, users will no longer be able to signup for your mailing list.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
434 434
 																			<!-- Start Date Limitation Nested -->
435
-																			<section class="date-restirction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?>">
435
+																			<section class="date-restirction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-schedule' ] == '0' ) { echo ' hidden'; } ?>">
436 436
 																				<!-- Start Date -->
437
-																				<label for="yikes-easy-mc-form-restriction-start-date"><strong><?php _e( 'Start Date' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
438
-																					<input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-start-date" id="yikes-easy-mc-form-restriction-start-date" value="<?php echo date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings['yikes-easy-mc-form-restriction-start'] ); ?>" >
437
+																				<label for="yikes-easy-mc-form-restriction-start-date"><strong><?php _e( 'Start Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
438
+																					<input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-start-date" id="yikes-easy-mc-form-restriction-start-date" value="<?php echo date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings[ 'yikes-easy-mc-form-restriction-start' ] ); ?>" >
439 439
 																					<?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
440 440
 																				</label>
441 441
 
442 442
 																				<!-- Start Time -->
443
-																				<label for="yikes-easy-mc-form-restriction-start-time"><strong><?php _e( 'Start Time' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
444
-																					<input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-start-time" id="yikes-easy-mc-form-restriction-start-time" value="<?php echo date( 'g:iA', $form_settings['yikes-easy-mc-form-restriction-start'] ); ?>" >
443
+																				<label for="yikes-easy-mc-form-restriction-start-time"><strong><?php _e( 'Start Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
444
+																					<input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-start-time" id="yikes-easy-mc-form-restriction-start-time" value="<?php echo date( 'g:iA', $form_settings[ 'yikes-easy-mc-form-restriction-start' ] ); ?>" >
445 445
 																				</label>
446 446
 																				<p class="description"><?php _e( 'Set the dates that this form should display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
447 447
 																			</section>
448 448
 																			<!-- end Start Date Limitation Nested -->
449 449
 
450 450
 																			<!-- End Date Limitation Nested -->
451
-																			<section class="date-restirction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?> last">
451
+																			<section class="date-restirction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-schedule' ] == '0' ) { echo ' hidden'; } ?> last">
452 452
 																				<!-- End Date -->
453
-																				<label for="yikes-easy-mc-form-restriction-end-date"><strong><?php _e( 'End Date' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
454
-																					<input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-end-date" id="yikes-easy-mc-form-restriction-end-date" value="<?php echo date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings['yikes-easy-mc-form-restriction-end'] ); ?>" >
453
+																				<label for="yikes-easy-mc-form-restriction-end-date"><strong><?php _e( 'End Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
454
+																					<input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-end-date" id="yikes-easy-mc-form-restriction-end-date" value="<?php echo date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings[ 'yikes-easy-mc-form-restriction-end' ] ); ?>" >
455 455
 																					<?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
456 456
 																				</label>
457 457
 
458 458
 																				<!-- End Time -->
459
-																				<label for="yikes-easy-mc-form-restriction-end-time"><strong><?php _e( 'End Time' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
460
-																					<input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-end-time" id="yikes-easy-mc-form-restriction-end-time" value="<?php echo date( 'g:iA', $form_settings['yikes-easy-mc-form-restriction-end'] ); ?>" >
459
+																				<label for="yikes-easy-mc-form-restriction-end-time"><strong><?php _e( 'End Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
460
+																					<input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-end-time" id="yikes-easy-mc-form-restriction-end-time" value="<?php echo date( 'g:iA', $form_settings[ 'yikes-easy-mc-form-restriction-end' ] ); ?>" >
461 461
 																				</label>
462 462
 																				<p class="description"><?php _e( 'Set the dates that this form should no longer display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
463 463
 
464 464
 																				<!-- Form pending message -->
465
-																				<label for="yikes-easy-mc-form-restriction-pending-message"><strong><?php _e( 'Pending Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
465
+																				<label for="yikes-easy-mc-form-restriction-pending-message"><strong><?php _e( 'Pending Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
466 466
 																					<?php
467 467
 																						wp_editor(
468
-																							$form_settings['yikes-easy-mc-form-restriction-pending-message'],
468
+																							$form_settings[ 'yikes-easy-mc-form-restriction-pending-message' ],
469 469
 																							'yikes-easy-mc-form-restriction-pending-message',
470 470
 																							array(
471 471
 																								'editor_class' => 'yikes-easy-mc-form-restriction-pending-message',
@@ -477,10 +477,10 @@  discard block
 block discarded – undo
477 477
 																				<p class="description"><?php _e( 'Set the message that should display prior to the form being active.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
478 478
 
479 479
 																				<!-- form expired message -->
480
-																				<label for="yikes-easy-mc-form-restriction-expired-message"><strong><?php _e( 'Expired Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
480
+																				<label for="yikes-easy-mc-form-restriction-expired-message"><strong><?php _e( 'Expired Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
481 481
 																					<?php
482 482
 																						wp_editor(
483
-																							$form_settings['yikes-easy-mc-form-restriction-expired-message'],
483
+																							$form_settings[ 'yikes-easy-mc-form-restriction-expired-message' ],
484 484
 																							'yikes-easy-mc-form-restriction-expired-message',
485 485
 																							array(
486 486
 																								'editor_class' => 'yikes-easy-mc-form-restriction-expired-message',
@@ -495,16 +495,16 @@  discard block
 block discarded – undo
495 495
 
496 496
 																			<!-- Require Users to be Logged In -->
497 497
 																			<label class="inline-form-label">
498
-																				<input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-login-required" value="1" <?php checked( $form_settings['yikes-easy-mc-form-login-required'], '1' ); ?> /><?php _e( 'Require Login', 'yikes-inc-easy-mailchimp-extender' ); ?>
498
+																				<input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-login-required" value="1" <?php checked( $form_settings[ 'yikes-easy-mc-form-login-required' ], '1' ); ?> /><?php _e( 'Require Login', 'yikes-inc-easy-mailchimp-extender' ); ?>
499 499
 																			</label>
500 500
 																			<p class="description"><?php _e( 'Require users to be logged in before they can view and submit this opt-in form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
501 501
 
502 502
 																			<!-- Require Login Message -->
503
-																			<section class="login-restirction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-login-required'] == '0' ) { echo ' hidden'; } ?>">
504
-																				<label for="yikes-easy-mc-form-restriction-login-message"><strong><?php _e( 'Required Login Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
503
+																			<section class="login-restirction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-login-required' ] == '0' ) { echo ' hidden'; } ?>">
504
+																				<label for="yikes-easy-mc-form-restriction-login-message"><strong><?php _e( 'Required Login Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
505 505
 																					<?php
506 506
 																						wp_editor(
507
-																							$form_settings['yikes-easy-mc-form-restriction-login-message'],
507
+																							$form_settings[ 'yikes-easy-mc-form-restriction-login-message' ],
508 508
 																							'yikes-easy-mc-form-restriction-login-message',
509 509
 																							array(
510 510
 																								'editor_class' => 'yikes-easy-mc-form-restriction-login-message',
@@ -533,14 +533,14 @@  discard block
 block discarded – undo
533 533
 													<div id="postbox-container-1" class="postbox-container">
534 534
 														<div class="meta-box-sortables">
535 535
 															<div class="postbox yikes-easy-mc-postbox">
536
-																<h3 class="edit-form-title"><span><?php _e( "Form Settings Explained" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
536
+																<h3 class="edit-form-title"><span><?php _e( "Form Settings Explained", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
537 537
 																<div class="inside">
538 538
 
539 539
 																	<ul>
540
-																		<li><strong><?php _e( 'Classes' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Add additional classes to this form, allowing you to target it more easily for customization via CSS.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
541
-																		<li><strong><?php _e( 'Form Layout' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Toggle the layout of this form between single column and an inline layout. The inline layout places all of your form fields and the submit button on a single line.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
542
-																		<li><strong><?php _e( 'Submit Button' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Adjust setting specific to the submit button. Change the submit button text, or set it to a specified image. Use the "Submit Button Classes" to  assign additional classes to your submit button - ensuring it fits better into your theme.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
543
-																		<li><strong><?php _e( 'Form Restrictions' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Adjust the restrictions for this form. Limit form visibility to a given time period, require users to be logged in to sign up or combine the two!' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
540
+																		<li><strong><?php _e( 'Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Add additional classes to this form, allowing you to target it more easily for customization via CSS.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
541
+																		<li><strong><?php _e( 'Form Layout', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Toggle the layout of this form between single column and an inline layout. The inline layout places all of your form fields and the submit button on a single line.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
542
+																		<li><strong><?php _e( 'Submit Button', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Adjust setting specific to the submit button. Change the submit button text, or set it to a specified image. Use the "Submit Button Classes" to  assign additional classes to your submit button - ensuring it fits better into your theme.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
543
+																		<li><strong><?php _e( 'Form Restrictions', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'Adjust the restrictions for this form. Limit form visibility to a given time period, require users to be logged in to sign up or combine the two!', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
544 544
 																	</ul>
545 545
 
546 546
 																</div>
@@ -568,41 +568,41 @@  discard block
 block discarded – undo
568 568
 													<div id="post-body-content">
569 569
 														<div class="meta-box-sortables ui-sortable">
570 570
 															<div class="postbox yikes-easy-mc-postbox">
571
-																<h3 class="edit-form-title"><span><?php _e( "Custom Messages" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
571
+																<h3 class="edit-form-title"><span><?php _e( "Custom Messages", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
572 572
 
573 573
 																<div class="inside error-message-container">
574 574
 																	<?php
575 575
 																		// build our default options
576 576
 																		$error_message_array = array(
577
-																			'success' => __( 'Thank You for subscribing! Check your email for the confirmation message.' , 'yikes-inc-easy-mailchimp-extender' ),
578
-																			'general-error' => __( "Whoops! It looks like something went wrong. Please try again." , 'yikes-inc-easy-mailchimp-extender' ),
579
-																			'invalid-email' => __( "Please provide a valid email address." , 'yikes-inc-easy-mailchimp-extender' ),
580
-																			'email-exists-error' => __( "The provided email is already subscribed to this list." , 'yikes-inc-easy-mailchimp-extender' ),
581
-																			'update-link' => __ ( "To update your MailChimp profile, please [link]click to send yourself an update link[/link].", 'yikes-inc-easy-mailchimp-extender' ),
577
+																			'success' => __( 'Thank You for subscribing! Check your email for the confirmation message.', 'yikes-inc-easy-mailchimp-extender' ),
578
+																			'general-error' => __( "Whoops! It looks like something went wrong. Please try again.", 'yikes-inc-easy-mailchimp-extender' ),
579
+																			'invalid-email' => __( "Please provide a valid email address.", 'yikes-inc-easy-mailchimp-extender' ),
580
+																			'email-exists-error' => __( "The provided email is already subscribed to this list.", 'yikes-inc-easy-mailchimp-extender' ),
581
+																			'update-link' => __( "To update your MailChimp profile, please [link]click to send yourself an update link[/link].", 'yikes-inc-easy-mailchimp-extender' ),
582 582
 																		);
583
-																		$global_error_messages = get_option( 'yikes-easy-mc-global-error-messages' , $error_message_array );
583
+																		$global_error_messages = get_option( 'yikes-easy-mc-global-error-messages', $error_message_array );
584 584
 																	?>
585
-																	<p class="edit-form-description"><?php _e( "Enter your custom messages for this form below. Leave the field blank to use the default global error message." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
585
+																	<p class="edit-form-description"><?php _e( "Enter your custom messages for this form below. Leave the field blank to use the default global error message.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
586 586
 
587 587
 																	<!-- Success Message -->
588
-																	<label for="yikes-easy-mc-success-message"><strong><?php _e( 'Success Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
589
-																		<input type="text" class="widefat" name="yikes-easy-mc-success-message" id="yikes-easy-mc-success-message" value="<?php echo isset( $error_messages['success'] ) ? stripslashes( esc_html( $error_messages['success'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success']; ?>" >
588
+																	<label for="yikes-easy-mc-success-message"><strong><?php _e( 'Success Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
589
+																		<input type="text" class="widefat" name="yikes-easy-mc-success-message" id="yikes-easy-mc-success-message" value="<?php echo isset( $error_messages[ 'success' ] ) ? stripslashes( esc_html( $error_messages[ 'success' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'success' ]; ?>" >
590 590
 																	</label>
591 591
 																	<!-- General Error Message -->
592
-																	<label for="yikes-easy-mc-general-error-message"><strong><?php _e( 'General Error Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
593
-																		<input type="text" class="widefat" name="yikes-easy-mc-general-error-message" id="yikes-easy-mc-general-error-message" value="<?php echo isset( $error_messages['general-error'] ) ? stripslashes( esc_html( $error_messages['general-error'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['general-error']; ?>" >
592
+																	<label for="yikes-easy-mc-general-error-message"><strong><?php _e( 'General Error Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
593
+																		<input type="text" class="widefat" name="yikes-easy-mc-general-error-message" id="yikes-easy-mc-general-error-message" value="<?php echo isset( $error_messages[ 'general-error' ] ) ? stripslashes( esc_html( $error_messages[ 'general-error' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'general-error' ]; ?>" >
594 594
 																	</label>
595 595
 																	<!-- Invalid Email Address Message -->
596
-																	<label for="yikes-easy-mc-invalid-email-message"><strong><?php _e( 'Invalid Email' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
597
-																		<input type="text" class="widefat" name="yikes-easy-mc-invalid-email-message" id="yikes-easy-mc-invalid-email-message" value="<?php echo isset( $error_messages['invalid-email'] ) ? stripslashes( esc_html( $error_messages['invalid-email'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['invalid-email']; ?>">
596
+																	<label for="yikes-easy-mc-invalid-email-message"><strong><?php _e( 'Invalid Email', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
597
+																		<input type="text" class="widefat" name="yikes-easy-mc-invalid-email-message" id="yikes-easy-mc-invalid-email-message" value="<?php echo isset( $error_messages[ 'invalid-email' ] ) ? stripslashes( esc_html( $error_messages[ 'invalid-email' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'invalid-email' ]; ?>">
598 598
 																	</label>
599 599
 																	<!-- Email Address is already subscribed -->
600
-																	<label for="yikes-easy-mc-user-subscribed-message"><strong><?php _e( 'Email Already Subscribed' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
601
-																		<input type="text" class="widefat" name="yikes-easy-mc-user-subscribed-message" id="yikes-easy-mc-user-subscribed-message" value="<?php echo isset( $error_messages['already-subscribed'] ) ? stripslashes( esc_html( $error_messages['already-subscribed'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['email-exists-error']; ?>">
600
+																	<label for="yikes-easy-mc-user-subscribed-message"><strong><?php _e( 'Email Already Subscribed', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
601
+																		<input type="text" class="widefat" name="yikes-easy-mc-user-subscribed-message" id="yikes-easy-mc-user-subscribed-message" value="<?php echo isset( $error_messages[ 'already-subscribed' ] ) ? stripslashes( esc_html( $error_messages[ 'already-subscribed' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'email-exists-error' ]; ?>">
602 602
 																	</label>
603 603
 																	<!-- Click the link to update user profile etc. etc. -->
604
-																	<label for="yikes-easy-mc-user-subscribed-update-link"><strong><?php _e( 'Update Link' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
605
-																		<input type="text" class="widefat" name="yikes-easy-mc-user-update-link" id="yikes-easy-mc-user-update-link" value="<?php echo isset( $error_messages['update-link'] ) ? stripslashes( esc_html( $error_messages['update-link'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-link']; ?>">
604
+																	<label for="yikes-easy-mc-user-subscribed-update-link"><strong><?php _e( 'Update Link', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
605
+																		<input type="text" class="widefat" name="yikes-easy-mc-user-update-link" id="yikes-easy-mc-user-update-link" value="<?php echo isset( $error_messages[ 'update-link' ] ) ? stripslashes( esc_html( $error_messages[ 'update-link' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'update-link' ]; ?>">
606 606
 																	</label>
607 607
 																</div>
608 608
 
@@ -617,15 +617,15 @@  discard block
 block discarded – undo
617 617
 													<div id="postbox-container-1" class="postbox-container">
618 618
 														<div class="meta-box-sortables">
619 619
 															<div class="postbox yikes-easy-mc-postbox">
620
-																<h3 class="edit-form-title"><span><?php _e( "Error Message Explanation" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
620
+																<h3 class="edit-form-title"><span><?php _e( "Error Message Explanation", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
621 621
 																<div class="inside">
622 622
 
623 623
 																	<ul>
624
-																		<li><strong><?php _e( 'Success Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'The message displayed to the user after they have submitted the form and the data has been successfully sent to MailChimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
625
-																		<li><strong><?php _e( 'General Error Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'The message displayed to the user after a generic error has occurred.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
626
-																		<li><strong><?php _e( 'Invalid Email' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'The message displayed to the user after they have entered a non-valid email address.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
627
-																		<li><strong><?php _e( 'Email Already Subscribed' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'The message displayed to the user after they attempt to sign up for a mailing list using an email address that is already subscribed. You can display the user email back in the response by using an <code>[email]</code> tag. This will be replaced with the email entered by the user, in the response.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
628
-																		<li><strong><?php _e( 'Update Link' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'The update link is used when you allow users to generate an update email, when they are already subscribed to a list. Wrap the text you want to use as the link in <code>[link][/link]</code> tags.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
624
+																		<li><strong><?php _e( 'Success Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'The message displayed to the user after they have submitted the form and the data has been successfully sent to MailChimp.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
625
+																		<li><strong><?php _e( 'General Error Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'The message displayed to the user after a generic error has occurred.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
626
+																		<li><strong><?php _e( 'Invalid Email', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'The message displayed to the user after they have entered a non-valid email address.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
627
+																		<li><strong><?php _e( 'Email Already Subscribed', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'The message displayed to the user after they attempt to sign up for a mailing list using an email address that is already subscribed. You can display the user email back in the response by using an <code>[email]</code> tag. This will be replaced with the email entered by the user, in the response.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
628
+																		<li><strong><?php _e( 'Update Link', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> : <?php _e( 'The update link is used when you allow users to generate an update email, when they are already subscribed to a list. Wrap the text you want to use as the link in <code>[link][/link]</code> tags.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
629 629
 																	</ul>
630 630
 
631 631
 																</div>
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
 										</label>
645 645
 										<!-- End Error Messages -->
646 646
 
647
-										<?php do_action( 'yikes-mailchimp-edit-form-sections' , $form ); ?>
647
+										<?php do_action( 'yikes-mailchimp-edit-form-sections', $form ); ?>
648 648
 
649 649
 									</div>
650 650
 									<!-- .inside -->
@@ -659,107 +659,107 @@  discard block
 block discarded – undo
659 659
 						<div id="postbox-container-1" class="postbox-container  yikes-easy-forms-sidebar">
660 660
 							<div class="meta-box-sortables">
661 661
 								<div class="postbox yikes-easy-mc-postbox">
662
-									<h3><span><?php _e( 'Form Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
662
+									<h3><span><?php _e( 'Form Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
663 663
 
664 664
 									<div class="inside">
665 665
 											<p class="inside-section-1">
666
-												<label for="shortcode"><?php _e( 'Edit Another Form' , 'yikes-inc-easy-mailchimp-extender' ); ?><br />
666
+												<label for="shortcode"><?php _e( 'Edit Another Form', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
667 667
 													<select class="widefat" name="form_switcher" id="form_switcher" onchange="YIKES_Easy_MC_SwitchForm(jQuery(this).val());">
668
-														<?php foreach( $all_forms as $single_form ) { ?>
669
-															<option <?php selected( $form_id , $single_form['id'] ); ?>value="<?php echo $single_form['id']; ?>"><?php echo $single_form['form_name']; ?></option>
668
+														<?php foreach ( $all_forms as $single_form ) { ?>
669
+															<option <?php selected( $form_id, $single_form[ 'id' ] ); ?>value="<?php echo $single_form[ 'id' ]; ?>"><?php echo $single_form[ 'form_name' ]; ?></option>
670 670
 														<?php } ?>
671 671
 													</select>
672 672
 												</label>
673 673
 											</p>
674 674
 
675 675
 											<p class="inside-section-2">
676
-												<label for="shortcode"><?php _e( 'Shortcode' , 'yikes-inc-easy-mailchimp-extender' ); ?><br />
677
-													<input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo $form['id']; ?>"]' />
676
+												<label for="shortcode"><?php _e( 'Shortcode', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
677
+													<input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo $form[ 'id' ]; ?>"]' />
678 678
 												</label>
679 679
 											</p>
680 680
 
681 681
 
682 682
 										<a href="#" class="expansion-section-title settings-sidebar">
683
-											<span class="dashicons dashicons-plus"></span><?php _e( 'Associated List Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>
683
+											<span class="dashicons dashicons-plus"></span><?php _e( 'Associated List Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
684 684
 										</a>
685 685
 										<div class="yikes-mc-settings-expansion-section">
686 686
 											<!-- Associated List -->
687
-											<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="associated-list"><strong><?php _e( 'Associated List' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
688
-												<select name="associated-list" id="associated-list" <?php if( empty( $list_data['data'] ) ) { echo 'disabled="disabled"'; } ?> onchange="jQuery('.view-list-link').attr( 'href', '<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' ) ); ?>' + jQuery( this ).val() );">
687
+											<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="associated-list"><strong><?php _e( 'Associated List', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
688
+												<select name="associated-list" id="associated-list" <?php if ( empty( $list_data[ 'data' ] ) ) { echo 'disabled="disabled"'; } ?> onchange="jQuery('.view-list-link').attr( 'href', '<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' ) ); ?>' + jQuery( this ).val() );">
689 689
 													<?php
690
-													if( !empty( $list_data['data'] ) ) {
691
-														foreach( $list_data['data'] as $mailing_list ) {
690
+													if ( ! empty( $list_data[ 'data' ] ) ) {
691
+														foreach ( $list_data[ 'data' ] as $mailing_list ) {
692 692
 															?>
693
-																<option <?php selected( $form['list_id'] , $mailing_list['id'] ); ?> value="<?php echo $mailing_list['id']; ?>"><?php echo stripslashes( $mailing_list['name'] ) . ' (' . $mailing_list['stats']['member_count'] . ') '; ?></option>
693
+																<option <?php selected( $form[ 'list_id' ], $mailing_list[ 'id' ] ); ?> value="<?php echo $mailing_list[ 'id' ]; ?>"><?php echo stripslashes( $mailing_list[ 'name' ] ) . ' (' . $mailing_list[ 'stats' ][ 'member_count' ] . ') '; ?></option>
694 694
 															<?php
695 695
 														}
696 696
 													} else {
697 697
 														?>
698
-															<option value="no-forms"><?php _e( 'No Lists Found' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
698
+															<option value="no-forms"><?php _e( 'No Lists Found', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
699 699
 														<?php
700 700
 													}
701 701
 													?>
702 702
 												</select>
703
-												<?php if( !empty( $list_data['data'] ) ) { ?>
703
+												<?php if ( ! empty( $list_data[ 'data' ] ) ) { ?>
704 704
 													<p class="description view-list">
705
-														<a href="<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $form['list_id'] ) ); ?>" class="view-list-link"><?php _e( 'View List', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
705
+														<a href="<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $form[ 'list_id' ] ) ); ?>" class="view-list-link"><?php _e( 'View List', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
706 706
 													</p>
707 707
 													<p class="description">
708
-														<?php _e( "Users who sign up via this form will be added to the list selected above." , 'yikes-inc-easy-mailchimp-extender' ); ?>
708
+														<?php _e( "Users who sign up via this form will be added to the list selected above.", 'yikes-inc-easy-mailchimp-extender' ); ?>
709 709
 													</p>
710 710
 												<?php } else { ?>
711 711
 													<p class="description">
712
-														<?php _e( "It looks like you first need to create a list to assign this form to. Head over to" , 'yikes-inc-easy-mailchimp-extender' ); ?> <a href="http://www.MailChimp.com" title="<?php _e( 'Create a new list' , 'yikes-inc-easy-mailchimp-extender' ); ?>">MailChimp</a> <?php _e( 'to create your first list' , 'yikes-inc-easy-mailchimp-extender' ); ?>.
712
+														<?php _e( "It looks like you first need to create a list to assign this form to. Head over to", 'yikes-inc-easy-mailchimp-extender' ); ?> <a href="http://www.MailChimp.com" title="<?php _e( 'Create a new list', 'yikes-inc-easy-mailchimp-extender' ); ?>">MailChimp</a> <?php _e( 'to create your first list', 'yikes-inc-easy-mailchimp-extender' ); ?>.
713 713
 													</p>
714 714
 												<?php } ?>
715 715
 											</label></p>
716 716
 										</div>
717 717
 
718 718
 										<a href="#" class="expansion-section-title settings-sidebar">
719
-											<span class="dashicons dashicons-plus"></span><?php _e( 'Opt-in Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>
719
+											<span class="dashicons dashicons-plus"></span><?php _e( 'Opt-in Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
720 720
 										</a>
721 721
 										<div class="yikes-mc-settings-expansion-section">
722 722
 
723 723
 											<!-- Single or Double Opt-in -->
724 724
 											<?php
725
-												if( !isset( $optin_settings['optin'] ) ) {
726
-													$optin_settings['optin'] = '1';
725
+												if ( ! isset( $optin_settings[ 'optin' ] ) ) {
726
+													$optin_settings[ 'optin' ] = '1';
727 727
 												}
728 728
 											?>
729
-											<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="single-double-optin"><strong><?php _e( 'Single or Double Opt-in' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
729
+											<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="single-double-optin"><strong><?php _e( 'Single or Double Opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
730 730
 												<span class="edit-form-field-container-span">
731
-													<label for="single"><input id="single" type="radio" name="single-double-optin" value="0" <?php checked( $optin_settings['optin'] , '0' ); ?>><?php _e( 'Single' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
732
-													&nbsp;<label for="double"><input id="double" type="radio" name="single-double-optin" value="1" <?php checked( $optin_settings['optin'] , '1' ); ?>><?php _e( 'Double' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
731
+													<label for="single"><input id="single" type="radio" name="single-double-optin" value="0" <?php checked( $optin_settings[ 'optin' ], '0' ); ?>><?php _e( 'Single', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
732
+													&nbsp;<label for="double"><input id="double" type="radio" name="single-double-optin" value="1" <?php checked( $optin_settings[ 'optin' ], '1' ); ?>><?php _e( 'Double', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
733 733
 												</span>
734
-												<p class="description"><?php _e( "Double opt-in requires users to confirm their email address before being added to a list (recommended)" , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
734
+												<p class="description"><?php _e( "Double opt-in requires users to confirm their email address before being added to a list (recommended)", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
735 735
 											</label></p>
736 736
 
737 737
 											<!-- Welcome Email -->
738 738
 											<?php
739
-												if( !isset( $optin_settings['send_welcome_email'] ) ) {
740
-													$optin_settings['send_welcome_email'] = '1';
739
+												if ( ! isset( $optin_settings[ 'send_welcome_email' ] ) ) {
740
+													$optin_settings[ 'send_welcome_email' ] = '1';
741 741
 												}
742 742
 											?>
743
-											<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="send-welcome-email"><strong><?php _e( 'Send Welcome Email' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
743
+											<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="send-welcome-email"><strong><?php _e( 'Send Welcome Email', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
744 744
 												<span class="edit-form-field-container-span">
745
-													<label for="send-welcome"><input id="send-welcome" type="radio" name="send-welcome-email" value="1" <?php checked( $optin_settings['send_welcome_email'] , '1' ); ?>><?php _e( 'Yes' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
746
-													&nbsp;<label for="do-not-send-welcome"><input id="do-not-send-welcome" type="radio" name="send-welcome-email" value="0" <?php checked( $optin_settings['send_welcome_email'] , '0' ); ?>><?php _e( 'No' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
745
+													<label for="send-welcome"><input id="send-welcome" type="radio" name="send-welcome-email" value="1" <?php checked( $optin_settings[ 'send_welcome_email' ], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
746
+													&nbsp;<label for="do-not-send-welcome"><input id="do-not-send-welcome" type="radio" name="send-welcome-email" value="0" <?php checked( $optin_settings[ 'send_welcome_email' ], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
747 747
 												</span>
748
-												<p class="description"><?php _e( "When a user signs up, should they receive the default welcome email?" , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
748
+												<p class="description"><?php _e( "When a user signs up, should they receive the default welcome email?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
749 749
 											</label></p>
750 750
 
751 751
 											<!-- Update Existing Users -->
752 752
 											<?php
753
-												if( !isset( $optin_settings['update_existing_user'] ) ) {
754
-													$optin_settings['update_existing_user'] = '1';
753
+												if ( ! isset( $optin_settings[ 'update_existing_user' ] ) ) {
754
+													$optin_settings[ 'update_existing_user' ] = '1';
755 755
 												}
756 756
 											?>
757
-											<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="update-existing-user"><strong><?php _e( 'Update Existing Subscriber' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
757
+											<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="update-existing-user"><strong><?php _e( 'Update Existing Subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
758 758
 												<span class="form-field-container-span">
759
-													<label for="update-user"><input type="radio" id="update-user" onchange="toggleUpdateEmailContainer(this);return false;" name="update-existing-user" value="1" <?php checked( $optin_settings['update_existing_user'] , '1' ); ?>><?php _e( 'Yes' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
760
-													&nbsp;<label for="do-not-update-user"><input type="radio" onchange="toggleUpdateEmailContainer(this);return false;" id="do-not-update-user"  name="update-existing-user" value="0" <?php checked( $optin_settings['update_existing_user'] , '0' ); ?>><?php _e( 'No' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
759
+													<label for="update-user"><input type="radio" id="update-user" onchange="toggleUpdateEmailContainer(this);return false;" name="update-existing-user" value="1" <?php checked( $optin_settings[ 'update_existing_user' ], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
760
+													&nbsp;<label for="do-not-update-user"><input type="radio" onchange="toggleUpdateEmailContainer(this);return false;" id="do-not-update-user"  name="update-existing-user" value="0" <?php checked( $optin_settings[ 'update_existing_user' ], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
761 761
 												</span>
762
-												<p class="description"><?php printf( __( "Display an update link when a user is already subscribed to the list, allowing them to generate an email where they can update their subscribtion info - instead of displaying a %s message." , "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></p>
762
+												<p class="description"><?php printf( __( "Display an update link when a user is already subscribed to the list, allowing them to generate an email where they can update their subscribtion info - instead of displaying a %s message.", "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></p>
763 763
 											</label></p>
764 764
 
765 765
 											<!--
@@ -768,82 +768,82 @@  discard block
 block discarded – undo
768 768
 												- No = Just update the user profile without an email
769 769
 											-->
770 770
 											<?php
771
-												$send_update_email = ( isset( $optin_settings['send_update_email'] ) && '' !== $optin_settings['send_update_email'] ) ? $optin_settings['send_update_email'] : 0;
771
+												$send_update_email = ( isset( $optin_settings[ 'send_update_email' ] ) && '' !== $optin_settings[ 'send_update_email' ] ) ? $optin_settings[ 'send_update_email' ] : 0;
772 772
 											?>
773
-											<p class="form-field-container send-update-email" <?php if ( 1 !== absint( $optin_settings['update_existing_user'] ) ) { ?>style="display:none;"<?php } ?>><!-- necessary to prevent skipping on slideToggle(); --><label for="update-existing-user"><strong><?php _e( 'Send Update Email' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
773
+											<p class="form-field-container send-update-email" <?php if ( 1 !== absint( $optin_settings[ 'update_existing_user' ] ) ) { ?>style="display:none;"<?php } ?>><!-- necessary to prevent skipping on slideToggle(); --><label for="update-existing-user"><strong><?php _e( 'Send Update Email', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
774 774
 												<span class="form-field-container-span">
775
-													<label for="update-email"><input type="radio" id="update-email" name="update-existing-email" value="1" <?php checked( $send_update_email , '1' ); ?>><?php _e( 'Yes' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
776
-													&nbsp;<label for="do-not-update-email"><input type="radio" id="do-not-update-email"  name="update-existing-email" value="0" <?php checked( $send_update_email , '0' ); ?>><?php _e( 'No' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
775
+													<label for="update-email"><input type="radio" id="update-email" name="update-existing-email" value="1" <?php checked( $send_update_email, '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
776
+													&nbsp;<label for="do-not-update-email"><input type="radio" id="do-not-update-email"  name="update-existing-email" value="0" <?php checked( $send_update_email, '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
777 777
 												</span>
778
-												<em><?php printf( __( "Send an email allowing the user to update their profile, securely. Otherwise, when an existing subscriber re-subscribes to this form, their profile information will be updated without any further interaction." , "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></em>
778
+												<em><?php printf( __( "Send an email allowing the user to update their profile, securely. Otherwise, when an existing subscriber re-subscribes to this form, their profile information will be updated without any further interaction.", "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></em>
779 779
 											</label></p>
780 780
 
781 781
 										</div>
782 782
 
783 783
 										<a href="#" class="expansion-section-title settings-sidebar">
784
-											<span class="dashicons dashicons-plus"></span><?php _e( 'Submission Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>
784
+											<span class="dashicons dashicons-plus"></span><?php _e( 'Submission Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
785 785
 										</a>
786 786
 										<div class="yikes-mc-settings-expansion-section">
787 787
 											<!-- AJAX form Submission -->
788 788
 											<?php
789
-												if( !isset( $submission_settings['ajax'] ) ) {
790
-													$submission_settings['ajax'] = '1';
789
+												if ( ! isset( $submission_settings[ 'ajax' ] ) ) {
790
+													$submission_settings[ 'ajax' ] = '1';
791 791
 												}
792 792
 											?>
793
-											<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="form-ajax-submission"><strong><?php _e( 'Enable AJAX Submission' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
793
+											<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="form-ajax-submission"><strong><?php _e( 'Enable AJAX Submission', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
794 794
 												<span class="form-field-container-span">
795
-													<label for="enable-ajax"><input type="radio" id="enable-ajax" name="form-ajax-submission" value="1" <?php checked( $submission_settings['ajax'] , '1' ); ?>><?php _e( 'Yes' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
796
-													&nbsp;<label for="disable-ajax"><input type="radio" id="disable-ajax"  name="form-ajax-submission" value="0" <?php checked( $submission_settings['ajax'] , '0' ); ?>><?php _e( 'No' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
795
+													<label for="enable-ajax"><input type="radio" id="enable-ajax" name="form-ajax-submission" value="1" <?php checked( $submission_settings[ 'ajax' ], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
796
+													&nbsp;<label for="disable-ajax"><input type="radio" id="disable-ajax"  name="form-ajax-submission" value="0" <?php checked( $submission_settings[ 'ajax' ], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
797 797
 												</span>
798
-												<p class="description"><?php _e( "AJAX form submissions transmit data without requiring the page to refresh." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
798
+												<p class="description"><?php _e( "AJAX form submissions transmit data without requiring the page to refresh.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
799 799
 											</label></p>
800 800
 
801 801
 											<!-- Redirect User On Submission -->
802 802
 											<?php
803
-												if( !isset( $submission_settings['redirect_on_submission'] ) ) {
804
-													$submission_settings['redirect_on_submission'] = '0';
805
-													$submission_settings['redirect_page'] = '';
803
+												if ( ! isset( $submission_settings[ 'redirect_on_submission' ] ) ) {
804
+													$submission_settings[ 'redirect_on_submission' ] = '0';
805
+													$submission_settings[ 'redirect_page' ] = '';
806 806
 												}
807 807
 											?>
808
-											<p><label for="redirect-user-on-submission"><strong><?php _e( 'Redirect On Submission' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
808
+											<p><label for="redirect-user-on-submission"><strong><?php _e( 'Redirect On Submission', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
809 809
 												<span class="form-field-container-span">
810
-													<label for="redirect-user"><input type="radio" id="redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="1" <?php checked( $submission_settings['redirect_on_submission'] , '1' ); ?>><?php _e( 'Yes' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
811
-													&nbsp;<label for="do-not-redirect-user"><input type="radio" id="do-not-redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="0" <?php checked( $submission_settings['redirect_on_submission'] , '0' ); ?>><?php _e( 'No' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
810
+													<label for="redirect-user"><input type="radio" id="redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="1" <?php checked( $submission_settings[ 'redirect_on_submission' ], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
811
+													&nbsp;<label for="do-not-redirect-user"><input type="radio" id="do-not-redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="0" <?php checked( $submission_settings[ 'redirect_on_submission' ], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
812 812
 												</span>
813
-												<?php $this->generate_page_redirect_dropdown( $submission_settings['redirect_on_submission'] , $submission_settings['redirect_page'], ( isset( $submission_settings['custom_redirect_url'] ) ) ? esc_url( $submission_settings['custom_redirect_url'] ) : '' ); ?>
814
-												<p class="description"><?php _e( "When the user signs up would you like to redirect them to another page?" , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
813
+												<?php $this->generate_page_redirect_dropdown( $submission_settings[ 'redirect_on_submission' ], $submission_settings[ 'redirect_page' ], ( isset( $submission_settings[ 'custom_redirect_url' ] ) ) ? esc_url( $submission_settings[ 'custom_redirect_url' ] ) : '' ); ?>
814
+												<p class="description"><?php _e( "When the user signs up would you like to redirect them to another page?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
815 815
 											</label></p>
816 816
 
817 817
 											<!-- Hide Form On Submission -->
818 818
 											<?php
819
-												if( !isset( $submission_settings['hide_form_post_signup'] ) ) {
820
-													$submission_settings['hide_form_post_signup'] = '0';
819
+												if ( ! isset( $submission_settings[ 'hide_form_post_signup' ] ) ) {
820
+													$submission_settings[ 'hide_form_post_signup' ] = '0';
821 821
 												}
822 822
 											?>
823
-											<p><label for="hide-form-post-signup"><strong><?php _e( 'Hide Form After Sign Up' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
823
+											<p><label for="hide-form-post-signup"><strong><?php _e( 'Hide Form After Sign Up', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
824 824
 												<span class="form-field-container-span">
825
-													<label for="hide-form"><input type="radio"  id="hide-form" name="hide-form-post-signup" value="1" <?php checked( $submission_settings['hide_form_post_signup'] , '1' ); ?> checked><?php _e( 'Yes' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
826
-													&nbsp;<label for="do-not-hide-form"><input type="radio" id="do-not-hide-form" name="hide-form-post-signup" value="0" <?php checked( $submission_settings['hide_form_post_signup'] , '0' ); ?>><?php _e( 'No' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
825
+													<label for="hide-form"><input type="radio"  id="hide-form" name="hide-form-post-signup" value="1" <?php checked( $submission_settings[ 'hide_form_post_signup' ], '1' ); ?> checked><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
826
+													&nbsp;<label for="do-not-hide-form"><input type="radio" id="do-not-hide-form" name="hide-form-post-signup" value="0" <?php checked( $submission_settings[ 'hide_form_post_signup' ], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
827 827
 												</span>
828
-												<p class="description"><?php _e( "Should the form be hidden after the user successfully signs up?" , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
828
+												<p class="description"><?php _e( "Should the form be hidden after the user successfully signs up?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
829 829
 											</label></p>
830 830
 
831 831
 											<!-- Append or Replace Interest Groups -->
832 832
 											<?php
833
-												if( !isset( $submission_settings['replace_interests'] ) ) {
834
-													$submission_settings['replace_interests'] = '1'; // defaults to true
833
+												if ( ! isset( $submission_settings[ 'replace_interests' ] ) ) {
834
+													$submission_settings[ 'replace_interests' ] = '1'; // defaults to true
835 835
 												}
836 836
 											?>
837
-											<p><label for="replace-interest-groups"><strong><?php _e( 'Existing Interest Groups' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
837
+											<p><label for="replace-interest-groups"><strong><?php _e( 'Existing Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
838 838
 												<span class="form-field-container-span">
839
-													<label for="replace-interest-groups"><input type="radio"  id="replace-interest-groups" name="replace-interest-groups" value="1" <?php checked( $submission_settings['replace_interests'] , '1' ); ?> checked><?php _e( 'Replace' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
840
-													&nbsp;<label for="update-interest-groups"><input type="radio" id="update-interest-groups" name="replace-interest-groups" value="0" <?php checked( $submission_settings['replace_interests'] , '0' ); ?>><?php _e( 'Update' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
839
+													<label for="replace-interest-groups"><input type="radio"  id="replace-interest-groups" name="replace-interest-groups" value="1" <?php checked( $submission_settings[ 'replace_interests' ], '1' ); ?> checked><?php _e( 'Replace', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
840
+													&nbsp;<label for="update-interest-groups"><input type="radio" id="update-interest-groups" name="replace-interest-groups" value="0" <?php checked( $submission_settings[ 'replace_interests' ], '0' ); ?>><?php _e( 'Update', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
841 841
 												</span>
842 842
 
843
-													<p class="description"><small><?php _e( "<strong>Replace</strong>: Replace all interest groups with the new ones submitted." , 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
843
+													<p class="description"><small><?php _e( "<strong>Replace</strong>: Replace all interest groups with the new ones submitted.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
844 844
 
845 845
 
846
-													<p class="description"><small><?php _e( "<strong>Update</strong>: Update <em>only</em> the ones submitted. Leave existing interest groups as is." , 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
846
+													<p class="description"><small><?php _e( "<strong>Update</strong>: Update <em>only</em> the ones submitted. Leave existing interest groups as is.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
847 847
 
848 848
 											</label></p>
849 849
 
@@ -856,9 +856,9 @@  discard block
 block discarded – undo
856 856
 
857 857
 										<span class="form-buttons-container" id="major-publishing-actions">
858 858
 											<?php
859
-												echo submit_button( __( 'Update Form' ) , 'primary' , '' , false , array( 'onclick' => 'jQuery(this).parent().prev().css({"display":"block","visibility":"inherit"});' ) );
860
-												$url = esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-delete-form', 'mailchimp-form' => $form['id'] , 'nonce' => wp_create_nonce( 'delete-mailchimp-form-'.$form['id'] ) ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) );
861
-												echo '<a href="' . $url . '" class="yikes-delete-mailchimp-form" onclick="return confirm(\'' . __( "Are you sure you want to delete this form? This cannot be undone." , 'yikes-inc-easy-mailchimp-extender' ) . '\');">' . __( "Delete Form" , 'yikes-inc-easy-mailchimp-extender' ) . '</a>';
859
+												echo submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => 'jQuery(this).parent().prev().css({"display":"block","visibility":"inherit"});' ) );
860
+												$url = esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-delete-form', 'mailchimp-form' => $form[ 'id' ], 'nonce' => wp_create_nonce( 'delete-mailchimp-form-' . $form[ 'id' ] ) ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) );
861
+												echo '<a href="' . $url . '" class="yikes-delete-mailchimp-form" onclick="return confirm(\'' . __( "Are you sure you want to delete this form? This cannot be undone.", 'yikes-inc-easy-mailchimp-extender' ) . '\');">' . __( "Delete Form", 'yikes-inc-easy-mailchimp-extender' ) . '</a>';
862 862
 											?>
863 863
 										</span>
864 864
 
Please login to merge, or discard this patch.