Completed
Pull Request — staging (#799)
by Viktor
05:05
created
public/classes/process/class.process_form_submission_handler.php 1 patch
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -255,13 +255,13 @@  discard block
 block discarded – undo
255 255
 		$this->handle_updating_existing_user_link_message     = __( 'To update your MailChimp profile, please click to send yourself an update link', 'yikes-inc-easy-mailchimp-extender' );
256 256
 		$this->handle_empty_required_field_message            = __( 'A required field is missing.', 'yikes-inc-easy-mailchimp-extender' );
257 257
 		$this->handle_empty_required_interest_group_message   = __( 'A required interest group is missing.', 'yikes-inc-easy-mailchimp-extender' );
258
-		$this->handle_nonce_message                           = __( 'Error: Sorry, the nonce security check didn\'t pass. Please reload the page and try again. You may want to try clearing your browser cache as a last attempt.' , 'yikes-inc-easy-mailchimp-extender' );
258
+		$this->handle_nonce_message                           = __( 'Error: Sorry, the nonce security check didn\'t pass. Please reload the page and try again. You may want to try clearing your browser cache as a last attempt.', 'yikes-inc-easy-mailchimp-extender' );
259 259
 		$this->handle_non_filled_recaptcha_message_message    = __( 'Please check the reCAPTCHA field.', 'yikes-inc-easy-mailchimp-extender' );
260 260
 		$this->generic_recaptcha_error_message                = __( 'Please refresh the page and try again.', 'yikes-inc-easy-mailchimp-extender' );
261 261
 
262 262
 		// Define our success messages
263
-		$this->default_response_single_optin_success_message  = __( 'Thank you for subscribing!' , 'yikes-inc-easy-mailchimp-extender' );
264
-		$this->default_response_double_optin_success_message  = __( 'Thank you for subscribing. Check your email for the confirmation message.' , 'yikes-inc-easy-mailchimp-extender' );
263
+		$this->default_response_single_optin_success_message  = __( 'Thank you for subscribing!', 'yikes-inc-easy-mailchimp-extender' );
264
+		$this->default_response_double_optin_success_message  = __( 'Thank you for subscribing. Check your email for the confirmation message.', 'yikes-inc-easy-mailchimp-extender' );
265 265
 		$this->existing_subscriber_profile_update_message     = __( 'Thank you for already being a subscriber! Your profile info has been updated.', 'yikes-inc-easy-mailchimp-extender' );
266 266
 	}
267 267
 
@@ -373,16 +373,16 @@  discard block
 block discarded – undo
373 373
 			}
374 374
 
375 375
 			// Check if the current iteration has a 'date_format' key set (i.e. date/birthday fields)
376
-			if ( isset( $form_fields[ $merge_tag ]['date_format'] ) ) {
377
-				$sanitized = $this->handle_date_format_merge_values( $sanitized, $form_fields[ $merge_tag ]['date_format'] );
376
+			if ( isset( $form_fields[ $merge_tag ][ 'date_format' ] ) ) {
377
+				$sanitized = $this->handle_date_format_merge_values( $sanitized, $form_fields[ $merge_tag ][ 'date_format' ] );
378 378
 			}
379 379
 
380 380
 			$merge_variables[ $merge_tag ] = $sanitized;
381 381
 		}
382 382
 
383 383
 		// Make sure we send the lower-cased, sanitized email so it matches the one we're sending in the body of the request.
384
-		if ( isset( $merge_variables['EMAIL'] ) ) {
385
-			$merge_variables['EMAIL'] = $this->email;
384
+		if ( isset( $merge_variables[ 'EMAIL' ] ) ) {
385
+			$merge_variables[ 'EMAIL' ] = $this->email;
386 386
 		}
387 387
 
388 388
 		/**
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
 		if ( count( $pieces ) === 3 ) {
460 460
 
461 461
 			// $pieces[1] = MM. $pieces[0] = DD. $date = MM/DD/YYYY
462
-			$date = $pieces[1] . '/' . $pieces[0] . '/' . $pieces[2];
462
+			$date = $pieces[ 1 ] . '/' . $pieces[ 0 ] . '/' . $pieces[ 2 ];
463 463
 		}
464 464
 
465 465
 		return $date;
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 		if ( count( $pieces ) === 2 ) {
485 485
 
486 486
 			// $pieces[1] = MM. $pieces[0] = DD. $birthday = MM/DD
487
-			$birthday = $pieces[1] . '/' . $pieces[0];
487
+			$birthday = $pieces[ 1 ] . '/' . $pieces[ 0 ];
488 488
 		}
489 489
 
490 490
 		return $birthday;
@@ -517,8 +517,8 @@  discard block
 block discarded – undo
517 517
 			// Loop through the interest groups and create a single array like {group_id} => false
518 518
 			foreach ( $interest_groupings as $group_data ) {
519 519
 
520
-				foreach ( $group_data['items'] as $item ) {
521
-					$groups[$item['id']] = false;
520
+				foreach ( $group_data[ 'items' ] as $item ) {
521
+					$groups[ $item[ 'id' ] ] = false;
522 522
 				}
523 523
 
524 524
 			}
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
 		do_action( "yikes-mailchimp-form-submission-{$this->form_id}", $this->email, $merge_variables, $this->form_id, $notifications );
632 632
 
633 633
 		// Get the optin value
634
-		$optin = isset( $optin_settings['optin'] ) ? (int) $optin_settings['optin'] : 0;
634
+		$optin = isset( $optin_settings[ 'optin' ] ) ? (int) $optin_settings[ 'optin' ] : 0;
635 635
 
636 636
 		if ( 1 === $optin ) {
637 637
 
@@ -661,13 +661,13 @@  discard block
 block discarded – undo
661 661
 
662 662
 		// Construct our success array variables
663 663
 		$return_success_array = array(
664
-			'hide'        		=> $submission_settings['hide_form_post_signup'],
664
+			'hide'        		=> $submission_settings[ 'hide_form_post_signup' ],
665 665
 			'error'       		=> 0,
666 666
 			'response'    		=> $response_message,
667
-			'redirection' 		=> $redirect_array['redirection'],
668
-			'redirect'    		=> $redirect_array['redirect'],
669
-			'new_window' 		=> $redirect_array['new_window'],
670
-			'redirect_timer'	=> $redirect_array['redirect_timer'],
667
+			'redirection' 		=> $redirect_array[ 'redirection' ],
668
+			'redirect'    		=> $redirect_array[ 'redirect' ],
669
+			'new_window' 		=> $redirect_array[ 'new_window' ],
670
+			'redirect_timer'	=> $redirect_array[ 'redirect_timer' ],
671 671
 		);
672 672
 
673 673
 		// Return success array
@@ -689,12 +689,12 @@  discard block
 block discarded – undo
689 689
 		$details    = '';
690 690
 
691 691
 		// Loop through the error data and retrieve any fields and messages
692
-		if ( isset( $error_data['data'] ) ) {
693
-			foreach ( $error_data['data'] as $datum ) {
694
-				if ( ! isset( $datum['field'], $datum['message'] ) ) {
692
+		if ( isset( $error_data[ 'data' ] ) ) {
693
+			foreach ( $error_data[ 'data' ] as $datum ) {
694
+				if ( ! isset( $datum[ 'field' ], $datum[ 'message' ] ) ) {
695 695
 					continue;
696 696
 				}
697
-				$details .= sprintf( '<br>Error with %1$s field: <strong>%2$s</strong>', $form_fields[ $datum['field'] ]['label'], $datum['message'] );
697
+				$details .= sprintf( '<br>Error with %1$s field: <strong>%2$s</strong>', $form_fields[ $datum[ 'field' ] ][ 'label' ], $datum[ 'message' ] );
698 698
 			}
699 699
 		}
700 700
 
@@ -737,21 +737,21 @@  discard block
 block discarded – undo
737 737
 		$missing_fields = array();
738 738
 
739 739
 		// Loop through submitted form data
740
-		foreach( $data as $merge_tag => $value ) {
740
+		foreach ( $data as $merge_tag => $value ) {
741 741
 
742 742
 			// Skip interest groups
743
-			if ( isset( $form_fields[ $merge_tag ]['group_id'] ) ) {
743
+			if ( isset( $form_fields[ $merge_tag ][ 'group_id' ] ) ) {
744 744
 				continue;
745 745
 			}
746 746
 
747 747
 			// check if this field is required
748
-			if ( isset( $form_fields[ $merge_tag ] ) && isset( $form_fields[ $merge_tag ]['require'] ) && $form_fields[ $merge_tag ]['require'] === '1' ) {
748
+			if ( isset( $form_fields[ $merge_tag ] ) && isset( $form_fields[ $merge_tag ][ 'require' ] ) && $form_fields[ $merge_tag ][ 'require' ] === '1' ) {
749 749
 
750 750
 				// Check if the field(s) are empty
751 751
 				if ( is_array( $value ) ) {
752 752
 
753 753
 					// Loop through the data and check if any are empty
754
-					foreach( $value as $field => $val ) {
754
+					foreach ( $value as $field => $val ) {
755 755
 
756 756
 						/**
757 757
 						*	'yikes-mailchimp-ignore-required-array-field'
@@ -770,13 +770,13 @@  discard block
 block discarded – undo
770 770
 
771 771
 							// Set the merge label (e.g. MMERGE6) as the key so we don't get the same field multiple times
772 772
 							// (e.g. For arrays, like an address, where multiple address fields are empty)
773
-							$missing_fields[ $form_fields[ $merge_tag ]['merge'] ] = $form_fields[ $merge_tag ];
773
+							$missing_fields[ $form_fields[ $merge_tag ][ 'merge' ] ] = $form_fields[ $merge_tag ];
774 774
 						}
775 775
 					}
776 776
 
777 777
 				} else if ( empty( $value ) ) {
778 778
 					$field_is_missing = true;
779
-					$missing_fields[ $form_fields[ $merge_tag ]['merge'] ] = $form_fields[ $merge_tag ];
779
+					$missing_fields[ $form_fields[ $merge_tag ][ 'merge' ] ] = $form_fields[ $merge_tag ];
780 780
 				}
781 781
 			}
782 782
 		}
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
 		foreach ( $form_fields as $merge_tag => $field_data ) {
827 827
 
828 828
 			// If an interest group and it's required
829
-			if ( isset( $field_data['group_id'] ) && isset( $field_data['require'] ) && $field_data['require'] === '1' ) {
829
+			if ( isset( $field_data[ 'group_id' ] ) && isset( $field_data[ 'require' ] ) && $field_data[ 'require' ] === '1' ) {
830 830
 				
831 831
 				// Check if it was submitted (meaning, check if it's set in our $data array)
832 832
 				if ( ! isset( $data[ 'group-' . $merge_tag ] ) ) {
@@ -888,30 +888,30 @@  discard block
 block discarded – undo
888 888
 		}
889 889
 
890 890
 		// Construct the API URL
891
-		$url           = esc_url_raw( 'https://www.google.com/recaptcha/api/siteverify?secret=' . get_option( 'yikes-mc-recaptcha-secret-key', '' ) . '&response=' . $recaptcha_response . '&remoteip=' . $_SERVER['REMOTE_ADDR'] );
891
+		$url           = esc_url_raw( 'https://www.google.com/recaptcha/api/siteverify?secret=' . get_option( 'yikes-mc-recaptcha-secret-key', '' ) . '&response=' . $recaptcha_response . '&remoteip=' . $_SERVER[ 'REMOTE_ADDR' ] );
892 892
 		$response      = wp_remote_get( $url );
893
-		$response_body = json_decode( $response['body'], true );
893
+		$response_body = json_decode( $response[ 'body' ], true );
894 894
 
895 895
 		// Set up errors array
896 896
 		$recaptcha_errors = array();
897 897
 
898 898
 		// if we've hit an error, lets return the error!
899
-		if ( true !== $response_body['success'] ) {
899
+		if ( true !== $response_body[ 'success' ] ) {
900 900
 
901
-			if( isset( $response_body['error-codes'] ) ) {
901
+			if ( isset( $response_body[ 'error-codes' ] ) ) {
902 902
 
903 903
 				// Loop through response error codes
904
-				foreach ( $response_body['error-codes'] as $error_code ) {
904
+				foreach ( $response_body[ 'error-codes' ] as $error_code ) {
905 905
 					if ( 'missing-input-response' === $error_code ) {
906 906
 						$error_code = $this->handle_non_filled_recaptcha_message;
907 907
 					}
908 908
 
909 909
 					// Add our error_code to the errors array
910
-					$recaptcha_errors[] = $error_code;
910
+					$recaptcha_errors[ ] = $error_code;
911 911
 				}
912 912
 
913 913
 			} else {
914
-				$recaptcha_errors[] = $this->generic_recaptcha_error_message;
914
+				$recaptcha_errors[ ] = $this->generic_recaptcha_error_message;
915 915
 			}
916 916
 
917 917
 			/**
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
 	* @param array | $fields_array | An array of fields to loop through and make sure they're not null
1020 1020
 	*/
1021 1021
 	public function handle_empty_fields_generic( $fields_array ) {
1022
-		foreach( $fields_array as $field ) {
1022
+		foreach ( $fields_array as $field ) {
1023 1023
 			if ( $field === null ) {
1024 1024
 				return $this->yikes_fail( $hide = 0, $error = 1, $this->handle_empty_fields_generic_message );
1025 1025
 			}
@@ -1085,7 +1085,7 @@  discard block
 block discarded – undo
1085 1085
 
1086 1086
 		// Append our 'send-update-email' link and text
1087 1087
 		$response .= $link_start_tag;
1088
-		$response .= 	$this->handle_updating_existing_user_link_message;
1088
+		$response .= $this->handle_updating_existing_user_link_message;
1089 1089
 		$response .= $link_close_tag;
1090 1090
 
1091 1091
 		// Check for a user-defined message
@@ -1108,14 +1108,14 @@  discard block
 block discarded – undo
1108 1108
 	*/
1109 1109
 	protected function check_for_user_defined_response_message( $slug, $response_text, $data = false ) {
1110 1110
 
1111
-		switch( $slug ) {
1111
+		switch ( $slug ) {
1112 1112
 			case 'already-subscribed':
1113 1113
 
1114 1114
 				// Check if this error message exists
1115
-				if ( isset( $this->error_messages['already-subscribed'] ) && ! empty( $this->error_messages['already-subscribed'] ) ) {
1115
+				if ( isset( $this->error_messages[ 'already-subscribed' ] ) && ! empty( $this->error_messages[ 'already-subscribed' ] ) ) {
1116 1116
 
1117 1117
 					// Check if the substring (that we replace) '[email]' is located in the string and replace it
1118
-					$response_text = str_replace( '[email]', $this->email, $this->error_messages['already-subscribed'] );
1118
+					$response_text = str_replace( '[email]', $this->email, $this->error_messages[ 'already-subscribed' ] );
1119 1119
 				}
1120 1120
 
1121 1121
 				/**
@@ -1134,13 +1134,13 @@  discard block
 block discarded – undo
1134 1134
 			case 'update-link':
1135 1135
 
1136 1136
 				// Check if this error message exists
1137
-				if ( $data !== false && isset( $this->error_messages['update-link'] ) && ! empty( $this->error_messages['update-link'] ) ) {
1137
+				if ( $data !== false && isset( $this->error_messages[ 'update-link' ] ) && ! empty( $this->error_messages[ 'update-link' ] ) ) {
1138 1138
 
1139 1139
 					// Check if the substring (that we replace) '[link]' is located in the string and replace it
1140
-					$response_text = str_replace( '[link]', $data['link_start_tag'], $this->error_messages['update-link'] );
1140
+					$response_text = str_replace( '[link]', $data[ 'link_start_tag' ], $this->error_messages[ 'update-link' ] );
1141 1141
 
1142 1142
 					// Remove [/link]
1143
-					$response_text = str_replace( '[/link]', $data['link_close_tag'], $response_text );
1143
+					$response_text = str_replace( '[/link]', $data[ 'link_close_tag' ], $response_text );
1144 1144
 				}
1145 1145
 
1146 1146
 				/**
@@ -1159,8 +1159,8 @@  discard block
 block discarded – undo
1159 1159
 			case 'success':
1160 1160
 
1161 1161
 				// 'success' is the user-defined success message for double opt-in
1162
-				if ( isset( $this->error_messages['success'] ) && ! empty( $this->error_messages['success'] ) ) {
1163
-					$response_text = $this->error_messages['success'];
1162
+				if ( isset( $this->error_messages[ 'success' ] ) && ! empty( $this->error_messages[ 'success' ] ) ) {
1163
+					$response_text = $this->error_messages[ 'success' ];
1164 1164
 				}
1165 1165
 
1166 1166
 				/**
@@ -1179,8 +1179,8 @@  discard block
 block discarded – undo
1179 1179
 
1180 1180
 			case 'success-single-optin':
1181 1181
 
1182
-				if ( isset( $this->error_messages['success-single-optin'] ) && ! empty( $this->error_messages['success-single-optin'] ) ) {
1183
-					$response_text = $this->error_messages['success-single-optin'];
1182
+				if ( isset( $this->error_messages[ 'success-single-optin' ] ) && ! empty( $this->error_messages[ 'success-single-optin' ] ) ) {
1183
+					$response_text = $this->error_messages[ 'success-single-optin' ];
1184 1184
 				}
1185 1185
 
1186 1186
 				/**
@@ -1199,8 +1199,8 @@  discard block
 block discarded – undo
1199 1199
 
1200 1200
 			case 'success-resubscribed':
1201 1201
 
1202
-				if ( isset( $this->error_messages['success-resubscribed'] ) && ! empty( $this->error_messages['success-resubscribed'] ) ) {
1203
-					$response_text = $this->error_messages['success-resubscribed'];
1202
+				if ( isset( $this->error_messages[ 'success-resubscribed' ] ) && ! empty( $this->error_messages[ 'success-resubscribed' ] ) ) {
1203
+					$response_text = $this->error_messages[ 'success-resubscribed' ];
1204 1204
 				}
1205 1205
 
1206 1206
 				/**
@@ -1222,8 +1222,8 @@  discard block
 block discarded – undo
1222 1222
 				$original_response_text     = $response_text;
1223 1223
 				$user_defined_response_text = '';
1224 1224
 
1225
-				if ( isset( $this->error_messages['general-error'] ) && ! empty( $this->error_messages['general-error'] ) ) {
1226
-					$user_defined_response_text = $this->error_messages['general-error'];
1225
+				if ( isset( $this->error_messages[ 'general-error' ] ) && ! empty( $this->error_messages[ 'general-error' ] ) ) {
1226
+					$user_defined_response_text = $this->error_messages[ 'general-error' ];
1227 1227
 				}
1228 1228
 
1229 1229
 				/**
@@ -1285,7 +1285,7 @@  discard block
 block discarded – undo
1285 1285
 		} else {
1286 1286
 			global $process_submission_response;
1287 1287
 
1288
-			$process_submission_response = isset( $success_array['response'] ) ? $success_array['response'] : ''; // DEFAULT SUCCESS?
1288
+			$process_submission_response = isset( $success_array[ 'response' ] ) ? $success_array[ 'response' ] : ''; // DEFAULT SUCCESS?
1289 1289
 			$process_submission_response = $this->wrap_form_submission_response( $process_submission_response, $is_success = true );
1290 1290
 		}
1291 1291
 	}
@@ -1338,8 +1338,8 @@  discard block
 block discarded – undo
1338 1338
 		// Add additional fields we've been supplied
1339 1339
 		if ( ! empty( $additional_fields ) ) {
1340 1340
 
1341
-			foreach( $additional_fields as $key => $value ) {
1342
-				$response_array[$key] = $value;
1341
+			foreach ( $additional_fields as $key => $value ) {
1342
+				$response_array[ $key ] = $value;
1343 1343
 			}
1344 1344
 		}
1345 1345
 
@@ -1370,20 +1370,20 @@  discard block
 block discarded – undo
1370 1370
 		);
1371 1371
 
1372 1372
 		// Let's confirm we have a value before trying to use it
1373
-		$redirect_setting = isset( $submission_settings['redirect_on_submission'] ) ? $submission_settings['redirect_on_submission'] : false;
1373
+		$redirect_setting = isset( $submission_settings[ 'redirect_on_submission' ] ) ? $submission_settings[ 'redirect_on_submission' ] : false;
1374 1374
 
1375 1375
 		// Check the redirect flag
1376 1376
 		if ( '1' === $redirect_setting ) {
1377 1377
 
1378 1378
 			// Supply return array with default value of 1
1379
-			$redirect_array['redirection']	= apply_filters( 'yikes-mailchimp-redirection', 1, $form_id, $page_data );
1379
+			$redirect_array[ 'redirection' ] = apply_filters( 'yikes-mailchimp-redirection', 1, $form_id, $page_data );
1380 1380
 
1381 1381
 			// Let's confirm we have redirect_page/custom_redirect_url/new_window values
1382
-			$redirect_page_setting	 = isset( $submission_settings['redirect_page'] ) ? $submission_settings['redirect_page'] : false;
1383
-			$custom_redirect_setting = isset( $submission_settings['custom_redirect_url'] ) ? $submission_settings['custom_redirect_url'] : false;
1384
-			$redirect_new_window	 = isset( $submission_settings['redirect_new_window'] ) ? $submission_settings['redirect_new_window'] : false;
1382
+			$redirect_page_setting = isset( $submission_settings[ 'redirect_page' ] ) ? $submission_settings[ 'redirect_page' ] : false;
1383
+			$custom_redirect_setting = isset( $submission_settings[ 'custom_redirect_url' ] ) ? $submission_settings[ 'custom_redirect_url' ] : false;
1384
+			$redirect_new_window = isset( $submission_settings[ 'redirect_new_window' ] ) ? $submission_settings[ 'redirect_new_window' ] : false;
1385 1385
 
1386
-			$redirect_array['new_window'] = apply_filters( 'yikes-mailchimp-redirect-new-window', $redirect_new_window, $form_id, $page_data );
1386
+			$redirect_array[ 'new_window' ] = apply_filters( 'yikes-mailchimp-redirect-new-window', $redirect_new_window, $form_id, $page_data );
1387 1387
 
1388 1388
 			// Check if we're redirecting to a custom_url or just the redirect_page
1389 1389
 			$redirect_url = 'custom_url' !== $redirect_page_setting ? get_permalink( $redirect_page_setting ) : $custom_redirect_setting;
@@ -1408,9 +1408,9 @@  discard block
 block discarded – undo
1408 1408
 			*/
1409 1409
 			$redirect_timer = apply_filters( 'yikes-mailchimp-redirect-timer', $default_redirect_time_ms, $form_id, $page_data );
1410 1410
 
1411
-			$redirect_array['redirect_timer'] = $redirect_timer;
1411
+			$redirect_array[ 'redirect_timer' ] = $redirect_timer;
1412 1412
 
1413
-			$redirect_array['redirect'] = $redirect_url;
1413
+			$redirect_array[ 'redirect' ] = $redirect_url;
1414 1414
 		}
1415 1415
 
1416 1416
 		return $redirect_array;
Please login to merge, or discard this patch.
class.easy_digital_downloads_checkout_form-checkbox.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,11 +80,11 @@
 block discarded – undo
80 80
 
81 81
 		$user_info  = (array) edd_get_payment_meta_user_info( $payment_id );
82 82
 		$merge_vars = array();
83
-		if ( isset( $user_info['first_name'] ) ) {
84
-			$merge_vars['FNAME'] = $user_info['first_name'];
83
+		if ( isset( $user_info[ 'first_name' ] ) ) {
84
+			$merge_vars[ 'FNAME' ] = $user_info[ 'first_name' ];
85 85
 		}
86
-		if ( isset( $user_info['last_name'] ) ) {
87
-			$merge_vars['LNAME'] = $user_info['last_name'];
86
+		if ( isset( $user_info[ 'last_name' ] ) ) {
87
+			$merge_vars[ 'LNAME' ] = $user_info[ 'last_name' ];
88 88
 		}
89 89
 
90 90
 		// Subscribe the user.
Please login to merge, or discard this patch.
public/classes/checkbox-integrations/class.comment_form-checkbox.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,12 +75,12 @@
 block discarded – undo
75 75
 
76 76
 		// Create merge variables based on comment data.
77 77
 		$merge_vars = array(
78
-			'FNAME'    => $comment_data['comment_author'],
79
-			'OPTIN_IP' => $comment_data['comment_author_IP'],
78
+			'FNAME'    => $comment_data[ 'comment_author' ],
79
+			'OPTIN_IP' => $comment_data[ 'comment_author_IP' ],
80 80
 		);
81 81
 
82 82
 		// Subscribe the user.
83
-		$this->subscribe_user_integration( $comment_data['comment_author_email'], $this->type, $merge_vars );
83
+		$this->subscribe_user_integration( $comment_data[ 'comment_author_email' ], $this->type, $merge_vars );
84 84
 	}
85 85
 }
86 86
 $yikes_easy_mc_comment_checkbox_class = new Yikes_Easy_MC_Comment_Checkbox_Class();
Please login to merge, or discard this patch.
public/classes/checkbox-integrations/class.contact_form_7-checkbox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @return array $data CF7 posted data.
49 49
 	 */
50 50
 	public function alter_cf7_data( $data = array() ) {
51
-		$data['yikes_mailchimp_checkbox'] = $this->was_checkbox_checked( $this->type ) ? __( 'Yes', 'yikes-inc-easy-mailchimp-extender' ) : __( 'No', 'yikes-inc-easy-mailchimp-extender' );
51
+		$data[ 'yikes_mailchimp_checkbox' ] = $this->was_checkbox_checked( $this->type ) ? __( 'Yes', 'yikes-inc-easy-mailchimp-extender' ) : __( 'No', 'yikes-inc-easy-mailchimp-extender' );
52 52
 		return $data;
53 53
 	}
54 54
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		$submission          = WPCF7_Submission::get_instance();
66 66
 		if ( $submission ) {
67 67
 			$data   = $submission->get_posted_data();
68
-			$email  = isset( $data['your-email'] ) ? $data['your-email'] : '';
68
+			$email  = isset( $data[ 'your-email' ] ) ? $data[ 'your-email' ] : '';
69 69
 			$fields = array( 'email' => $email );
70 70
 			$this->subscribe_user_integration( $email, $this->type, apply_filters( 'yikes-mailchimp-contact-form-7', $fields, $data ) );
71 71
 		}
Please login to merge, or discard this patch.
blocks/api/api.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 			wp_send_json_error( '1' );
41 41
 		}
42 42
 
43
-		$form_id = isset( $_POST['form_id'] ) ? filter_var( wp_unslash( $_POST['form_id'] ), FILTER_SANITIZE_NUMBER_INT ) : '';
43
+		$form_id = isset( $_POST[ 'form_id' ] ) ? filter_var( wp_unslash( $_POST[ 'form_id' ] ), FILTER_SANITIZE_NUMBER_INT ) : '';
44 44
 
45 45
 		if ( empty( $form_id ) ) {
46 46
 			wp_send_json_error( '1' );
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
 
76 76
 			$locale   = get_locale();
77 77
 			$locale_a = explode( '_', $locale );
78
-			$locale   = isset( $locale_a[0] ) ? $locale_a[0] : $locale;
78
+			$locale   = isset( $locale_a[ 0 ] ) ? $locale_a[ 0 ] : $locale;
79 79
 			$return   = apply_filters( 'yikes_mailchimp_recaptcha_data', array(
80 80
 				'site_key'   => $site_key,
81 81
 				'secret_key' => $secret_key,
82 82
 				'locale'     => $locale,
83
-			));
83
+			) );
84 84
 
85 85
 			wp_send_json_success( $return );
86 86
 		}
Please login to merge, or discard this patch.
blocks/blocks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	public function register_blocks() {
43 43
 		register_block_type( static::BLOCK_NAMESPACE . static::BLOCK, array(
44 44
 			'render_callback' => array( $this, 'render_block' ),
45
-		));
45
+		) );
46 46
 	}
47 47
 
48 48
 	/**
Please login to merge, or discard this patch.
blocks/easy-forms-block/easy-forms-block.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -65,29 +65,29 @@
 block discarded – undo
65 65
 	 */
66 66
 	public function render_block( $attributes, $content ) {
67 67
 
68
-		if ( ! isset( $attributes['form_id'] ) ) {
68
+		if ( ! isset( $attributes[ 'form_id' ] ) ) {
69 69
 			return;
70 70
 		}
71 71
 
72 72
 		$shortcode_attributes = array(
73
-			'form'                       => $attributes['form_id'],
74
-			'submit'                     => isset( $attributes['submit_button_text'] ) && ! empty( $attributes['submit_button_text'] ) ? $attributes['submit_button_text'] : '',
75
-			'title'                      => isset( $attributes['show_title'] ) && true === $attributes['show_title'] ? '1' : '0',
76
-			'custom_title'               => isset( $attributes['form_title'] ) ? $attributes['form_title'] : '',
77
-			'description'                => isset( $attributes['show_description'] ) && true === $attributes['show_description'] ? '1' : '0',
78
-			'custom_description'         => isset( $attributes['form_description'] ) ? $attributes['form_description'] : '',
79
-			'ajax'                       => isset( $attributes['is_ajax'] ) && true === $attributes['is_ajax'] ? '1' : '0',
80
-			'recaptcha'                  => isset( $attributes['recaptcha'] ) && false === $attributes['recaptcha'] ? '0' : '',
81
-			'recaptcha_lang'             => isset( $attributes['recaptcha_lang'] ) ? $attributes['recaptcha_lang'] : '',
82
-			'recaptcha_type'             => isset( $attributes['recaptcha_type'] ) ? $attributes['recaptcha_type'] : '',
83
-			'recaptcha_theme'            => isset( $attributes['recaptcha_theme'] ) ? $attributes['recaptcha_theme'] : '',
84
-			'recaptcha_size'             => isset( $attributes['recaptcha_size'] ) ? $attributes['recaptcha_size'] : '',
85
-			'recaptcha_data_callback'    => isset( $attributes['recaptcha_verify_callback'] ) ? $attributes['recaptcha_verify_callback'] : '',
86
-			'recaptcha_expired_callback' => isset( $attributes['recaptcha_expired_callback'] ) ? $attributes['recaptcha_expired_callback'] : '',
87
-			'inline'                     => isset( $attributes['inline'] ) && true === $attributes['inline'] ? '1' : '0',
73
+			'form'                       => $attributes[ 'form_id' ],
74
+			'submit'                     => isset( $attributes[ 'submit_button_text' ] ) && ! empty( $attributes[ 'submit_button_text' ] ) ? $attributes[ 'submit_button_text' ] : '',
75
+			'title'                      => isset( $attributes[ 'show_title' ] ) && true === $attributes[ 'show_title' ] ? '1' : '0',
76
+			'custom_title'               => isset( $attributes[ 'form_title' ] ) ? $attributes[ 'form_title' ] : '',
77
+			'description'                => isset( $attributes[ 'show_description' ] ) && true === $attributes[ 'show_description' ] ? '1' : '0',
78
+			'custom_description'         => isset( $attributes[ 'form_description' ] ) ? $attributes[ 'form_description' ] : '',
79
+			'ajax'                       => isset( $attributes[ 'is_ajax' ] ) && true === $attributes[ 'is_ajax' ] ? '1' : '0',
80
+			'recaptcha'                  => isset( $attributes[ 'recaptcha' ] ) && false === $attributes[ 'recaptcha' ] ? '0' : '',
81
+			'recaptcha_lang'             => isset( $attributes[ 'recaptcha_lang' ] ) ? $attributes[ 'recaptcha_lang' ] : '',
82
+			'recaptcha_type'             => isset( $attributes[ 'recaptcha_type' ] ) ? $attributes[ 'recaptcha_type' ] : '',
83
+			'recaptcha_theme'            => isset( $attributes[ 'recaptcha_theme' ] ) ? $attributes[ 'recaptcha_theme' ] : '',
84
+			'recaptcha_size'             => isset( $attributes[ 'recaptcha_size' ] ) ? $attributes[ 'recaptcha_size' ] : '',
85
+			'recaptcha_data_callback'    => isset( $attributes[ 'recaptcha_verify_callback' ] ) ? $attributes[ 'recaptcha_verify_callback' ] : '',
86
+			'recaptcha_expired_callback' => isset( $attributes[ 'recaptcha_expired_callback' ] ) ? $attributes[ 'recaptcha_expired_callback' ] : '',
87
+			'inline'                     => isset( $attributes[ 'inline' ] ) && true === $attributes[ 'inline' ] ? '1' : '0',
88 88
 		);
89 89
 
90 90
 		// We want to run process_mailchimp_shortcode() but we need to return the plaintext shortcode or Gutenberg will autop() the shortcode content.
91
-		return '[yikes-mailchimp form="' . $shortcode_attributes['form'] . '" submit="' . $shortcode_attributes['submit'] . '" title="' . $shortcode_attributes['title'] . '" custom_title="' . $shortcode_attributes['custom_title'] . '" description="' . $shortcode_attributes['description'] . '" custom_description="' . $shortcode_attributes['custom_description'] . '" ajax="' . $shortcode_attributes['ajax'] . '" recaptcha="' . $shortcode_attributes['recaptcha'] . '"  recaptcha_lang="' . $shortcode_attributes['recaptcha_lang'] . '" recaptcha_type="' . $shortcode_attributes['recaptcha_type'] . '" recaptcha_theme="' . $shortcode_attributes['recaptcha_theme'] . '" recaptcha_size="' . $shortcode_attributes['recaptcha_size'] . '" recaptcha_data_callback="' . $shortcode_attributes['recaptcha_data_callback'] . '" recaptcha_expired_callback="' . $shortcode_attributes['recaptcha_expired_callback'] . '" inline="' . $shortcode_attributes['inline'] . '"]';
91
+		return '[yikes-mailchimp form="' . $shortcode_attributes[ 'form' ] . '" submit="' . $shortcode_attributes[ 'submit' ] . '" title="' . $shortcode_attributes[ 'title' ] . '" custom_title="' . $shortcode_attributes[ 'custom_title' ] . '" description="' . $shortcode_attributes[ 'description' ] . '" custom_description="' . $shortcode_attributes[ 'custom_description' ] . '" ajax="' . $shortcode_attributes[ 'ajax' ] . '" recaptcha="' . $shortcode_attributes[ 'recaptcha' ] . '"  recaptcha_lang="' . $shortcode_attributes[ 'recaptcha_lang' ] . '" recaptcha_type="' . $shortcode_attributes[ 'recaptcha_type' ] . '" recaptcha_theme="' . $shortcode_attributes[ 'recaptcha_theme' ] . '" recaptcha_size="' . $shortcode_attributes[ 'recaptcha_size' ] . '" recaptcha_data_callback="' . $shortcode_attributes[ 'recaptcha_data_callback' ] . '" recaptcha_expired_callback="' . $shortcode_attributes[ 'recaptcha_expired_callback' ] . '" inline="' . $shortcode_attributes[ 'inline' ] . '"]';
92 92
 	}
93 93
 }
Please login to merge, or discard this patch.
admin/class-yikes-inc-easy-mailchimp-extender-admin.php 1 patch
Spacing   +362 added lines, -362 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		/***********************/
102 102
 		/** Create A Form **/
103 103
 		/**********************/
104
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-create-form' ) {
104
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-create-form' ) {
105 105
 
106 106
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_create_form' ) );
107 107
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		/***********************/
111 111
 		/** Delete A Form **/
112 112
 		/**********************/
113
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-delete-form' ) {
113
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-delete-form' ) {
114 114
 
115 115
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_delete_form' ) );
116 116
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		/**********************************/
120 120
 		/** Duplicate/Clone A Form    **/
121 121
 		/********************************/
122
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-duplicate-form' ) {
122
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-duplicate-form' ) {
123 123
 
124 124
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_duplicate_form' ) );
125 125
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 		/*************************************/
129 129
 		/**  Reset Form Impression Stats **/
130 130
 		/***********************************/
131
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-reset-stats' ) {
131
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-reset-stats' ) {
132 132
 
133 133
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_reset_impression_stats' ) );
134 134
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 		/**********************************/
138 138
 		/**         Update A Form        **/
139 139
 		/********************************/
140
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-update-form' ) {
140
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-update-form' ) {
141 141
 
142 142
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_update_form' ) );
143 143
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		/**************************************************/
147 147
 		/**     Clear Store MailChimp Transient Data   **/
148 148
 		/*************************************************/
149
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-clear-transient-data' ) {
149
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-clear-transient-data' ) {
150 150
 
151 151
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_clear_transient_data' ) );
152 152
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		/*******************************************/
156 156
 		/** Remove a user from a mailing list     **/
157 157
 		/*****************************************/
158
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-unsubscribe-user' ) {
158
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-unsubscribe-user' ) {
159 159
 
160 160
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_unsubscribe_user' ) );
161 161
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 		/*******************************************/
165 165
 		/**    Create misisng error log file  **/
166 166
 		/*****************************************/
167
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-create-error-log' ) {
167
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-create-error-log' ) {
168 168
 
169 169
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_create_missing_error_log' ) );
170 170
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		/**************************************************/
197 197
 		/**        Clear MailChimp Error Log Data        **/
198 198
 		/*************************************************/
199
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-clear-error-log' ) {
199
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-clear-error-log' ) {
200 200
 
201 201
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_clear_error_log' ) );
202 202
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 		/*********************************************/
206 206
 		/**        Export MailChimp Opt-in Forms   **/
207 207
 		/*******************************************/
208
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-export-forms' ) {
208
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-export-forms' ) {
209 209
 
210 210
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_export_forms' ) );
211 211
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		/*********************************************/
215 215
 		/**                Export Plugin Settings           **/
216 216
 		/*******************************************/
217
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-export-settings' ) {
217
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-export-settings' ) {
218 218
 
219 219
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_export_plugin_settings' ) );
220 220
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 		/*******************************************/
224 224
 		/**        Import Class Inclusion       **/
225 225
 		/*****************************************/
226
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-import-forms' ) {
226
+		if ( isset( $_REQUEST[ 'action' ] ) && $_REQUEST[ 'action' ] == 'yikes-easy-mc-import-forms' ) {
227 227
 
228 228
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_import_forms' ) );
229 229
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 		/*******************************************/
233 233
 		/**    Premium Support Request     **/
234 234
 		/*****************************************/
235
-		if ( isset( $_POST['submit-premium-support-request'] ) ) {
235
+		if ( isset( $_POST[ 'submit-premium-support-request' ] ) ) {
236 236
 
237 237
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_premium_support_request' ) );
238 238
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 		/****************************************/
242 242
 		/**    Dismiss Options Migrations        **/
243 243
 		/****************************************/
244
-		if ( isset( $_REQUEST['dismiss_migration_nonce'] ) ) {
244
+		if ( isset( $_REQUEST[ 'dismiss_migration_nonce' ] ) ) {
245 245
 
246 246
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_dismiss_option_migrate' ) );
247 247
 
@@ -277,8 +277,8 @@  discard block
 block discarded – undo
277 277
 		 * @ return array  $links  New array of plugin actions
278 278
 		 */
279 279
 		public function easy_forms_plugin_action_links( $links ) {
280
-			$links[] = '<a href="'. esc_url( get_admin_url(null, 'admin.php?page=yikes-inc-easy-mailchimp-settings') ) .'">' . __( 'Settings', 'yikes-inc-easy-mailchimp-extender' ) . '</a>';
281
-			$links[] = '<a href="' . esc_url( 'http://www.yikesplugins.com?utm_source=plugins-page&utm_medium=plugin-row&utm_campaign=admin' ) . '" target="_blank">' . __( 'More plugins by YIKES, Inc.', 'yikes-inc-easy-mailchimp-extender' ) . '</a>';
280
+			$links[ ] = '<a href="' . esc_url( get_admin_url( null, 'admin.php?page=yikes-inc-easy-mailchimp-settings' ) ) . '">' . __( 'Settings', 'yikes-inc-easy-mailchimp-extender' ) . '</a>';
281
+			$links[ ] = '<a href="' . esc_url( 'http://www.yikesplugins.com?utm_source=plugins-page&utm_medium=plugin-row&utm_campaign=admin' ) . '" target="_blank">' . __( 'More plugins by YIKES, Inc.', 'yikes-inc-easy-mailchimp-extender' ) . '</a>';
282 282
 			return $links;
283 283
 		}
284 284
 
@@ -379,17 +379,17 @@  discard block
 block discarded – undo
379 379
 		*/
380 380
 		public function yikes_easy_mailchimp_export_forms() {
381 381
 			// grab our nonce.
382
-			$nonce = $_REQUEST['nonce'];
382
+			$nonce = $_REQUEST[ 'nonce' ];
383 383
 			// grab the forms.
384
-			$forms = isset( $_REQUEST['yikes_export_forms'] ) ? $_REQUEST['yikes_export_forms'] : array();
384
+			$forms = isset( $_REQUEST[ 'yikes_export_forms' ] ) ? $_REQUEST[ 'yikes_export_forms' ] : array();
385 385
 			// validate nonce.
386 386
 			if ( ! wp_verify_nonce( $nonce, 'export-forms' ) ) {
387
-				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
387
+				wp_die( __( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ), __( "Failed nonce validation", 'yikes-inc-easy-mailchimp-extender' ), array( 'response' => 500, 'back_link' => true ) );
388 388
 			}
389 389
 
390 390
 			// run the export function.
391 391
 			// parameters: ( $table_name, $form_ids, $file_name ).
392
-			Yikes_Inc_Easy_MailChimp_Export_Class::yikes_mailchimp_form_export('Yikes-Inc-Easy-MailChimp-Forms-Export', $forms );
392
+			Yikes_Inc_Easy_MailChimp_Export_Class::yikes_mailchimp_form_export( 'Yikes-Inc-Easy-MailChimp-Forms-Export', $forms );
393 393
 			// re-direct the user back to the page.
394 394
 			wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=import-export-forms' ) ) );
395 395
 			die();
@@ -403,10 +403,10 @@  discard block
 block discarded – undo
403 403
 		*/
404 404
 		public function yikes_easy_mailchimp_export_plugin_settings() {
405 405
 			// grab our nonce
406
-			$nonce = $_REQUEST['nonce'];
406
+			$nonce = $_REQUEST[ 'nonce' ];
407 407
 			// validate nonce.
408 408
 			if ( ! wp_verify_nonce( $nonce, 'export-settings' ) ) {
409
-				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
409
+				wp_die( __( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ), __( "Failed nonce validation", 'yikes-inc-easy-mailchimp-extender' ), array( 'response' => 500, 'back_link' => true ) );
410 410
 			}
411 411
 
412 412
 			// run the export function.
@@ -423,10 +423,10 @@  discard block
 block discarded – undo
423 423
 		*/
424 424
 		public function yikes_easy_mailchimp_import_forms() {
425 425
 			// grab our nonce.
426
-			$nonce = $_REQUEST['nonce'];
426
+			$nonce = $_REQUEST[ 'nonce' ];
427 427
 			// validate nonce.
428 428
 			if ( ! wp_verify_nonce( $nonce, 'import-forms' ) ) {
429
-				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
429
+				wp_die( __( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ), __( "Failed nonce validation", 'yikes-inc-easy-mailchimp-extender' ), array( 'response' => 500, 'back_link' => true ) );
430 430
 			}
431 431
 			// include the export class.
432 432
 			if ( ! class_exists( 'Yikes_Inc_Easy_MailChimp_Import_Class' ) ) {
@@ -447,18 +447,18 @@  discard block
 block discarded – undo
447 447
 		*/
448 448
 		public function yikes_easy_mailchimp_premium_support_request() {
449 449
 
450
-			if ( isset( $_POST['action'] ) && $_POST['action'] != 'yikes-support-request' ) {
450
+			if ( isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] != 'yikes-support-request' ) {
451 451
 				return __( 'We encountered an error. Please contact the YIKES Inc. support team.', 'yikes-inc-easy-mailchimp-extender' );
452 452
 			}
453 453
 
454
-			$email       = isset( $_POST['user-email'] ) ? $_POST['user-email'] : '';
455
-			$topic       = isset( $_POST['support-topic'] ) ? $_POST['support-topic'] : '';
456
-			$issue       = isset( $_POST['support-content'] ) ? $_POST['support-content'] : '';
457
-			$priority    = isset( $_POST['support-priority'] ) ? $_POST['support-priority'] : 1;
458
-			$license     = isset( $_POST['license_key'] ) ? $_POST['license_key'] : '';
459
-			$plugin_name = isset( $_POST['plugin-name'] ) ? $_POST['plugin-name'] : '';
460
-			$plugin_slug = isset( $_POST['plugin-slug'] ) ? $_POST['plugin-slug'] : '';
461
-			$name        = isset( $_POST['user-name'] ) ? $_POST['user-name'] : 'MailChimp Support';
454
+			$email       = isset( $_POST[ 'user-email' ] ) ? $_POST[ 'user-email' ] : '';
455
+			$topic       = isset( $_POST[ 'support-topic' ] ) ? $_POST[ 'support-topic' ] : '';
456
+			$issue       = isset( $_POST[ 'support-content' ] ) ? $_POST[ 'support-content' ] : '';
457
+			$priority    = isset( $_POST[ 'support-priority' ] ) ? $_POST[ 'support-priority' ] : 1;
458
+			$license     = isset( $_POST[ 'license_key' ] ) ? $_POST[ 'license_key' ] : '';
459
+			$plugin_name = isset( $_POST[ 'plugin-name' ] ) ? $_POST[ 'plugin-name' ] : '';
460
+			$plugin_slug = isset( $_POST[ 'plugin-slug' ] ) ? $_POST[ 'plugin-slug' ] : '';
461
+			$name        = isset( $_POST[ 'user-name' ] ) ? $_POST[ 'user-name' ] : 'MailChimp Support';
462 462
 
463 463
 			$edd_item_id = $this->get_premium_license( $plugin_slug );
464 464
 
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 
494 494
 		public function get_premium_license( $plugin_slug ) {
495 495
 
496
-			switch( $plugin_slug ) {
496
+			switch ( $plugin_slug ) {
497 497
 
498 498
 				case 'form-customizer':
499 499
 					return defined( 'YIKES_CUSTOMIZER_EDD_ITEM_ID' ) ? YIKES_CUSTOMIZER_EDD_ITEM_ID : '';
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
 			// add a new option to store the plugin activation date/time.
554 554
 			// @since v6.0.0.
555 555
 			// this is used to notify the user that they should review after 2 weeks.
556
-			if ( !get_option( 'yikes_easy_mailchimp_activation_date' ) ) {
556
+			if ( ! get_option( 'yikes_easy_mailchimp_activation_date' ) ) {
557 557
 				add_option( 'yikes_easy_mailchimp_activation_date', strtotime( "now" ) );
558 558
 			}
559 559
 
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 				$install_date = get_option( 'yikes_easy_mailchimp_activation_date' );
564 564
 				$past_date = strtotime( '-14 days' );
565 565
 				if ( $past_date >= $install_date && current_user_can( 'install_plugins' ) ) {
566
-					add_action( 'admin_notices', array( $this , 'yikes_easy_mailchimp_display_review_us_notice' ) );
566
+					add_action( 'admin_notices', array( $this, 'yikes_easy_mailchimp_display_review_us_notice' ) );
567 567
 				}
568 568
 			}
569 569
 
@@ -576,13 +576,13 @@  discard block
 block discarded – undo
576 576
 		*/
577 577
 		public function yikes_easy_mailchimp_display_review_us_notice() {
578 578
 			/* Lets only display our admin notice on YT4WP pages to not annoy the hell out of people :) */
579
-			if ( in_array( get_current_screen()->base , array( 'dashboard', 'post', 'edit' ) ) || strpos( get_current_screen()->base ,'yikes-inc-easy-mailchimp') !== false ) {
579
+			if ( in_array( get_current_screen()->base, array( 'dashboard', 'post', 'edit' ) ) || strpos( get_current_screen()->base, 'yikes-inc-easy-mailchimp' ) !== false ) {
580 580
 
581 581
 				// The URL of the page the user is currently on 
582
-				$current_uri  	  = isset( $_SERVER['REQUEST_URI'] ) && ! empty( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : false;
583
-				$current_host	  = isset( $_SERVER['HTTP_HOST'] ) && ! empty( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : false;
582
+				$current_uri = isset( $_SERVER[ 'REQUEST_URI' ] ) && ! empty( $_SERVER[ 'REQUEST_URI' ] ) ? $_SERVER[ 'REQUEST_URI' ] : false;
583
+				$current_host = isset( $_SERVER[ 'HTTP_HOST' ] ) && ! empty( $_SERVER[ 'HTTP_HOST' ] ) ? $_SERVER[ 'HTTP_HOST' ] : false;
584 584
 				$current_protocol = is_ssl() === true ? 'https://' : 'http://';
585
-				$current_url	  = ( $current_uri !== false && $current_host !== false ) ? $current_protocol . $current_host . $current_uri : admin_url();
585
+				$current_url = ( $current_uri !== false && $current_host !== false ) ? $current_protocol . $current_host . $current_uri : admin_url();
586 586
 
587 587
 				$plugin_name = '<strong>Easy Forms for MailChimp</strong>';
588 588
 				// Review URL - Change to the URL of your plugin on WordPress.org.
@@ -593,17 +593,17 @@  discard block
 block discarded – undo
593 593
 				// Make sure all of our variables have values.
594 594
 				$reviewurl  = ( ! empty( $reviewurl ) ) ? $reviewurl : '';
595 595
 				$addons_url = ( ! empty( $addons_url ) ) ? $addons_url : '';
596
-				$nobugurl	= ( ! empty( $nobugurl ) ) ? $nobugurl : '';
596
+				$nobugurl = ( ! empty( $nobugurl ) ) ? $nobugurl : '';
597 597
 
598 598
 				$review_message = '<div id="yikes-mailchimp-logo"></div>';
599 599
 				$review_message .= sprintf( 
600 600
 					__( 'It looks like you\'ve been using %1$s for 2 weeks now. We hope you\'re enjoying the features included with the free version. If so, please consider leaving us a review. Reviews only help to catch other users attention as well as provide us with feedback to grow and improve upon. If you\'re really enjoying the plugin, consider buying an add-on or developer license for some really awesome features and premium support.', 'yikes-inc-easy-mailchimp-extender' ) 
601 601
 					. '<span class="button-container"> <a href="%2$s" target="_blank" class="button-secondary"><span class="dashicons dashicons-star-filled"></span>'
602
-						. __( "Leave A Review" , 'yikes-inc-easy-mailchimp-extender' ) 
602
+						. __( "Leave A Review", 'yikes-inc-easy-mailchimp-extender' ) 
603 603
 					. '</a> <a href="%3$s" class="button-secondary"><span class="dashicons dashicons-upload"></span>'
604
-						. __( "View Addons" , 'yikes-inc-easy-mailchimp-extender' ) 
604
+						. __( "View Addons", 'yikes-inc-easy-mailchimp-extender' ) 
605 605
 					. '</a> <a href="%4$s" class="button-secondary"><span class="dashicons dashicons-no-alt"></span>'
606
-						. __( "Dismiss" , 'yikes-inc-easy-mailchimp-extender' ) 
606
+						. __( "Dismiss", 'yikes-inc-easy-mailchimp-extender' ) 
607 607
 					. "</a> </span>", 
608 608
 				$plugin_name, $reviewurl, $addons_url, $nobugurl );
609 609
 				?>
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
 			@since v3.1.1
621 621
 		*/
622 622
 		public function yikes_easy_mailchimp_stop_bugging_me() {
623
-			if ( isset( $_GET['yikes_easy_mc_icons_nobug'] ) && (int) filter_var( $_GET['yikes_easy_mc_icons_nobug'], FILTER_SANITIZE_NUMBER_INT ) === 1 ) {
623
+			if ( isset( $_GET[ 'yikes_easy_mc_icons_nobug' ] ) && (int) filter_var( $_GET[ 'yikes_easy_mc_icons_nobug' ], FILTER_SANITIZE_NUMBER_INT ) === 1 ) {
624 624
 				add_option( 'yikes_easy_mailchimp_review_stop_bugging_me', true );
625 625
 			}
626 626
 		}
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
 	// inlcude the js for tinymce.
659 659
 	public function yks_mc_add_tinymce_plugin( $plugin_array ) {
660 660
 
661
-		$plugin_array['yks_mc_tinymce_button'] = plugins_url( '/js/min/yikes-inc-easy-mailchimp-tinymce-button.min.js', __FILE__ );
661
+		$plugin_array[ 'yks_mc_tinymce_button' ] = plugins_url( '/js/min/yikes-inc-easy-mailchimp-tinymce-button.min.js', __FILE__ );
662 662
 
663 663
 		return $plugin_array;
664 664
 	}
@@ -679,13 +679,13 @@  discard block
 block discarded – undo
679 679
 		if ( ! empty( $list_data ) ) {
680 680
 			// build an array to pass to our javascript.
681 681
 			foreach ( $list_data as $id => $form ) {
682
-				$lists[] = array(
683
-					'text'  => urlencode( $form['form_name'] ),
682
+				$lists[ ] = array(
683
+					'text'  => urlencode( $form[ 'form_name' ] ),
684 684
 					'value' => $id,
685 685
 				);
686 686
 			}
687 687
 		} else {
688
-			$lists[0] = array(
688
+			$lists[ 0 ] = array(
689 689
 				'text'  => __( 'Please Import Some MailChimp Lists', 'yikes-inc-easy-mailchimp-extender' ),
690 690
 				'value' => '-',
691 691
 			);
@@ -773,8 +773,8 @@  discard block
 block discarded – undo
773 773
 
774 774
 		wp_enqueue_style( 'wp-color-picker' );
775 775
 		wp_enqueue_script( 'wp-color-picker' );
776
-		wp_enqueue_script( 'jquery.timepicker.js',YIKES_MC_URL . 'admin/js/jquery.timepicker.min.js', array( 'jquery' ) , $this->version, false );
777
-		wp_enqueue_script( 'edit-form-js', YIKES_MC_URL . 'admin/js/min/yikes-inc-easy-mailchimp-extender-edit-form.min.js', array( 'jquery.timepicker.js', 'jquery-ui-datepicker' ) , $this->version, false );
776
+		wp_enqueue_script( 'jquery.timepicker.js', YIKES_MC_URL . 'admin/js/jquery.timepicker.min.js', array( 'jquery' ), $this->version, false );
777
+		wp_enqueue_script( 'edit-form-js', YIKES_MC_URL . 'admin/js/min/yikes-inc-easy-mailchimp-extender-edit-form.min.js', array( 'jquery.timepicker.js', 'jquery-ui-datepicker' ), $this->version, false );
778 778
 
779 779
 		$localized_data = array(
780 780
 			'ajax_url'                          => esc_url_raw( admin_url( 'admin-ajax.php' ) ),
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
 	 * Convert the php date format string to a js date format
869 869
 	 */
870 870
 	public function yikes_jQuery_datepicker_date_format( $site_option ) {
871
-		switch( $site_option ) {
871
+		switch ( $site_option ) {
872 872
 			//Predefined WP date formats
873 873
 			default:
874 874
 			case 'F j, Y':
@@ -1080,7 +1080,7 @@  discard block
 block discarded – undo
1080 1080
 
1081 1081
 		/* Register General Settings Section */
1082 1082
 
1083
-		register_setting( 'yikes_inc_easy_mc_general_settings_page', 'yikes-mc-api-key', array( $this , 'yikes_mc_validate_api_key' ) );
1083
+		register_setting( 'yikes_inc_easy_mc_general_settings_page', 'yikes-mc-api-key', array( $this, 'yikes_mc_validate_api_key' ) );
1084 1084
 
1085 1085
 		register_setting( 'yikes_inc_easy_mc_general_settings_page', 'yikes-mailchimp-use-nonce' );
1086 1086
 
@@ -1125,7 +1125,7 @@  discard block
 block discarded – undo
1125 1125
 		add_settings_field(
1126 1126
 			'optin-checkbox-init',
1127 1127
 			__( 'Select Checkboxes to Generate', 'yikes-inc-easy-mailchimp-extender' ),
1128
-			'',  // callback + validation inside of admin/partials/menu/options.php
1128
+			'', // callback + validation inside of admin/partials/menu/options.php
1129 1129
 			'yikes_inc_easy_mc_checkbox_settings'
1130 1130
 		);
1131 1131
 		/* End Checkbox Settings */
@@ -1147,21 +1147,21 @@  discard block
 block discarded – undo
1147 1147
 			add_settings_field(
1148 1148
 				'yikes-mc-recaptcha-site-key',
1149 1149
 				__( 'Enter reCAPTCHA Site Key', 'yikes-inc-easy-mailchimp-extender' ),
1150
-				'',  // callback + validation inside of admin/partials/menu/options.php
1150
+				'', // callback + validation inside of admin/partials/menu/options.php
1151 1151
 				'yikes_easy_mc_settings_recpatcha_section'
1152 1152
 			);
1153 1153
 
1154 1154
 			add_settings_field(
1155 1155
 				'yikes-mc-recaptcha-secret-key',
1156 1156
 				__( 'Enter reCAPTCHA Secret Key', 'yikes-inc-easy-mailchimp-extender' ),
1157
-				'',  // callback + validation inside of admin/partials/menu/options.php
1157
+				'', // callback + validation inside of admin/partials/menu/options.php
1158 1158
 				'yikes_easy_mc_settings_recpatcha_section'
1159 1159
 			);
1160 1160
 
1161 1161
 			add_settings_field(
1162 1162
 				'yikes-mc-recaptcha-status',
1163 1163
 				__( 'Enable ReCaptcha', 'yikes-inc-easy-mailchimp-extender' ),
1164
-				'',  // callback + validation inside of admin/partials/menu/options.php
1164
+				'', // callback + validation inside of admin/partials/menu/options.php
1165 1165
 				'yikes_easy_mc_settings_recpatcha_section'
1166 1166
 			);
1167 1167
 
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
 			add_settings_field(
1182 1182
 				'yikes-mailchimp-debug-status',
1183 1183
 				__( 'Enable Debugging', 'yikes-inc-easy-mailchimp-extender' ),
1184
-				'',  // callback + validation inside of admin/partials/menu/options.php
1184
+				'', // callback + validation inside of admin/partials/menu/options.php
1185 1185
 				'yikes_easy_mc_settings_debug_section'
1186 1186
 			);
1187 1187
 
@@ -1201,7 +1201,7 @@  discard block
 block discarded – undo
1201 1201
 			update_option( 'yikes-mc-api-validation', 'invalid_api_key' );
1202 1202
 			return '';
1203 1203
 		}
1204
-		$api_key = strip_tags ( trim( $input ) );
1204
+		$api_key = strip_tags( trim( $input ) );
1205 1205
 		$dash_position = strpos( trim( $input ), '-' );
1206 1206
 		if ( $dash_position !== false ) {
1207 1207
 			$manager = new Yikes_Inc_Easy_MailChimp_API_Manager( $api_key );
@@ -1216,9 +1216,9 @@  discard block
 block discarded – undo
1216 1216
 			update_option( 'yikes-mc-api-validation', 'valid_api_key' );
1217 1217
 				// Clear the API key transient data
1218 1218
 			$this->delete_yikes_mailchimp_transients();
1219
-		}  else {
1219
+		} else {
1220 1220
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
1221
-			$error_logging->yikes_easy_mailchimp_write_to_error_log( $response->get_error_message() , __( "Connecting to MailChimp" , 'yikes-inc-easy-mailchimp-extender' ) , __( "Settings Page/General Settings" , 'yikes-inc-easy-mailchimp-extender' ) );
1221
+			$error_logging->yikes_easy_mailchimp_write_to_error_log( $response->get_error_message(), __( "Connecting to MailChimp", 'yikes-inc-easy-mailchimp-extender' ), __( "Settings Page/General Settings", 'yikes-inc-easy-mailchimp-extender' ) );
1222 1222
 			update_option( 'yikes-mc-api-invalid-key-response', $response->get_error_message() );
1223 1223
 			update_option( 'yikes-mc-api-validation', 'invalid_api_key' );
1224 1224
 		}
@@ -1267,11 +1267,11 @@  discard block
 block discarded – undo
1267 1267
 	public function check_for_old_yks_mc_options() {
1268 1268
 		$old_plugin_options = get_option( 'ykseme_storage' );
1269 1269
 		// only perform options migrations if the site is not a multi-site setup
1270
-		if ( !is_multisite() ) {
1270
+		if ( ! is_multisite() ) {
1271 1271
 			if ( apply_filters( 'yikes_mc_old_options_filter', $old_plugin_options ) ) {
1272 1272
 				// display a notice to the user that they should 'migrate'
1273 1273
 				// from the old plugin settings to the new ones
1274
-				add_action( 'admin_notices', array( $this , 'display_options_migrate_notice' ) , 11 );
1274
+				add_action( 'admin_notices', array( $this, 'display_options_migrate_notice' ), 11 );
1275 1275
 			}
1276 1276
 		}
1277 1277
 	}
@@ -1304,11 +1304,11 @@  discard block
 block discarded – undo
1304 1304
 
1305 1305
 			// Confirm that the necessary forms table in the database exists, else bail
1306 1306
 			global $wpdb;
1307
-			if ( $wpdb->get_var("show tables like '" . $wpdb->prefix . "yikes_easy_mc_forms'") != $wpdb->prefix . "yikes_easy_mc_forms" ) {
1307
+			if ( $wpdb->get_var( "show tables like '" . $wpdb->prefix . "yikes_easy_mc_forms'" ) != $wpdb->prefix . "yikes_easy_mc_forms" ) {
1308 1308
 				return;
1309 1309
 			}
1310 1310
 
1311
-			if ( isset( $_GET['yikes-mc-options-migration-dismissed'] ) && $_GET['yikes-mc-options-migration-dismissed'] == 'true' ) {
1311
+			if ( isset( $_GET[ 'yikes-mc-options-migration-dismissed' ] ) && $_GET[ 'yikes-mc-options-migration-dismissed' ] == 'true' ) {
1312 1312
 					// Delete the options, start a-new! (this will disable the migration notice altogether)
1313 1313
 					delete_option( 'widget_yikes_mc_widget' );
1314 1314
 					delete_option( 'api_validation' );
@@ -1322,7 +1322,7 @@  discard block
 block discarded – undo
1322 1322
 			} else {
1323 1323
 			?>
1324 1324
 				<div class="yikes-easy-mc-updated migrate-options-notice">
1325
-					<p><?php printf( __( "It looks like you're upgrading from a previous version of %s.", 'yikes-inc-easy-mailchimp-extender' ), '<strong>Us Easy Forms for MailChimp</strong>' ); ?> <?php printf( __( "In the newest version of %s, the options data structure has changed. We've also moved the mailing lists into its own database table to allow for some higher level customization. Now you can easily create multiple forms and assign them to the same mailing list." , 'yikes-inc-easy-mailchimp-extender' ), '<strong>Us Easy Forms for MailChimp</strong>' ); ?></p>
1325
+					<p><?php printf( __( "It looks like you're upgrading from a previous version of %s.", 'yikes-inc-easy-mailchimp-extender' ), '<strong>Us Easy Forms for MailChimp</strong>' ); ?> <?php printf( __( "In the newest version of %s, the options data structure has changed. We've also moved the mailing lists into its own database table to allow for some higher level customization. Now you can easily create multiple forms and assign them to the same mailing list.", 'yikes-inc-easy-mailchimp-extender' ), '<strong>Us Easy Forms for MailChimp</strong>' ); ?></p>
1326 1326
 					<p><?php _e( "Before you continue, it's strongly recommended you the perform the migration to ensure the plugin continues to function properly.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
1327 1327
 					<p><em><?php _e( "It's also strongly recommended that you take a backup of your database.", 'yikes-inc-easy-mailchimp-extender' ); ?></em></p>
1328 1328
 					<section id="migration-buttons">
@@ -1347,9 +1347,9 @@  discard block
 block discarded – undo
1347 1347
 		*	and return the index ( used to find the list name assigned to a form )
1348 1348
 		*	- http://stackoverflow.com/questions/6661530/php-multi-dimensional-array-search
1349 1349
 		*/
1350
-		function findMCListID($id, $array) {
1351
-		   foreach ($array as $key => $val) {
1352
-			   if ($val['id'] === $id) {
1350
+		function findMCListID( $id, $array ) {
1351
+		   foreach ( $array as $key => $val ) {
1352
+			   if ( $val[ 'id' ] === $id ) {
1353 1353
 				   return $key;
1354 1354
 			   }
1355 1355
 		   }
@@ -1359,8 +1359,8 @@  discard block
 block discarded – undo
1359 1359
 		/* Ajax Migrate Options */
1360 1360
 		function migrate_archived_options() {
1361 1361
 			// all options prefixed with 'yikes-mc-'
1362
-			$option_name = 'yikes-mc-'.$_POST['option_name'];
1363
-			$option_value = $_POST['option_value'];
1362
+			$option_name = 'yikes-mc-' . $_POST[ 'option_name' ];
1363
+			$option_value = $_POST[ 'option_value' ];
1364 1364
 			if ( json_decode( $option_value ) ) {
1365 1365
 				// decode our lists() array, and store it
1366 1366
 				$opt_value = json_decode( $option_value, true );
@@ -1374,22 +1374,22 @@  discard block
 block discarded – undo
1374 1374
 
1375 1375
 		/* Ajax Migrate Forms */
1376 1376
 		function migrate_previously_setup_forms() {
1377
-			$option_name = $_POST['option_name'];
1378
-			$done = $_POST['done_import'];
1377
+			$option_name = $_POST[ 'option_name' ];
1378
+			$done = $_POST[ 'done_import' ];
1379 1379
 			// Create some starter forms for the user
1380 1380
 			// based on previously imported lists (to our old version)
1381 1381
 			if ( $option_name == 'yikes-mc-lists' ) {
1382
-				$option_value = $_POST['option_value'];
1383
-				$new_options = json_decode( stripslashes_deep( $option_value ) , true );
1382
+				$option_value = $_POST[ 'option_value' ];
1383
+				$new_options = json_decode( stripslashes_deep( $option_value ), true );
1384 1384
 
1385
-				$list_id = $new_options['id'];
1386
-				$form_name = $new_options['name'];
1387
-				$fields = $new_options['fields']; // our fields array
1385
+				$list_id = $new_options[ 'id' ];
1386
+				$form_name = $new_options[ 'name' ];
1387
+				$fields = $new_options[ 'fields' ]; // our fields array
1388 1388
 
1389
-				$custom_styles = isset( $new_options['custom_styles'] ) ? $new_options['custom_styles']: '0'; // store as an array with all of our styles
1390
-				$custom_template = isset( $new_options['custom_template'] ) ? $new_options['custom_template'] : '0'; // store template data as an array ( active , template used )
1391
-				$redirect_user_on_submit = isset( $new_options['yks_mailchimp_redirect_'.$list_id] ) ? '1' : '0';
1392
-				$redirect_page = isset( $new_options['page_id_'.$list_id] ) ? $new_options['page_id_'.$list_id] : '';
1389
+				$custom_styles = isset( $new_options[ 'custom_styles' ] ) ? $new_options[ 'custom_styles' ] : '0'; // store as an array with all of our styles
1390
+				$custom_template = isset( $new_options[ 'custom_template' ] ) ? $new_options[ 'custom_template' ] : '0'; // store template data as an array ( active , template used )
1391
+				$redirect_user_on_submit = isset( $new_options[ 'yks_mailchimp_redirect_' . $list_id ] ) ? '1' : '0';
1392
+				$redirect_page = isset( $new_options[ 'page_id_' . $list_id ] ) ? $new_options[ 'page_id_' . $list_id ] : '';
1393 1393
 
1394 1394
 				/* Insert Forms Function  */
1395 1395
 				$this->form_interface->create_form( array(
@@ -1425,8 +1425,8 @@  discard block
 block discarded – undo
1425 1425
 		*	@since v5.6 - complete re-write
1426 1426
 		*/
1427 1427
 		public function generate_options_pages_sidebar_menu() {
1428
-			if ( isset( $_REQUEST['section'] ) ) {
1429
-				$selected = $_REQUEST['section'];
1428
+			if ( isset( $_REQUEST[ 'section' ] ) ) {
1429
+				$selected = $_REQUEST[ 'section' ];
1430 1430
 			}
1431 1431
 			$installed_addons = get_option( 'yikes-easy-mc-active-addons', array() );
1432 1432
 
@@ -1443,25 +1443,25 @@  discard block
 block discarded – undo
1443 1443
 				<h3><span><?php _e( 'Additional Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
1444 1444
 				<div class="inside">
1445 1445
 					<ul id="settings-nav">
1446
-						<li><?php if ( isset( $_REQUEST['section'] ) && $_REQUEST['section'] == 'general-settings' || !isset( $_REQUEST['section'] ) ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'general-settings' ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=general-settings' ) ) ); ?>"><?php _e( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1447
-						<li><?php if ( isset( $_REQUEST['section'] ) && $_REQUEST['section'] == 'integration-settings' ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'integration-settings' ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=integration-settings' ) ) ); ?>"><?php _e( 'Integration Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1448
-						<li><?php if ( isset( $_REQUEST['section'] ) && $_REQUEST['section'] == 'recaptcha-settings' ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'recaptcha-settings' ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=recaptcha-settings' ) ) ); ?>"><?php _e( 'ReCaptcha Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1449
-						<li><?php if ( isset( $_REQUEST['section'] ) && $_REQUEST['section'] == 'api-cache-settings' ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'api-cache-settings' ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=api-cache-settings' ) ) ); ?>"><?php _e( 'API Cache Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1450
-						<li><?php if ( isset( $_REQUEST['section'] ) && $_REQUEST['section'] ==  'debug-settings' ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'debug-settings' ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings' ) ) ); ?>"><?php _e( 'Debug Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1451
-						<li><?php if ( isset( $_REQUEST['section'] ) && $_REQUEST['section'] ==  'import-export-forms' ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'import-export-forms' ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=import-export-forms' ) ) ); ?>"><?php _e( 'Import/Export', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1446
+						<li><?php if ( isset( $_REQUEST[ 'section' ] ) && $_REQUEST[ 'section' ] == 'general-settings' || ! isset( $_REQUEST[ 'section' ] ) ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'general-settings' ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=general-settings' ) ) ); ?>"><?php _e( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1447
+						<li><?php if ( isset( $_REQUEST[ 'section' ] ) && $_REQUEST[ 'section' ] == 'integration-settings' ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'integration-settings' ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=integration-settings' ) ) ); ?>"><?php _e( 'Integration Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1448
+						<li><?php if ( isset( $_REQUEST[ 'section' ] ) && $_REQUEST[ 'section' ] == 'recaptcha-settings' ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'recaptcha-settings' ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=recaptcha-settings' ) ) ); ?>"><?php _e( 'ReCaptcha Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1449
+						<li><?php if ( isset( $_REQUEST[ 'section' ] ) && $_REQUEST[ 'section' ] == 'api-cache-settings' ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'api-cache-settings' ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=api-cache-settings' ) ) ); ?>"><?php _e( 'API Cache Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1450
+						<li><?php if ( isset( $_REQUEST[ 'section' ] ) && $_REQUEST[ 'section' ] == 'debug-settings' ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'debug-settings' ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings' ) ) ); ?>"><?php _e( 'Debug Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1451
+						<li><?php if ( isset( $_REQUEST[ 'section' ] ) && $_REQUEST[ 'section' ] == 'import-export-forms' ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => 'import-export-forms' ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=import-export-forms' ) ) ); ?>"><?php _e( 'Import/Export', 'yikes-inc-easy-mailchimp-extender' ); ?></a></li>
1452 1452
 					</ul>
1453 1453
 					<?php
1454 1454
 						// create our add-on settings pages
1455
-						if ( !empty( $installed_addons ) ) {
1455
+						if ( ! empty( $installed_addons ) ) {
1456 1456
 							?>
1457 1457
 							<hr class="add-on-settings-divider" />
1458 1458
 							<strong><?php _e( 'Addon Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
1459 1459
 							<ul id="addon-settings-nav">
1460 1460
 							<?php
1461
-							foreach( $installed_addons as $addon_name ) {
1461
+							foreach ( $installed_addons as $addon_name ) {
1462 1462
 								?>
1463 1463
 									<li>
1464
-										<?php if ( isset( $_REQUEST['section'] ) && $_REQUEST['section'] ==  $addon_name ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => $addon_name, 'addon' => 'true' ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section='.$addon_name ) ) ); ?>"><?php echo ucwords( str_replace( '-', ' ', $addon_name ) ); ?></a></li>
1464
+										<?php if ( isset( $_REQUEST[ 'section' ] ) && $_REQUEST[ 'section' ] == $addon_name ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => $addon_name, 'addon' => 'true' ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=' . $addon_name ) ) ); ?>"><?php echo ucwords( str_replace( '-', ' ', $addon_name ) ); ?></a></li>
1465 1465
 								<?php
1466 1466
 							}
1467 1467
 							?>
@@ -1510,19 +1510,19 @@  discard block
 block discarded – undo
1510 1510
 						<select name="associated-list" id="associated-list" class=" input-field" <?php $this->is_user_mc_api_valid_form( true ); disabled( true, empty( $lists ) ); ?>>
1511 1511
 							<?php
1512 1512
 							if ( ! empty( $lists ) ) {
1513
-								foreach( $lists as $mailing_list ) {
1513
+								foreach ( $lists as $mailing_list ) {
1514 1514
 									?>
1515
-									<option value="<?php echo $mailing_list['id']; ?>"><?php echo stripslashes( $mailing_list['name'] ) . ' (' . $mailing_list['stats']['member_count'] . ') '; ?></option>
1515
+									<option value="<?php echo $mailing_list[ 'id' ]; ?>"><?php echo stripslashes( $mailing_list[ 'name' ] ) . ' (' . $mailing_list[ 'stats' ][ 'member_count' ] . ') '; ?></option>
1516 1516
 									<?php
1517 1517
 								}
1518 1518
 							} else {
1519 1519
 								if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
1520 1520
 									?>
1521
-									<option><?php echo __( "Please enter a valid API key." , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
1521
+									<option><?php echo __( "Please enter a valid API key.", 'yikes-inc-easy-mailchimp-extender' ); ?></option>
1522 1522
 									<?php
1523 1523
 								} else {
1524 1524
 									?>
1525
-									<option><?php echo __( "No lists were found on the account." , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
1525
+									<option><?php echo __( "No lists were found on the account.", 'yikes-inc-easy-mailchimp-extender' ); ?></option>
1526 1526
 									<?php
1527 1527
 
1528 1528
 								}
@@ -1531,8 +1531,8 @@  discard block
 block discarded – undo
1531 1531
 						</select>
1532 1532
 
1533 1533
 						<?php
1534
-						if ( isset( $_GET['transient-cleared'] ) ) {
1535
-							if ( 'true' === $_GET['transient-cleared'] ) {
1534
+						if ( isset( $_GET[ 'transient-cleared' ] ) ) {
1535
+							if ( 'true' === $_GET[ 'transient-cleared' ] ) {
1536 1536
 								?>
1537 1537
 								<div class="yikes-list-refreshed-notice">
1538 1538
 									<p><?php esc_attr_e( 'MailChimp list data has been succesfully refreshed.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -1545,7 +1545,7 @@  discard block
 block discarded – undo
1545 1545
 							if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) != 'invalid_api_key' ) {
1546 1546
 								?>
1547 1547
 									<p class="description">
1548
-										<?php printf( __( 'Head over to <a href="http://www.MailChimp.com" title="%s">MailChimp</a> to create a new list.', 'yikes-inc-easy-mailchimp-extender' ) , __( 'Create a list', 'yikes-inc-easy-mailchimp-extender' ) ); ?>
1548
+										<?php printf( __( 'Head over to <a href="http://www.MailChimp.com" title="%s">MailChimp</a> to create a new list.', 'yikes-inc-easy-mailchimp-extender' ), __( 'Create a list', 'yikes-inc-easy-mailchimp-extender' ) ); ?>
1549 1549
 									</p>
1550 1550
 								<?php
1551 1551
 							}
@@ -1554,9 +1554,9 @@  discard block
 block discarded – undo
1554 1554
 					</label>
1555 1555
 					<?php
1556 1556
 						if ( $this->is_user_mc_api_valid_form( false ) ) {
1557
-							echo submit_button( __( 'Create', 'yikes-inc-easy-mailchimp-extender' ) , 'primary', '', false , array( 'style' => 'margin:.75em 0 .5em 0;' ) );
1557
+							echo submit_button( __( 'Create', 'yikes-inc-easy-mailchimp-extender' ), 'primary', '', false, array( 'style' => 'margin:.75em 0 .5em 0;' ) );
1558 1558
 						} else {
1559
-							echo '<p class="description">' . __( "Please enter a valid MailChimp API key to get started." , 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
1559
+							echo '<p class="description">' . __( "Please enter a valid MailChimp API key to get started.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
1560 1560
 							?>
1561 1561
 								<a href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&settings-updated=true' ) ); ?>"><?php _e( 'general settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
1562 1562
 							<?php
@@ -1586,7 +1586,7 @@  discard block
 block discarded – undo
1586 1586
 				$post_types = get_post_types();
1587 1587
 				?>
1588 1588
 				<label id="redirect-user-to-selection-label" for="redirect-user-to-selection" class="<?php if ( $redirect == '0' ) { echo 'yikes-easy-mc-hidden'; } ?>">
1589
-					<?php _e( "Select A Page or Post" , 'yikes-inc-easy-mailchimp-extender' ); ?>
1589
+					<?php _e( "Select A Page or Post", 'yikes-inc-easy-mailchimp-extender' ); ?>
1590 1590
 					<select id="redirect-user-to-selection" name="redirect-user-to-selection" onchange="shouldWeDisplayCustomURL( this );return;">
1591 1591
 				<?php
1592 1592
 
@@ -1602,7 +1602,7 @@  discard block
 block discarded – undo
1602 1602
 					$excluded_post_types = apply_filters( 'yikes-mailchimp-excluded-redirect-post-types', $excluded_post_types );
1603 1603
 
1604 1604
 						// loop over registered post types, and query!
1605
-						foreach( $post_types as $registered_post_type ) {
1605
+						foreach ( $post_types as $registered_post_type ) {
1606 1606
 
1607 1607
 							// exclude a few built in custom post types and any defined by the filter
1608 1608
 							if ( ! in_array( $registered_post_type, $excluded_post_types ) ) {
@@ -1624,8 +1624,8 @@  discard block
 block discarded – undo
1624 1624
 									?>
1625 1625
 										<optgroup label="<?php echo ucwords( str_replace( '_', ' ', $registered_post_type ) ); ?>">
1626 1626
 									<?php
1627
-											foreach( $post_ids as $post_id ) {
1628
-												?><option <?php selected( $redirect_page , $post_id ); ?> value="<?php echo $post_id; ?>"><?php echo get_the_title( $post_id ) ?></option><?php
1627
+											foreach ( $post_ids as $post_id ) {
1628
+												?><option <?php selected( $redirect_page, $post_id ); ?> value="<?php echo $post_id; ?>"><?php echo get_the_title( $post_id ) ?></option><?php
1629 1629
 											}
1630 1630
 									?>
1631 1631
 										</optgroup>
@@ -1641,7 +1641,7 @@  discard block
 block discarded – undo
1641 1641
 					</select>
1642 1642
 
1643 1643
 					<label name="custom-redirect-url" class="custom_redirect_url_label" <?php if ( ! isset( $redirect_page ) || $redirect_page != 'custom_url' ) { echo 'style="display:none;"'; } ?>>
1644
-						<?php _e( "Enter Custom URL" , 'yikes-inc-easy-mailchimp-extender' ); ?>
1644
+						<?php _e( "Enter Custom URL", 'yikes-inc-easy-mailchimp-extender' ); ?>
1645 1645
 						<input type="text" class="widefat custom-redirect-url" name="custom-redirect-url" value="<?php echo $custom_redirect_url; ?>" />
1646 1646
 					</label>
1647 1647
 
@@ -1699,7 +1699,7 @@  discard block
 block discarded – undo
1699 1699
 							</p>
1700 1700
 						</div>
1701 1701
 
1702
-						<p class="description sidebar-footer-text"><?php printf( __( "This plugin made with %s by %s" , 'yikes-inc-easy-mailchimp-extender' ), '<span class="dashicons dashicons-heart yikes-love"></span>', '<a href="http://www.yikesinc.com" target="_blank" title="YIKES Inc.">YIKES Inc.</a>' ); ?> </p>
1702
+						<p class="description sidebar-footer-text"><?php printf( __( "This plugin made with %s by %s", 'yikes-inc-easy-mailchimp-extender' ), '<span class="dashicons dashicons-heart yikes-love"></span>', '<a href="http://www.yikesinc.com" target="_blank" title="YIKES Inc.">YIKES Inc.</a>' ); ?> </p>
1703 1703
 
1704 1704
 						<section id="about-yikes-inc" class="inside">
1705 1705
 							<a href="https://www.yikesinc.com" target="_blank" title="YIKES Inc.">
@@ -1717,7 +1717,7 @@  discard block
 block discarded – undo
1717 1717
 						<!-- review us container -->
1718 1718
 						<h3><?php _e( 'Easy Forms for MailChimp Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
1719 1719
 						<div id="review-yikes-easy-mc" class="inside">
1720
-							<p><?php _e( "Check out available add-ons for some seriously enhanced features." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
1720
+							<p><?php _e( "Check out available add-ons for some seriously enhanced features.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
1721 1721
 							<p><a class="button-secondary" href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-addons' ) ); ?>" title="<?php _e( 'View Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'View Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
1722 1722
 						</div>
1723 1723
 
@@ -1744,11 +1744,11 @@  discard block
 block discarded – undo
1744 1744
 
1745 1745
 			// if no list id, die!
1746 1746
 			if ( ! $list_id ) {
1747
-				wp_die( __( "We've encountered an error. No list ID was sent." , 'yikes-inc-easy-mailchimp-extender' ) );
1747
+				wp_die( __( "We've encountered an error. No list ID was sent.", 'yikes-inc-easy-mailchimp-extender' ) );
1748 1748
 			}
1749 1749
 
1750 1750
 			if ( ! $merge_variables ) {
1751
-				wp_die( __( "We've encountered an error. Reload the page and try again. If the error persists, please reach out to support." , 'yikes-inc-easy-mailchimp-extender' ) );
1751
+				wp_die( __( "We've encountered an error. Reload the page and try again. If the error persists, please reach out to support.", 'yikes-inc-easy-mailchimp-extender' ) );
1752 1752
 			}
1753 1753
 
1754 1754
 			if ( ! empty( $form_fields ) ) {
@@ -1759,17 +1759,17 @@  discard block
 block discarded – undo
1759 1759
 				$available_interest_groups	= array();
1760 1760
 
1761 1761
 				// Default variables as arrays - these are used for holding the MailChimp merge field ID
1762
-				$merge_field_ids			= array();
1763
-				$mailchimp_merge_field_ids	= array();
1762
+				$merge_field_ids = array();
1763
+				$mailchimp_merge_field_ids = array();
1764 1764
 
1765 1765
 				// loop over merge variables
1766
-				if ( ! empty( $merge_variables['merge_fields'] ) ) {
1767
-					$available_merge_variables = wp_list_pluck( $merge_variables['merge_fields'], 'tag' );
1768
-					$mailchimp_merge_field_ids = wp_list_pluck( $merge_variables['merge_fields'], 'merge_id' );
1766
+				if ( ! empty( $merge_variables[ 'merge_fields' ] ) ) {
1767
+					$available_merge_variables = wp_list_pluck( $merge_variables[ 'merge_fields' ], 'tag' );
1768
+					$mailchimp_merge_field_ids = wp_list_pluck( $merge_variables[ 'merge_fields' ], 'merge_id' );
1769 1769
 					
1770 1770
 					// Array will look like $merge_tag => $merge_id
1771
-					foreach( $available_merge_variables as $index => $merge_tag ) { 
1772
-						$merge_field_ids[$merge_tag] = $mailchimp_merge_field_ids[$index];
1771
+					foreach ( $available_merge_variables as $index => $merge_tag ) { 
1772
+						$merge_field_ids[ $merge_tag ] = $mailchimp_merge_field_ids[ $index ];
1773 1773
 					}
1774 1774
 				}
1775 1775
 
@@ -1784,46 +1784,46 @@  discard block
 block discarded – undo
1784 1784
 				$excluded_fields = array_diff( $assigned_fields, $merged_fields );
1785 1785
 
1786 1786
 				$i = 1;
1787
-				foreach( $form_fields as $field ) {
1787
+				foreach ( $form_fields as $field ) {
1788 1788
 
1789
-					if ( isset( $field['merge'] ) ) {
1789
+					if ( isset( $field[ 'merge' ] ) ) {
1790 1790
 						// @todo: don't use in_array()
1791
-						$excluded_field = in_array( $field['merge'], $excluded_fields, true );
1791
+						$excluded_field = in_array( $field[ 'merge' ], $excluded_fields, true );
1792 1792
 						?>
1793
-						<section class="draggable" id="<?php echo $field['merge']; ?>">
1793
+						<section class="draggable" id="<?php echo $field[ 'merge' ]; ?>">
1794 1794
 							<!-- top -->
1795 1795
 							<a class="expansion-section-title settings-sidebar">
1796 1796
 								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span>
1797
-								<span class="yikes-mc-expansion-section-field-label"> <?php echo stripslashes( $field['label'] ); ?> </span>
1797
+								<span class="yikes-mc-expansion-section-field-label"> <?php echo stripslashes( $field[ 'label' ] ); ?> </span>
1798 1798
 								<?php if ( $excluded_field ) { ?>
1799 1799
 									<img src="<?php echo YIKES_MC_URL . 'includes/images/warning.svg'; ?>" class="field-doesnt-exist-notice" title="<?php _e( 'Field no longer exists.', 'yikes-inc-easy-mailchimp-extender' ); ?>" alt="<?php _e( 'Field no longer exists.', 'yikes-inc-easy-mailchimp-extender' ); ?>">
1800 1800
 								<?php } ?>
1801
-								<input maxlength="50" type="text" class="yikes-mc-edit-field-label-input" value="<?php echo stripslashes( $field['label'] ); ?>" />
1801
+								<input maxlength="50" type="text" class="yikes-mc-edit-field-label-input" value="<?php echo stripslashes( $field[ 'label' ] ); ?>" />
1802 1802
 								<span class="dashicons dashicons-yes yikes-mc-save-field-label-edits-icon" title="<?php _e( 'Click to save changes.', 'yikes-inc-easy-mailchimp-extender' ); ?>"></span>
1803 1803
 								<span class="dashicons dashicons-edit yikes-mc-edit-field-label-icon" title="<?php _e( 'Click to edit the label', 'yikes-inc-easy-mailchimp-extender' ); ?>"></span>
1804 1804
 								<span class="yikes-mc-edit-field-label-message"></span>
1805
-								<span class="field-type-text"><small><?php echo __( 'type', 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $field['type']; ?></small></span>
1805
+								<span class="field-type-text"><small><?php echo __( 'type', 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $field[ 'type' ]; ?></small></span>
1806 1806
 							</a>
1807 1807
 							<!-- expansion section -->
1808 1808
 							<div class="yikes-mc-settings-expansion-section">
1809 1809
 
1810 1810
 								<?php if ( $excluded_field ) { ?>
1811
-									<p class="yikes-mc-warning-message"><?php _e( "This field no longer exists in this list. Delete this field from the form to prevent issues on your website." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
1811
+									<p class="yikes-mc-warning-message"><?php _e( "This field no longer exists in this list. Delete this field from the form to prevent issues on your website.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
1812 1812
 								<?php } ?>
1813 1813
 
1814 1814
 								<!-- store field data -->
1815
-								<input type="hidden" class="yikes-mc-merge-field-label" name="field[<?php echo $field['merge']; ?>][label]" value="<?php echo htmlspecialchars( $field['label'] ); ?>" />
1816
-								<input type="hidden" class="yikes-mc-merge-field-type" name="field[<?php echo $field['merge']; ?>][type]" value="<?php echo $field['type']; ?>" />
1817
-								<input type="hidden" class="yikes-mc-merge-field-tag" name="field[<?php echo $field['merge']; ?>][merge]" value="<?php echo $field['merge']; ?>" />
1818
-								<input type="hidden" class="field-<?php echo $field['merge']; ?>-position position-input" name="field[<?php echo $field['merge']; ?>][position]" value="<?php echo $i++; ?>" />
1819
-								<?php if ( isset( $merge_field_ids[ $field['merge'] ] ) && is_int( $merge_field_ids[ $field['merge'] ] ) ) { ?> 
1820
-									<input type="hidden" class="yikes-mc-merge-field-id" name="field[<?php echo $field['merge']; ?>][id]" value="<?php echo $merge_field_ids[ $field['merge'] ] ?>" />  
1815
+								<input type="hidden" class="yikes-mc-merge-field-label" name="field[<?php echo $field[ 'merge' ]; ?>][label]" value="<?php echo htmlspecialchars( $field[ 'label' ] ); ?>" />
1816
+								<input type="hidden" class="yikes-mc-merge-field-type" name="field[<?php echo $field[ 'merge' ]; ?>][type]" value="<?php echo $field[ 'type' ]; ?>" />
1817
+								<input type="hidden" class="yikes-mc-merge-field-tag" name="field[<?php echo $field[ 'merge' ]; ?>][merge]" value="<?php echo $field[ 'merge' ]; ?>" />
1818
+								<input type="hidden" class="field-<?php echo $field[ 'merge' ]; ?>-position position-input" name="field[<?php echo $field[ 'merge' ]; ?>][position]" value="<?php echo $i++; ?>" />
1819
+								<?php if ( isset( $merge_field_ids[ $field[ 'merge' ] ] ) && is_int( $merge_field_ids[ $field[ 'merge' ] ] ) ) { ?> 
1820
+									<input type="hidden" class="yikes-mc-merge-field-id" name="field[<?php echo $field[ 'merge' ]; ?>][id]" value="<?php echo $merge_field_ids[ $field[ 'merge' ] ] ?>" />  
1821 1821
 								<?php } ?>
1822 1822
 
1823
-								<?php if ( $field['type'] == 'radio' || $field['type'] == 'dropdown' || $field['type'] == 'select' ) {
1824
-									$choices = json_decode( $field['choices'], true );
1823
+								<?php if ( $field[ 'type' ] == 'radio' || $field[ 'type' ] == 'dropdown' || $field[ 'type' ] == 'select' ) {
1824
+									$choices = json_decode( $field[ 'choices' ], true );
1825 1825
 								?>
1826
-									<input type="hidden" name="field[<?php echo $field['merge']; ?>][choices]" value='<?php echo esc_attr( json_encode( $choices ) ); ?>' />
1826
+									<input type="hidden" name="field[<?php echo $field[ 'merge' ]; ?>][choices]" value='<?php echo esc_attr( json_encode( $choices ) ); ?>' />
1827 1827
 								<?php } ?>
1828 1828
 
1829 1829
 								<!-- Single or Double Opt-in -->
@@ -1839,12 +1839,12 @@  discard block
 block discarded – undo
1839 1839
 												</label>
1840 1840
 											</td>
1841 1841
 											<td>
1842
-												<input class="widefat merge-tag-text" type="text" readonly value="<?php echo $field['merge']; ?>">
1842
+												<input class="widefat merge-tag-text" type="text" readonly value="<?php echo $field[ 'merge' ]; ?>">
1843 1843
 											</td>
1844 1844
 										</tr>
1845 1845
 
1846 1846
 										<!-- Placeholder Value -->
1847
-										<?php switch( $field['type'] ) {
1847
+										<?php switch ( $field[ 'type' ] ) {
1848 1848
 
1849 1849
 											case 'text':
1850 1850
 											case 'email':
@@ -1858,13 +1858,13 @@  discard block
 block discarded – undo
1858 1858
 										<!-- Placeholder -->
1859 1859
 										<tr valign="top">
1860 1860
 											<td scope="row">
1861
-												<label for="placeholder_<?php echo esc_attr( $field['merge'] ); ?>">
1861
+												<label for="placeholder_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
1862 1862
 													<?php _e( 'Placeholder', 'yikes-inc-easy-mailchimp-extender' ); ?>
1863 1863
 												</label>
1864 1864
 											</td>
1865 1865
 											<td>
1866
-												<input type="text" id="placeholder_<?php echo esc_attr( $field['merge'] ); ?>" class="widefat" name="field[<?php echo $field['merge']; ?>][placeholder]" value="<?php echo isset( $field['placeholder'] ) ? $field['placeholder'] : '' ; ?>" />
1867
-												<p class="description"><small><?php _e( "Assign a placeholder value to this field.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
1866
+												<input type="text" id="placeholder_<?php echo esc_attr( $field[ 'merge' ] ); ?>" class="widefat" name="field[<?php echo $field[ 'merge' ]; ?>][placeholder]" value="<?php echo isset( $field[ 'placeholder' ] ) ? $field[ 'placeholder' ] : ''; ?>" />
1867
+												<p class="description"><small><?php _e( "Assign a placeholder value to this field.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
1868 1868
 											</td>
1869 1869
 										</tr>
1870 1870
 										<?php
@@ -1875,13 +1875,13 @@  discard block
 block discarded – undo
1875 1875
 											?>
1876 1876
 												<tr valign="top">
1877 1877
 													<td scope="row">
1878
-														<label for="placeholder_<?php echo esc_attr( $field['merge'] ); ?>">
1878
+														<label for="placeholder_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
1879 1879
 															<?php _e( 'Placeholder', 'yikes-inc-easy-mailchimp-extender' ); ?>
1880 1880
 														</label>
1881 1881
 													</td>
1882 1882
 													<td>
1883
-														<input type="checkbox" id="placeholder_<?php echo esc_attr( $field['merge'] ); ?>" class="widefat" name="field[<?php echo $field['merge']; ?>][placeholder]" value="1" <?php echo isset( $field['placeholder'] ) && ! empty( $field['placeholder'] ) ? 'checked="checked"' : '' ; ?> />
1884
-														<span class="description"><small><?php _e( "Use placeholders for this field (these will be automatically filled in with field names).", 'yikes-inc-easy-mailchimp-extender' );?></small></span>
1883
+														<input type="checkbox" id="placeholder_<?php echo esc_attr( $field[ 'merge' ] ); ?>" class="widefat" name="field[<?php echo $field[ 'merge' ]; ?>][placeholder]" value="1" <?php echo isset( $field[ 'placeholder' ] ) && ! empty( $field[ 'placeholder' ] ) ? 'checked="checked"' : ''; ?> />
1884
+														<span class="description"><small><?php _e( "Use placeholders for this field (these will be automatically filled in with field names).", 'yikes-inc-easy-mailchimp-extender' ); ?></small></span>
1885 1885
 													</td>
1886 1886
 												</tr>
1887 1887
 											<?php
@@ -1891,7 +1891,7 @@  discard block
 block discarded – undo
1891 1891
 										?>
1892 1892
 
1893 1893
 										<!-- Default Value -->
1894
-										<?php switch( $field['type'] ) {
1894
+										<?php switch ( $field[ 'type' ] ) {
1895 1895
 											default:
1896 1896
 											case 'text':
1897 1897
 											case 'number':
@@ -1899,15 +1899,15 @@  discard block
 block discarded – undo
1899 1899
 										?>
1900 1900
 											<tr valign="top">
1901 1901
 												<td scope="row">
1902
-													<label for="default_value_<?php echo esc_attr( $field['merge'] ); ?>">
1902
+													<label for="default_value_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
1903 1903
 														<?php _e( 'Default Value', 'yikes-inc-easy-mailchimp-extender' ); ?>
1904 1904
 													</label>
1905 1905
 												</td>
1906 1906
 												<td>
1907
-													<input id="default_value_<?php echo esc_attr( $field['merge'] ); ?>" <?php if ( $field['type'] != 'number' ) { ?> type="text" <?php } else { ?> type="number" <?php } ?> class="widefat" name="field[<?php echo $field['merge']; ?>][default]" <?php if ( $field['type'] != 'url' ) { ?> value="<?php echo isset( $field['default'] ) ? stripslashes( wp_strip_all_tags( $field['default'] ) ) : ''; ?>" <?php } else { ?> value="<?php echo isset( $field['default'] ) ? stripslashes( wp_strip_all_tags( esc_url_raw( $field['default'] ) ) ) : ''; ?>" <?php } ?> />
1908
-													<p class="description"><small><?php _e( "Assign a default value to populate this field with on initial page load.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
1907
+													<input id="default_value_<?php echo esc_attr( $field[ 'merge' ] ); ?>" <?php if ( $field[ 'type' ] != 'number' ) { ?> type="text" <?php } else { ?> type="number" <?php } ?> class="widefat" name="field[<?php echo $field[ 'merge' ]; ?>][default]" <?php if ( $field[ 'type' ] != 'url' ) { ?> value="<?php echo isset( $field[ 'default' ] ) ? stripslashes( wp_strip_all_tags( $field[ 'default' ] ) ) : ''; ?>" <?php } else { ?> value="<?php echo isset( $field[ 'default' ] ) ? stripslashes( wp_strip_all_tags( esc_url_raw( $field[ 'default' ] ) ) ) : ''; ?>" <?php } ?> />
1908
+													<p class="description"><small><?php _e( "Assign a default value to populate this field with on initial page load.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
1909 1909
 													<?php
1910
-													switch( $field['type'] ) {
1910
+													switch ( $field[ 'type' ] ) {
1911 1911
 														case 'text':
1912 1912
 															?>
1913 1913
 																<p><small class="pre-defined-tag-link"><a href="#TB_inline?width=600&height=550&inlineId=pre-defined-tag-container" onclick="storeGlobalClicked( jQuery( this ) );" class="thickbox"><?php _e( 'View Pre-Defined Tags', 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
@@ -1929,28 +1929,28 @@  discard block
 block discarded – undo
1929 1929
 													</td>
1930 1930
 													<td>
1931 1931
 														<?php
1932
-															$field['default_choice'] = ! isset( $field['default_choice'] ) ? 'no-default' : $field['default_choice'];
1932
+															$field[ 'default_choice' ] = ! isset( $field[ 'default_choice' ] ) ? 'no-default' : $field[ 'default_choice' ];
1933 1933
 															$x = 0;
1934 1934
 														?>
1935
-														<label for="<?php echo $field['merge'] . '-no-default'; ?>">
1936
-															<input id="<?php echo $field['merge'] . '-no-default'; ?>"
1935
+														<label for="<?php echo $field[ 'merge' ] . '-no-default'; ?>">
1936
+															<input id="<?php echo $field[ 'merge' ] . '-no-default'; ?>"
1937 1937
 															       type="radio"
1938
-															       name="field[<?php echo $field['merge']; ?>][default_choice]"
1939
-															       value="no-default" <?php checked( $field['default_choice'], 'no-default' ); ?>
1938
+															       name="field[<?php echo $field[ 'merge' ]; ?>][default_choice]"
1939
+															       value="no-default" <?php checked( $field[ 'default_choice' ], 'no-default' ); ?>
1940 1940
 															>
1941 1941
 															No Default&nbsp;
1942 1942
 														</label>
1943 1943
 														<?php
1944 1944
 														foreach ( $choices as $choice => $value ) { ?>
1945
-															<label for="<?php echo $field['merge'].'-'.$x; ?>">
1946
-																<input id="<?php echo $field['merge'].'-'.$x; ?>"
1945
+															<label for="<?php echo $field[ 'merge' ] . '-' . $x; ?>">
1946
+																<input id="<?php echo $field[ 'merge' ] . '-' . $x; ?>"
1947 1947
 																       type="radio"
1948
-																       name="field[<?php echo $field['merge']; ?>][default_choice]"
1949
-																       value="<?php echo $x; ?>" <?php checked( $field['default_choice'], $x ); ?>>
1948
+																       name="field[<?php echo $field[ 'merge' ]; ?>][default_choice]"
1949
+																       value="<?php echo $x; ?>" <?php checked( $field[ 'default_choice' ], $x ); ?>>
1950 1950
 																<?php echo $value; ?>&nbsp;
1951 1951
 															</label>
1952 1952
 														<?php $x++; } ?>
1953
-														<p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
1953
+														<p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
1954 1954
 													</td>
1955 1955
 												</tr>
1956 1956
 
@@ -1966,13 +1966,13 @@  discard block
 block discarded – undo
1966 1966
 														</label>
1967 1967
 													</td>
1968 1968
 													<td>
1969
-														<select type="default" name="field[<?php echo $field['merge']; ?>][default_choice]">
1970
-															<option value="no-default" <?php selected( $field['default_choice'] , 'no-default' ); ?>>No Default</option>
1971
-															<?php foreach( json_decode( $field['choices'], true ) as $choice => $value ) { ?>
1972
-																<option value="<?php echo $choice; ?>" <?php selected( $field['default_choice'] , $choice ); ?>><?php echo $value; ?></option>
1969
+														<select type="default" name="field[<?php echo $field[ 'merge' ]; ?>][default_choice]">
1970
+															<option value="no-default" <?php selected( $field[ 'default_choice' ], 'no-default' ); ?>>No Default</option>
1971
+															<?php foreach ( json_decode( $field[ 'choices' ], true ) as $choice => $value ) { ?>
1972
+																<option value="<?php echo $choice; ?>" <?php selected( $field[ 'default_choice' ], $choice ); ?>><?php echo $value; ?></option>
1973 1973
 															<?php } ?>
1974 1974
 														</select>
1975
-														<p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
1975
+														<p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
1976 1976
 													</td>
1977 1977
 												</tr>
1978 1978
 
@@ -1989,82 +1989,82 @@  discard block
 block discarded – undo
1989 1989
 										<!-- Field Description -->
1990 1990
 										<tr valign="top">
1991 1991
 											<td scope="row">
1992
-												<label for="description_<?php echo esc_attr( $field['merge'] ); ?>">
1992
+												<label for="description_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
1993 1993
 													<?php _e( 'Description', 'yikes-inc-easy-mailchimp-extender' ); ?>
1994 1994
 												</label>
1995 1995
 											</td>
1996 1996
 											<td>
1997
-												<textarea class="widefat field-description-input" id="description_<?php echo esc_attr( $field['merge'] ); ?>" name="field[<?php echo $field['merge']; ?>][description]"><?php echo isset( $field['description'] ) ? stripslashes( esc_html( $field['description'] ) ) : '' ; ?></textarea>
1998
-												<p class="description"><small><?php _e( "Enter the description for the form field. This will be displayed to the user and will provide some direction on how the field should be filled out or selected.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
1997
+												<textarea class="widefat field-description-input" id="description_<?php echo esc_attr( $field[ 'merge' ] ); ?>" name="field[<?php echo $field[ 'merge' ]; ?>][description]"><?php echo isset( $field[ 'description' ] ) ? stripslashes( esc_html( $field[ 'description' ] ) ) : ''; ?></textarea>
1998
+												<p class="description"><small><?php _e( "Enter the description for the form field. This will be displayed to the user and will provide some direction on how the field should be filled out or selected.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
1999 1999
 											</td>
2000 2000
 										</tr>
2001 2001
 										<!-- Description Above Field -->
2002 2002
 										<tr valign="top">
2003 2003
 											<td scope="row">
2004
-												<label for="description_above_<?php echo esc_attr( $field['merge'] ); ?>">
2004
+												<label for="description_above_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
2005 2005
 													<?php _e( 'Description Above Field', 'yikes-inc-easy-mailchimp-extender' ); ?>
2006 2006
 												</label>
2007 2007
 											</td>
2008 2008
 											<td>
2009
-												<input type="checkbox" id="description_above_<?php echo esc_attr( $field['merge'] ); ?>" class="widefat field-description-input" name="field[<?php echo $field['merge']; ?>][description_above]" value="1" <?php echo isset( $field['description_above'] ) && $field['description_above'] === '1' ? 'checked="checked"' : ''; ?> />
2010
-												<span class="description"><small><?php _e( "By default the description will appear undearneath the field. Check this box if you'd like the description to appear above the field.", 'yikes-inc-easy-mailchimp-extender' );?></small></span>
2009
+												<input type="checkbox" id="description_above_<?php echo esc_attr( $field[ 'merge' ] ); ?>" class="widefat field-description-input" name="field[<?php echo $field[ 'merge' ]; ?>][description_above]" value="1" <?php echo isset( $field[ 'description_above' ] ) && $field[ 'description_above' ] === '1' ? 'checked="checked"' : ''; ?> />
2010
+												<span class="description"><small><?php _e( "By default the description will appear undearneath the field. Check this box if you'd like the description to appear above the field.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></span>
2011 2011
 											</td>
2012 2012
 										</tr>
2013 2013
 										<!-- Additional Classes -->
2014 2014
 										<tr valign="top">
2015 2015
 											<td scope="row">
2016
-												<label for="classes_<?php echo esc_attr( $field['merge'] ); ?>">
2016
+												<label for="classes_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
2017 2017
 													<?php _e( 'Additional Classes', 'yikes-inc-easy-mailchimp-extender' ); ?>
2018 2018
 												</label>
2019 2019
 											</td>
2020 2020
 											<td>
2021
-												<input type="text" id="classes_<?php echo esc_attr( $field['merge'] ); ?>" class="widefat" name="field[<?php echo $field['merge']; ?>][additional-classes]" value="<?php echo isset( $field['additional-classes'] ) ? stripslashes( wp_strip_all_tags( $field['additional-classes'] ) ) : '' ; ?>" />
2022
-												<p class="description"><small><?php printf( __( "Assign additional classes to this field. %s.", 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/bundled-css-classes/' ) . '">' . __( 'View bundled classes', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' );?></small></p>
2021
+												<input type="text" id="classes_<?php echo esc_attr( $field[ 'merge' ] ); ?>" class="widefat" name="field[<?php echo $field[ 'merge' ]; ?>][additional-classes]" value="<?php echo isset( $field[ 'additional-classes' ] ) ? stripslashes( wp_strip_all_tags( $field[ 'additional-classes' ] ) ) : ''; ?>" />
2022
+												<p class="description"><small><?php printf( __( "Assign additional classes to this field. %s.", 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/bundled-css-classes/' ) . '">' . __( 'View bundled classes', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' ); ?></small></p>
2023 2023
 											</td>
2024 2024
 										</tr>
2025 2025
 										<!-- Required Toggle -->
2026 2026
 										<tr valign="top" class="yikes-checkbox-container yikes-checkbox-container-first">
2027 2027
 											<td scope="row">
2028
-												<label for="field-required-<?php echo esc_attr( $field['merge'] ); ?>">
2028
+												<label for="field-required-<?php echo esc_attr( $field[ 'merge' ] ); ?>">
2029 2029
 													<?php _e( 'Field Required?', 'yikes-inc-easy-mailchimp-extender' ); ?>
2030 2030
 												</label>
2031 2031
 											</td>
2032 2032
 											<td>
2033
-												<?php $checked = isset( $field['require'] ) ? $field['require'] : '0'; ?>
2034
-												<input id="field-required-<?php echo esc_attr( $field['merge'] ); ?>" type="checkbox" class="widefat" value="1" name="field[<?php echo $field['merge']; ?>][require]" <?php checked( $checked , 1 ); ?> <?php if ( $field['merge'] == 'EMAIL' ) {  ?> disabled="disabled" checked="checked" title="<?php echo __( 'Email is a required field.', 'yikes-inc-easy-mailchimp-extender' ); } ?>">
2035
-												<p class="description"><small><?php _e( "Require this field to be filled in before the form can be submitted.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2033
+												<?php $checked = isset( $field[ 'require' ] ) ? $field[ 'require' ] : '0'; ?>
2034
+												<input id="field-required-<?php echo esc_attr( $field[ 'merge' ] ); ?>" type="checkbox" class="widefat" value="1" name="field[<?php echo $field[ 'merge' ]; ?>][require]" <?php checked( $checked, 1 ); ?> <?php if ( $field[ 'merge' ] == 'EMAIL' ) {  ?> disabled="disabled" checked="checked" title="<?php echo __( 'Email is a required field.', 'yikes-inc-easy-mailchimp-extender' ); } ?>">
2035
+												<p class="description"><small><?php _e( "Require this field to be filled in before the form can be submitted.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2036 2036
 											</td>
2037 2037
 										</tr>
2038 2038
 										<!-- Visible Toggle -->
2039 2039
 										<tr valign="top" class="yikes-checkbox-container">
2040 2040
 											<td scope="row">
2041
-												<label for="hide-field-<?php echo esc_attr( $field['merge'] ); ?>">
2041
+												<label for="hide-field-<?php echo esc_attr( $field[ 'merge' ] ); ?>">
2042 2042
 													<?php _e( 'Hide Field', 'yikes-inc-easy-mailchimp-extender' ); ?>
2043 2043
 												</label>
2044 2044
 											</td>
2045 2045
 											<td>
2046
-												<?php $hide = isset( $field['hide'] ) ? $field['hide'] : '0'; ?>
2047
-												<input id="hide-field-<?php echo esc_attr( $field['merge'] ); ?>" type="checkbox" class="widefat" value="1" name="field[<?php echo $field['merge']; ?>][hide]" <?php checked( $hide , 1 ); ?> <?php if ( $field['merge'] == 'EMAIL' ) {  ?> disabled="disabled" title="<?php echo __( 'Cannot toggle email field visibility.', 'yikes-inc-easy-mailchimp-extender' ); } ?>">
2048
-												<p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2046
+												<?php $hide = isset( $field[ 'hide' ] ) ? $field[ 'hide' ] : '0'; ?>
2047
+												<input id="hide-field-<?php echo esc_attr( $field[ 'merge' ] ); ?>" type="checkbox" class="widefat" value="1" name="field[<?php echo $field[ 'merge' ]; ?>][hide]" <?php checked( $hide, 1 ); ?> <?php if ( $field[ 'merge' ] == 'EMAIL' ) {  ?> disabled="disabled" title="<?php echo __( 'Cannot toggle email field visibility.', 'yikes-inc-easy-mailchimp-extender' ); } ?>">
2048
+												<p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2049 2049
 											</td>
2050 2050
 										</tr>
2051 2051
 										<!-- Toggle Field Label Visibility -->
2052 2052
 										<tr valign="top" class="yikes-checkbox-container">
2053 2053
 											<td scope="row">
2054
-												<label for="hide-label-<?php echo esc_attr( $field['merge'] ); ?>">
2054
+												<label for="hide-label-<?php echo esc_attr( $field[ 'merge' ] ); ?>">
2055 2055
 													<?php _e( 'Hide Label', 'yikes-inc-easy-mailchimp-extender' ); ?>
2056 2056
 												</label>
2057 2057
 											</td>
2058 2058
 											<td>
2059
-												<?php $hide_label = isset( $field['hide-label'] ) ? $field['hide-label'] : '0'; ?>
2060
-												<input id="hide-label-<?php echo esc_attr( $field['merge'] ); ?>" type="checkbox" name="field[<?php echo $field['merge']; ?>][hide-label]" value="1" <?php checked( $hide_label , 1 ); ?>/>
2061
-												<p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2059
+												<?php $hide_label = isset( $field[ 'hide-label' ] ) ? $field[ 'hide-label' ] : '0'; ?>
2060
+												<input id="hide-label-<?php echo esc_attr( $field[ 'merge' ] ); ?>" type="checkbox" name="field[<?php echo $field[ 'merge' ]; ?>][hide-label]" value="1" <?php checked( $hide_label, 1 ); ?>/>
2061
+												<p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2062 2062
 											</td>
2063 2063
 										</tr>
2064 2064
 										<!-- Display Phone/Date Formats back to the user -->
2065 2065
 										<!-- Phone Format Initial Load -->
2066 2066
 										<?php
2067
-											switch( $field['type'] ) {
2067
+											switch ( $field[ 'type' ] ) {
2068 2068
 												/* Store the phone format, for properly regex pattern */
2069 2069
 												case 'phone':
2070 2070
 												case 'birthday':
@@ -2074,23 +2074,23 @@  discard block
 block discarded – undo
2074 2074
 															<td scope="row">
2075 2075
 																<label for="placeholder">
2076 2076
 																	<?php
2077
-																		switch( $field['type'] ) {
2077
+																		switch ( $field[ 'type' ] ) {
2078 2078
 																			default:
2079 2079
 																			case 'birthday':
2080 2080
 																				$type = __( 'Date Format', 'yikes-inc-easy-mailchimp-extender' );
2081
-																				$format = ( isset( $field['date_format'] ) ) ? $field['date_format'] : 'MM/DD';
2081
+																				$format = ( isset( $field[ 'date_format' ] ) ) ? $field[ 'date_format' ] : 'MM/DD';
2082 2082
 																				$format_name = 'date_format';
2083 2083
 																				break;
2084 2084
 
2085 2085
 																			case 'date':
2086 2086
 																				$type = __( 'Date Format', 'yikes-inc-easy-mailchimp-extender' );
2087
-																				$format = ( isset( $field['date_format'] ) ) ? $field['date_format'] : 'MM/DD/YYYY';
2087
+																				$format = ( isset( $field[ 'date_format' ] ) ) ? $field[ 'date_format' ] : 'MM/DD/YYYY';
2088 2088
 																				$format_name = 'date_format';
2089 2089
 																				break;
2090 2090
 
2091 2091
 																			case 'phone':
2092 2092
 																				$type = __( 'Phone Format', 'yikes-inc-easy-mailchimp-extender' );
2093
-																				$format = isset( $field['phone_format'] ) && ! empty( $field['phone_format'] ) ? $field['phone_format'] : __( 'International', 'yikes-inc-easy-mailchimp-extender' );
2093
+																				$format = isset( $field[ 'phone_format' ] ) && ! empty( $field[ 'phone_format' ] ) ? $field[ 'phone_format' ] : __( 'International', 'yikes-inc-easy-mailchimp-extender' );
2094 2094
 																				$format_name = 'phone_format';
2095 2095
 																				break;
2096 2096
 																		}
@@ -2100,7 +2100,7 @@  discard block
 block discarded – undo
2100 2100
 															</td>
2101 2101
 															<td>
2102 2102
 																<strong><?php echo $format; ?></strong>
2103
-																<input type="hidden" name="field[<?php echo $field['merge']; ?>][<?php echo $format_name; ?>]" value="<?php echo $format; ?>" />
2103
+																<input type="hidden" name="field[<?php echo $field[ 'merge' ]; ?>][<?php echo $format_name; ?>]" value="<?php echo $format; ?>" />
2104 2104
 																<p class="description"><small>
2105 2105
 																	<?php printf( __( 'To change the %s please head over to <a href="%s" title="MailChimp" target="_blank">MailChimp</a>. If you alter the format, you should re-import this field.', 'yikes-inc-easy-mailchimp-extender' ), strtolower( $type ), esc_url( 'http://www.mailchimp.com' ) ); ?>
2106 2106
 																</small></p>
@@ -2121,8 +2121,8 @@  discard block
 block discarded – undo
2121 2121
 											</td>
2122 2122
 											<td>
2123 2123
 												<span class="toggle-container">
2124
-													<a href="#" class="close-form-expansion"><?php _e( "Close" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
2125
-													<a href="#" class="remove-field" alt="<?php echo $field['merge']; ?>"><?php _e( "Remove Field" , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
2124
+													<a href="#" class="close-form-expansion"><?php _e( "Close", 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
2125
+													<a href="#" class="remove-field" alt="<?php echo $field[ 'merge' ]; ?>"><?php _e( "Remove Field", 'yikes-inc-easy-mailchimp-extender' ); ?></a>
2126 2126
 												</span>
2127 2127
 											</td>
2128 2128
 										</tr>
@@ -2140,35 +2140,35 @@  discard block
 block discarded – undo
2140 2140
 						/**** Interest Group ****/
2141 2141
 
2142 2142
 						?>
2143
-						<section class="draggable" id="<?php echo $field['group_id']; ?>">
2143
+						<section class="draggable" id="<?php echo $field[ 'group_id' ]; ?>">
2144 2144
 							<!-- top -->
2145 2145
 							<a href="#" class="expansion-section-title settings-sidebar">
2146
-								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php echo stripslashes( $field['label'] ); ?>
2147
-								<?php if ( in_array( $field['group_id'] , $excluded_fields ) ) { ?>
2146
+								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php echo stripslashes( $field[ 'label' ] ); ?>
2147
+								<?php if ( in_array( $field[ 'group_id' ], $excluded_fields ) ) { ?>
2148 2148
 									<img src="<?php echo YIKES_MC_URL . 'includes/images/warning.svg'; ?>" class="field-no-longer-exists-warning" title="<?php _e( 'Field no longer exists.', 'yikes-inc-easy-mailchimp-extender' ); ?>" alt="<?php _e( 'Field no longer exists.', 'yikes-inc-easy-mailchimp-extender' ); ?>">
2149 2149
 								<?php } ?>
2150
-								<span class="field-type-text"><small><?php echo __( 'type', 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $field['type']; ?></small></span>
2150
+								<span class="field-type-text"><small><?php echo __( 'type', 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $field[ 'type' ]; ?></small></span>
2151 2151
 							</a>
2152 2152
 							<!-- expansion section -->
2153 2153
 							<div class="yikes-mc-settings-expansion-section">
2154 2154
 
2155 2155
 								<!-- check if this field exists in the available interest group array -->
2156
-								<?php if ( in_array( $field['group_id'] , $excluded_fields ) ) { ?>
2157
-									<p class="yikes-mc-warning-message"><?php _e( "This field no longer exists in this list. Delete this field from the form to prevent issues on the front end." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
2156
+								<?php if ( in_array( $field[ 'group_id' ], $excluded_fields ) ) { ?>
2157
+									<p class="yikes-mc-warning-message"><?php _e( "This field no longer exists in this list. Delete this field from the form to prevent issues on the front end.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
2158 2158
 								<?php } ?>
2159 2159
 
2160 2160
 								<!-- store the label -->
2161
-								<input type="hidden" name="field[<?php echo $field['group_id']; ?>][label]" value="<?php echo htmlspecialchars( $field['label'] ); ?>" />
2162
-								<input type="hidden" name="field[<?php echo $field['group_id']; ?>][type]" value="<?php echo $field['type']; ?>" />
2163
-								<input type="hidden" name="field[<?php echo $field['group_id']; ?>][group_id]" value="<?php echo $field['group_id']; ?>" />
2164
-								<input type="hidden" name="field[<?php echo $field['group_id']; ?>][groups]" value='<?php echo esc_attr( json_encode( json_decode( $field['groups'], true ) ) ); ?>' />
2161
+								<input type="hidden" name="field[<?php echo $field[ 'group_id' ]; ?>][label]" value="<?php echo htmlspecialchars( $field[ 'label' ] ); ?>" />
2162
+								<input type="hidden" name="field[<?php echo $field[ 'group_id' ]; ?>][type]" value="<?php echo $field[ 'type' ]; ?>" />
2163
+								<input type="hidden" name="field[<?php echo $field[ 'group_id' ]; ?>][group_id]" value="<?php echo $field[ 'group_id' ]; ?>" />
2164
+								<input type="hidden" name="field[<?php echo $field[ 'group_id' ]; ?>][groups]" value='<?php echo esc_attr( json_encode( json_decode( $field[ 'groups' ], true ) ) ); ?>' />
2165 2165
 
2166 2166
 								<!-- Single or Double Opt-in -->
2167 2167
 								<p class="type-container"><!-- necessary to prevent skipping on slideToggle(); -->
2168 2168
 
2169 2169
 									<table class="form-table form-field-container">
2170 2170
 										<!-- Default Value -->
2171
-										<?php switch( $field['type'] ) {
2171
+										<?php switch ( $field[ 'type' ] ) {
2172 2172
 											default:
2173 2173
 											case 'radio':
2174 2174
 											case 'checkboxes':
@@ -2181,15 +2181,15 @@  discard block
 block discarded – undo
2181 2181
 													</td>
2182 2182
 													<td>
2183 2183
 														<?php
2184
-														$field['default_choice'] = isset( $field['default_choice'] ) ? $field['default_choice'] : '';
2184
+														$field[ 'default_choice' ] = isset( $field[ 'default_choice' ] ) ? $field[ 'default_choice' ] : '';
2185 2185
 
2186 2186
 														$default_shown = false;
2187 2187
 
2188
-														foreach ( json_decode( $field['groups'], true ) as $id => $group ) {
2189
-															$field_id   = "{$field['group_id']}-{$id}";
2190
-															$field_type = 'hidden' == $field['type'] ? 'checkbox' : $field['type'];
2188
+														foreach ( json_decode( $field[ 'groups' ], true ) as $id => $group ) {
2189
+															$field_id   = "{$field[ 'group_id' ]}-{$id}";
2190
+															$field_type = 'hidden' == $field[ 'type' ] ? 'checkbox' : $field[ 'type' ];
2191 2191
 															$field_type = 'checkboxes' == $field_type ? 'checkbox' : $field_type;
2192
-															$field_name = "field[{$field['group_id']}][default_choice]";
2192
+															$field_name = "field[{$field[ 'group_id' ]}][default_choice]";
2193 2193
 															$field_name = 'checkbox' == $field_type ? $field_name . '[]' : $field_name;
2194 2194
 
2195 2195
 															// Determine if the current group is checked.
@@ -2197,13 +2197,13 @@  discard block
 block discarded – undo
2197 2197
 															switch ( $field_type ) {
2198 2198
 																case 'radio':
2199 2199
 																default:
2200
-																	$default = is_array( $field['default_choice'] ) ? current( $field['default_choice'] ) : $field['default_choice'];
2201
-																	$checked = is_array( $field['default_choice'] ) ? checked( current( $field['default_choice'] ), $id, false ) : checked( $field['default_choice'], $id, false );
2200
+																	$default = is_array( $field[ 'default_choice' ] ) ? current( $field[ 'default_choice' ] ) : $field[ 'default_choice' ];
2201
+																	$checked = is_array( $field[ 'default_choice' ] ) ? checked( current( $field[ 'default_choice' ] ), $id, false ) : checked( $field[ 'default_choice' ], $id, false );
2202 2202
 																break;
2203 2203
 
2204 2204
 																case 'checkbox':
2205 2205
 																case 'hidden':
2206
-																	if ( is_array( $field['default_choice'] ) && in_array( $id, $field['default_choice'] ) ) {
2206
+																	if ( is_array( $field[ 'default_choice' ] ) && in_array( $id, $field[ 'default_choice' ] ) ) {
2207 2207
 																		$checked = checked( true, true, false );
2208 2208
 																	}
2209 2209
 																break;
@@ -2218,7 +2218,7 @@  discard block
 block discarded – undo
2218 2218
 																	    type="<?php echo $field_type; ?>"
2219 2219
 																	    name="<?php echo $field_name; ?>"
2220 2220
 																	    value="no-default" 
2221
-																	    <?php is_array( $field['default_choice'] ) ? checked( current( $field['default_choice'] ), 'no-default' ) : checked( $field['default_choice'], 'no-default' ); ?>>
2221
+																	    <?php is_array( $field[ 'default_choice' ] ) ? checked( current( $field[ 'default_choice' ] ), 'no-default' ) : checked( $field[ 'default_choice' ], 'no-default' ); ?>>
2222 2222
 																	No Default&nbsp;
2223 2223
 																</label>
2224 2224
 																<?php
@@ -2234,7 +2234,7 @@  discard block
 block discarded – undo
2234 2234
 															</label>
2235 2235
 															<?php
2236 2236
 														} ?>
2237
-														<p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2237
+														<p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2238 2238
 													</td>
2239 2239
 												</tr>
2240 2240
 
@@ -2250,13 +2250,13 @@  discard block
 block discarded – undo
2250 2250
 														</label>
2251 2251
 													</td>
2252 2252
 													<td>
2253
-														<select type="default" name="field[<?php echo $field['group_id']; ?>][default_choice]">
2253
+														<select type="default" name="field[<?php echo $field[ 'group_id' ]; ?>][default_choice]">
2254 2254
 															<option value="no-default">No Default</option>
2255
-															<?php foreach( json_decode( stripslashes_deep( $field['groups'] ) , true ) as $id => $group ) { ?>
2256
-																<option value="<?php echo $id; ?>" <?php selected( $field['default_choice'] , $id ); ?>><?php echo stripslashes( $group ); ?></option>
2255
+															<?php foreach ( json_decode( stripslashes_deep( $field[ 'groups' ] ), true ) as $id => $group ) { ?>
2256
+																<option value="<?php echo $id; ?>" <?php selected( $field[ 'default_choice' ], $id ); ?>><?php echo stripslashes( $group ); ?></option>
2257 2257
 															<?php } ?>
2258 2258
 														</select>
2259
-														<p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2259
+														<p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2260 2260
 													</td>
2261 2261
 												</tr>
2262 2262
 
@@ -2269,78 +2269,78 @@  discard block
 block discarded – undo
2269 2269
 										<!-- Field Description -->
2270 2270
 										<tr valign="top">
2271 2271
 											<td scope="row">
2272
-												<label for="description_<?php echo esc_attr( $field['group_id'] ); ?>">
2272
+												<label for="description_<?php echo esc_attr( $field[ 'group_id' ] ); ?>">
2273 2273
 													<?php _e( 'Description', 'yikes-inc-easy-mailchimp-extender' ); ?>
2274 2274
 												</label>
2275 2275
 											</td>
2276 2276
 											<td>
2277
-												<textarea id="description_<?php echo esc_attr( $field['group_id'] ); ?>" class="widefat field-description-input" name="field[<?php echo $field['group_id']; ?>][description]"><?php echo isset( $field['description'] ) ? stripslashes( esc_html( $field['description'] ) ) : '' ; ?></textarea>
2278
-												<p class="description"><small><?php _e( "Enter the description for the form field. This will be displayed to the user and provide some direction on how the field should be filled out or selected.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2277
+												<textarea id="description_<?php echo esc_attr( $field[ 'group_id' ] ); ?>" class="widefat field-description-input" name="field[<?php echo $field[ 'group_id' ]; ?>][description]"><?php echo isset( $field[ 'description' ] ) ? stripslashes( esc_html( $field[ 'description' ] ) ) : ''; ?></textarea>
2278
+												<p class="description"><small><?php _e( "Enter the description for the form field. This will be displayed to the user and provide some direction on how the field should be filled out or selected.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2279 2279
 											</td>
2280 2280
 										</tr>
2281 2281
 
2282 2282
 										<!-- Description Above Field -->
2283 2283
 										<tr valign="top">
2284 2284
 											<td scope="row">
2285
-												<label for="description_above_<?php echo $field['group_id']; ?>">
2285
+												<label for="description_above_<?php echo $field[ 'group_id' ]; ?>">
2286 2286
 													<?php _e( 'Description Above Field', 'yikes-inc-easy-mailchimp-extender' ); ?>
2287 2287
 												</label>
2288 2288
 											</td>
2289 2289
 											<td>
2290
-												<input type="checkbox" id="description_above_<?php echo $field['group_id']; ?>" class="widefat field-description-input" name="field[<?php echo $field['group_id']; ?>][description_above]" value="1" <?php echo isset( $field['description_above'] ) && $field['description_above'] === '1' ? 'checked="checked"' : ''; ?> />
2291
-												<span class="description"><small><?php _e( "By default the description will appear undearneath the field. Check this box if you'd like the description to appear above the field.", 'yikes-inc-easy-mailchimp-extender' );?></small></span>
2290
+												<input type="checkbox" id="description_above_<?php echo $field[ 'group_id' ]; ?>" class="widefat field-description-input" name="field[<?php echo $field[ 'group_id' ]; ?>][description_above]" value="1" <?php echo isset( $field[ 'description_above' ] ) && $field[ 'description_above' ] === '1' ? 'checked="checked"' : ''; ?> />
2291
+												<span class="description"><small><?php _e( "By default the description will appear undearneath the field. Check this box if you'd like the description to appear above the field.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></span>
2292 2292
 											</td>
2293 2293
 										</tr>
2294 2294
 
2295 2295
 										<!-- Additional Classes -->
2296 2296
 										<tr valign="top">
2297 2297
 											<td scope="row">
2298
-												<label for="classes_<?php echo esc_attr( $field['group_id'] ); ?>">
2298
+												<label for="classes_<?php echo esc_attr( $field[ 'group_id' ] ); ?>">
2299 2299
 													<?php _e( 'Additional Classes', 'yikes-inc-easy-mailchimp-extender' ); ?>
2300 2300
 												</label>
2301 2301
 											</td>
2302 2302
 											<td>
2303
-												<input type="text" id="classes_<?php echo esc_attr( $field['group_id'] ); ?>" class="widefat" name="field[<?php echo $field['group_id']; ?>][additional-classes]" value="<?php echo isset( $field['additional-classes'] ) ? stripslashes( wp_strip_all_tags( $field['additional-classes'] ) ) : '' ; ?>" />
2304
-												<p class="description"><small><?php printf( __( "Assign additional classes to this field. %s.", 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/bundled-css-classes/' ) . '">' . __( 'View bundled classes', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' );?></small></p>
2303
+												<input type="text" id="classes_<?php echo esc_attr( $field[ 'group_id' ] ); ?>" class="widefat" name="field[<?php echo $field[ 'group_id' ]; ?>][additional-classes]" value="<?php echo isset( $field[ 'additional-classes' ] ) ? stripslashes( wp_strip_all_tags( $field[ 'additional-classes' ] ) ) : ''; ?>" />
2304
+												<p class="description"><small><?php printf( __( "Assign additional classes to this field. %s.", 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/bundled-css-classes/' ) . '">' . __( 'View bundled classes', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' ); ?></small></p>
2305 2305
 											</td>
2306 2306
 										</tr>
2307 2307
 										<!-- Required Toggle -->
2308 2308
 										<tr valign="top">
2309 2309
 											<td scope="row">
2310
-												<label for="field-required-<?php echo esc_attr( $field['group_id'] ); ?>">
2310
+												<label for="field-required-<?php echo esc_attr( $field[ 'group_id' ] ); ?>">
2311 2311
 													<?php _e( 'Field Required?', 'yikes-inc-easy-mailchimp-extender' ); ?>
2312 2312
 												</label>
2313 2313
 											</td>
2314 2314
 											<td>
2315
-												<?php $checked = isset( $field['require'] ) ? $field['require'] : '0'; ?>
2316
-												<input type="checkbox" id="field-required-<?php echo esc_attr( $field['group_id'] ); ?>" class="widefat" value="1" name="field[<?php echo $field['group_id']; ?>][require]" <?php checked( $checked , 1 ); ?>>
2317
-												<p class="description"><small><?php _e( "Require this field to be filled in before the form can be submitted.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2315
+												<?php $checked = isset( $field[ 'require' ] ) ? $field[ 'require' ] : '0'; ?>
2316
+												<input type="checkbox" id="field-required-<?php echo esc_attr( $field[ 'group_id' ] ); ?>" class="widefat" value="1" name="field[<?php echo $field[ 'group_id' ]; ?>][require]" <?php checked( $checked, 1 ); ?>>
2317
+												<p class="description"><small><?php _e( "Require this field to be filled in before the form can be submitted.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2318 2318
 											</td>
2319 2319
 										</tr>
2320 2320
 										<!-- Visible Toggle -->
2321 2321
 										<tr valign="top">
2322 2322
 											<td scope="row">
2323
-												<label for="hide-field-<?php echo esc_attr( $field['group_id'] ); ?>">
2323
+												<label for="hide-field-<?php echo esc_attr( $field[ 'group_id' ] ); ?>">
2324 2324
 													<?php _e( 'Hide Field', 'yikes-inc-easy-mailchimp-extender' ); ?>
2325 2325
 												</label>
2326 2326
 											</td>
2327 2327
 											<td>
2328
-												<?php $hide = isset( $field['hide'] ) ? $field['hide'] : '0'; ?>
2329
-												<input type="checkbox" id="hide-field-<?php echo esc_attr( $field['group_id'] ); ?>" class="widefat" value="1" name="field[<?php echo $field['group_id']; ?>][hide]" <?php checked( $hide , 1 ); ?>>
2330
-												<p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2328
+												<?php $hide = isset( $field[ 'hide' ] ) ? $field[ 'hide' ] : '0'; ?>
2329
+												<input type="checkbox" id="hide-field-<?php echo esc_attr( $field[ 'group_id' ] ); ?>" class="widefat" value="1" name="field[<?php echo $field[ 'group_id' ]; ?>][hide]" <?php checked( $hide, 1 ); ?>>
2330
+												<p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2331 2331
 											</td>
2332 2332
 										</tr>
2333 2333
 										<!-- Toggle Field Label Visibility -->
2334 2334
 										<tr valign="top">
2335 2335
 											<td scope="row">
2336
-												<label for="hide-label-<?php echo esc_attr( $field['group_id'] ); ?>">
2336
+												<label for="hide-label-<?php echo esc_attr( $field[ 'group_id' ] ); ?>">
2337 2337
 													<?php _e( 'Hide Label', 'yikes-inc-easy-mailchimp-extender' ); ?>
2338 2338
 												</label>
2339 2339
 											</td>
2340 2340
 											<td>
2341
-												<?php $hide = isset( $field['hide-label'] ) ? $field['hide-label'] : '0'; ?>
2342
-												<input type="checkbox" id="hide-label-<?php echo esc_attr( $field['group_id'] ); ?>" name="field[<?php echo $field['group_id']; ?>][hide-label]" value="1" <?php checked( $hide , 1 ); ?>/>
2343
-												<p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2341
+												<?php $hide = isset( $field[ 'hide-label' ] ) ? $field[ 'hide-label' ] : '0'; ?>
2342
+												<input type="checkbox" id="hide-label-<?php echo esc_attr( $field[ 'group_id' ] ); ?>" name="field[<?php echo $field[ 'group_id' ]; ?>][hide-label]" value="1" <?php checked( $hide, 1 ); ?>/>
2343
+												<p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2344 2344
 											</td>
2345 2345
 										</tr>
2346 2346
 										<!-- Toggle Buttons -->
@@ -2350,8 +2350,8 @@  discard block
 block discarded – undo
2350 2350
 											</td>
2351 2351
 											<td>
2352 2352
 												<span class="toggle-container">
2353
-													<a href="#" class="close-form-expansion"><?php _e( "Close" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
2354
-													<a href="#" class="remove-field" alt="<?php echo $field['group_id']; ?>"><?php _e( "Remove Field" , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
2353
+													<a href="#" class="close-form-expansion"><?php _e( "Close", 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
2354
+													<a href="#" class="remove-field" alt="<?php echo $field[ 'group_id' ]; ?>"><?php _e( "Remove Field", 'yikes-inc-easy-mailchimp-extender' ); ?></a>
2355 2355
 												</span>
2356 2356
 											</td>
2357 2357
 										</tr>
@@ -2372,7 +2372,7 @@  discard block
 block discarded – undo
2372 2372
 				add_thickbox();
2373 2373
 				// enqueue jquery qtip for our tooltip
2374 2374
 				wp_enqueue_script( 'jquery-qtip-tooltip', YIKES_MC_URL . 'admin/js/min/jquery.qtip.min.js', array( 'jquery' ) );
2375
-				wp_enqueue_style( 'jquery-qtip-style',  YIKES_MC_URL . 'admin/css/jquery.qtip.min.css' );
2375
+				wp_enqueue_style( 'jquery-qtip-style', YIKES_MC_URL . 'admin/css/jquery.qtip.min.css' );
2376 2376
 					$available_tags = array(
2377 2377
 						array(
2378 2378
 							'tag' => '{page_title}',
@@ -2427,14 +2427,14 @@  discard block
 block discarded – undo
2427 2427
 						<h3><?php _e( 'Pre Defined Tags', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
2428 2428
 						<p class="description"><?php _e( 'You can use any of the following tags to populate a MailChimp text field with dynamic content. This can be used to determine which page the user signed up on, if the user was logged in and more.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
2429 2429
 						<ul>
2430
-							<?php foreach( apply_filters( 'yikes-mailchimp-custom-default-value-tags', $available_tags ) as $tag ) { ?>
2430
+							<?php foreach ( apply_filters( 'yikes-mailchimp-custom-default-value-tags', $available_tags ) as $tag ) { ?>
2431 2431
 								<li class="tooltop-tag">
2432 2432
 									<!-- link/tag -->
2433
-									<a href="#" onclick="populateDefaultValue( '<?php echo $tag['tag']; ?>' );return false;" data-attr-tag="<?php echo $tag['tag']; ?>" title="<?php echo $tag['title']; ?>"><?php echo $tag['title']; ?></a>
2433
+									<a href="#" onclick="populateDefaultValue( '<?php echo $tag[ 'tag' ]; ?>' );return false;" data-attr-tag="<?php echo $tag[ 'tag' ]; ?>" title="<?php echo $tag[ 'title' ]; ?>"><?php echo $tag[ 'title' ]; ?></a>
2434 2434
 									<!-- help icon -->
2435 2435
 									<span class="dashicons dashicons-editor-help"></span>
2436 2436
 									<!-- tooltip -->
2437
-									<div class="tooltiptext qtip-bootstrap yikes-easy-mc-hidden"><?php echo $tag['description']; ?></div>
2437
+									<div class="tooltiptext qtip-bootstrap yikes-easy-mc-hidden"><?php echo $tag[ 'description' ]; ?></div>
2438 2438
 								</li>
2439 2439
 							<?php } ?>
2440 2440
 						</ul>
@@ -2450,46 +2450,46 @@  discard block
 block discarded – undo
2450 2450
 		*	-
2451 2451
 		* @parameters - $list_id - pass in the list ID to retreive merge variables from
2452 2452
 		*/
2453
-		public function build_available_merge_vars( $form_fields , $available_merge_variables ) {
2453
+		public function build_available_merge_vars( $form_fields, $available_merge_variables ) {
2454 2454
 			$fields_assigned_to_form = array();
2455 2455
 			foreach ( $form_fields as $field ) {
2456
-				if ( isset( $field['merge'] ) ) {
2457
-					$fields_assigned_to_form[ $field['merge'] ] = true;
2456
+				if ( isset( $field[ 'merge' ] ) ) {
2457
+					$fields_assigned_to_form[ $field[ 'merge' ] ] = true;
2458 2458
 				}
2459 2459
 			}
2460 2460
 
2461
-			if ( ! empty( $available_merge_variables['merge_fields'] ) ) {
2461
+			if ( ! empty( $available_merge_variables[ 'merge_fields' ] ) ) {
2462 2462
 				?>
2463 2463
 				<ul id="available-fields"><?php
2464
-				foreach ( $available_merge_variables['merge_fields'] as $merge_var ) {
2465
-					if ( isset( $fields_assigned_to_form[ $merge_var['tag'] ] ) ) {
2464
+				foreach ( $available_merge_variables[ 'merge_fields' ] as $merge_var ) {
2465
+					if ( isset( $fields_assigned_to_form[ $merge_var[ 'tag' ] ] ) ) {
2466 2466
 						?>
2467 2467
 						<li class="available-form-field not-available"
2468
-						    alt="<?php echo $merge_var['tag']; ?>"
2469
-						    data-attr-field-type="<?php echo esc_attr( $merge_var['type'] ); ?>"
2470
-						    data-attr-field-name="<?php echo esc_attr( $merge_var['name'] ); ?>"
2471
-						    data-attr-form-id="<?php echo esc_attr( $available_merge_variables['list_id'] ); ?>"
2468
+						    alt="<?php echo $merge_var[ 'tag' ]; ?>"
2469
+						    data-attr-field-type="<?php echo esc_attr( $merge_var[ 'type' ] ); ?>"
2470
+						    data-attr-field-name="<?php echo esc_attr( $merge_var[ 'name' ] ); ?>"
2471
+						    data-attr-form-id="<?php echo esc_attr( $available_merge_variables[ 'list_id' ] ); ?>"
2472 2472
 						    title="<?php esc_attr_e( 'Already assigned to your form', 'yikes-inc-easy-mailchimp-extender' ); ?>"
2473 2473
 						    disabled="disabled">
2474
-							<?php echo stripslashes( $merge_var['name'] );
2475
-							if ( $merge_var['required'] ) {
2474
+							<?php echo stripslashes( $merge_var[ 'name' ] );
2475
+							if ( $merge_var[ 'required' ] ) {
2476 2476
 								echo ' <span class="field-required" title="' . __( 'required field', 'yikes-inc-easy-mailchimp-extender' ) . '">*</span>';
2477 2477
 							} ?>
2478
-							<small class="field-type-text"><?php echo $merge_var['type']; ?></small>
2478
+							<small class="field-type-text"><?php echo $merge_var[ 'type' ]; ?></small>
2479 2479
 						</li>
2480 2480
 						<?php
2481 2481
 					} else {
2482 2482
 						?>
2483 2483
 						<li class="available-form-field"
2484
-						    alt="<?php echo $merge_var['tag']; ?>"
2485
-						    data-attr-field-type="<?php echo esc_attr( $merge_var['type'] ); ?>"
2486
-						    data-attr-field-name="<?php echo esc_attr( $merge_var['name'] ); ?>"
2487
-						    data-attr-form-id="<?php echo esc_attr( $available_merge_variables['list_id'] ); ?>">
2488
-							<?php echo stripslashes( $merge_var['name'] );
2489
-							if ( $merge_var['required'] ) {
2484
+						    alt="<?php echo $merge_var[ 'tag' ]; ?>"
2485
+						    data-attr-field-type="<?php echo esc_attr( $merge_var[ 'type' ] ); ?>"
2486
+						    data-attr-field-name="<?php echo esc_attr( $merge_var[ 'name' ] ); ?>"
2487
+						    data-attr-form-id="<?php echo esc_attr( $available_merge_variables[ 'list_id' ] ); ?>">
2488
+							<?php echo stripslashes( $merge_var[ 'name' ] );
2489
+							if ( $merge_var[ 'required' ] ) {
2490 2490
 								echo ' <span class="field-required" title="' . __( 'required field', 'yikes-inc-easy-mailchimp-extender' ) . '">*</span>';
2491 2491
 							} ?>
2492
-							<small class="field-type-text"><?php echo $merge_var['type']; ?></small>
2492
+							<small class="field-type-text"><?php echo $merge_var[ 'type' ]; ?></small>
2493 2493
 						</li>
2494 2494
 						<?php
2495 2495
 					}
@@ -2511,12 +2511,12 @@  discard block
 block discarded – undo
2511 2511
 		*	-
2512 2512
 		* @parameters - $list_id - pass in the list ID to retreive merge variables from
2513 2513
 		*/
2514
-		public function build_available_interest_groups( $form_fields , $available_interest_groups , $list_id ) {
2514
+		public function build_available_interest_groups( $form_fields, $available_interest_groups, $list_id ) {
2515 2515
 			$fields_assigned_to_form = array();
2516 2516
 			if ( ! empty( $form_fields ) ) {
2517 2517
 				foreach ( $form_fields as $field ) {
2518
-					if ( isset( $field['group_id'] ) ) {
2519
-						$fields_assigned_to_form[ $field['group_id'] ] = true;
2518
+					if ( isset( $field[ 'group_id' ] ) ) {
2519
+						$fields_assigned_to_form[ $field[ 'group_id' ] ] = true;
2520 2520
 					}
2521 2521
 				}
2522 2522
 			}
@@ -2525,29 +2525,29 @@  discard block
 block discarded – undo
2525 2525
 				?>
2526 2526
 				<ul id="available-interest-groups"><?php
2527 2527
 				foreach ( $available_interest_groups as $interest_group ) {
2528
-					if ( isset( $fields_assigned_to_form[ $interest_group['id'] ] ) ) {
2528
+					if ( isset( $fields_assigned_to_form[ $interest_group[ 'id' ] ] ) ) {
2529 2529
 						?>
2530 2530
 						<li class="available-interest-group not-available" 
2531
-							alt="<?php echo $interest_group['id']; ?>" 
2532
-							data-attr-field-name="<?php echo htmlspecialchars( $interest_group['title'] ); ?>" 
2533
-							data-attr-field-type="<?php echo $interest_group['type']; ?>" 
2531
+							alt="<?php echo $interest_group[ 'id' ]; ?>" 
2532
+							data-attr-field-name="<?php echo htmlspecialchars( $interest_group[ 'title' ] ); ?>" 
2533
+							data-attr-field-type="<?php echo $interest_group[ 'type' ]; ?>" 
2534 2534
 							data-attr-form-id="<?php echo $list_id; ?>" title="<?php _e( 'Already assigned to your form', 'yikes-inc-easy-mailchimp-extender' ); ?>" 
2535 2535
 							disabled="disabled"
2536 2536
 						>
2537
-							<?php echo stripslashes( $interest_group['title'] ); ?>
2538
-							<small class="field-type-text"><?php echo $interest_group['type']; ?></small>
2537
+							<?php echo stripslashes( $interest_group[ 'title' ] ); ?>
2538
+							<small class="field-type-text"><?php echo $interest_group[ 'type' ]; ?></small>
2539 2539
 						</li>
2540 2540
 						<?php
2541 2541
 					} else {
2542 2542
 						?>
2543 2543
 						<li class="available-interest-group" 
2544
-							alt="<?php echo $interest_group['id']; ?>" 
2545
-							data-attr-field-name="<?php echo htmlspecialchars( $interest_group['title'] ); ?>" 
2546
-							data-attr-field-type="<?php echo $interest_group['type']; ?>" 
2544
+							alt="<?php echo $interest_group[ 'id' ]; ?>" 
2545
+							data-attr-field-name="<?php echo htmlspecialchars( $interest_group[ 'title' ] ); ?>" 
2546
+							data-attr-field-type="<?php echo $interest_group[ 'type' ]; ?>" 
2547 2547
 							data-attr-form-id="<?php echo $list_id; ?>"
2548 2548
 						>
2549
-							<?php echo stripslashes( $interest_group['title'] ); ?>
2550
-							<small class="field-type-text"><?php echo $interest_group['type']; ?></small>
2549
+							<?php echo stripslashes( $interest_group[ 'title' ] ); ?>
2550
+							<small class="field-type-text"><?php echo $interest_group[ 'type' ]; ?></small>
2551 2551
 						</li>
2552 2552
 						<?php
2553 2553
 					}
@@ -2569,15 +2569,15 @@  discard block
 block discarded – undo
2569 2569
 		*	- must clean up db tables , ensure what data is going in and what is needed...
2570 2570
 		*/
2571 2571
 		public function yikes_easy_mailchimp_create_form() {
2572
-			$nonce = $_REQUEST['nonce'];
2572
+			$nonce = $_REQUEST[ 'nonce' ];
2573 2573
 			if ( ! wp_verify_nonce( $nonce, 'create_mailchimp_form' ) ) {
2574
-				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) );
2574
+				wp_die( __( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ) );
2575 2575
 			}
2576 2576
 
2577 2577
 			$result = $this->form_interface->create_form( array(
2578
-				'list_id'          => sanitize_key( $_POST['associated-list'] ),
2579
-				'form_name'        => stripslashes( $_POST['form-name'] ),
2580
-				'form_description' => stripslashes( $_POST['form-description'] ),
2578
+				'list_id'          => sanitize_key( $_POST[ 'associated-list' ] ),
2579
+				'form_name'        => stripslashes( $_POST[ 'form-name' ] ),
2580
+				'form_description' => stripslashes( $_POST[ 'form-description' ] ),
2581 2581
 			) );
2582 2582
 
2583 2583
 			// if an error occurs during the form creation process
@@ -2585,11 +2585,11 @@  discard block
 block discarded – undo
2585 2585
 				// write it to the error log
2586 2586
 				// if the form was not created successfully
2587 2587
 				$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
2588
-				$error_logging->maybe_write_to_log( __( 'Error creating a new form', 'yikes-inc-easy-mailchimp-extender') , __( "Creating a new form" , 'yikes-inc-easy-mailchimp-extender' ) , __( "Forms" , 'yikes-inc-easy-mailchimp-extender' ) );
2588
+				$error_logging->maybe_write_to_log( __( 'Error creating a new form', 'yikes-inc-easy-mailchimp-extender' ), __( "Creating a new form", 'yikes-inc-easy-mailchimp-extender' ), __( "Forms", 'yikes-inc-easy-mailchimp-extender' ) );
2589 2589
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&sql_error=' . urlencode( __( 'Error creating a new form', 'yikes-inc-easy-mailchimp-extender' ) ) ) ) );
2590 2590
 			} else {
2591 2591
 				// redirect the user to the new form edit page
2592
-				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&id=' . $result) ) );
2592
+				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&id=' . $result ) ) );
2593 2593
 			}
2594 2594
 			exit();
2595 2595
 		}
@@ -2602,11 +2602,11 @@  discard block
 block discarded – undo
2602 2602
 		*/
2603 2603
 		public function yikes_easy_mailchimp_delete_form() {
2604 2604
 			// grab & store our variables ( associated list & form name )
2605
-			$nonce = $_REQUEST['nonce'];
2606
-			$post_id_to_delete = $_REQUEST['mailchimp-form'];
2605
+			$nonce = $_REQUEST[ 'nonce' ];
2606
+			$post_id_to_delete = $_REQUEST[ 'mailchimp-form' ];
2607 2607
 			// verify our nonce
2608
-			if ( ! wp_verify_nonce( $nonce, 'delete-mailchimp-form-'.$post_id_to_delete ) ) {
2609
-				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2608
+			if ( ! wp_verify_nonce( $nonce, 'delete-mailchimp-form-' . $post_id_to_delete ) ) {
2609
+				wp_die( __( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ), __( "Failed nonce validation", 'yikes-inc-easy-mailchimp-extender' ), array( 'response' => 500, 'back_link' => true ) );
2610 2610
 			}
2611 2611
 
2612 2612
 			$this->form_interface->delete_form( $post_id_to_delete );
@@ -2622,19 +2622,19 @@  discard block
 block discarded – undo
2622 2622
 		*/
2623 2623
 		public function yikes_easy_mailchimp_duplicate_form() {
2624 2624
 			// grab & store our variables ( associated list & form name )
2625
-			$nonce = $_REQUEST['nonce'];
2626
-			$post_id_to_clone = $_REQUEST['mailchimp-form'];
2625
+			$nonce = $_REQUEST[ 'nonce' ];
2626
+			$post_id_to_clone = $_REQUEST[ 'mailchimp-form' ];
2627 2627
 			// verify our nonce
2628
-			if ( ! wp_verify_nonce( $nonce, 'duplicate-mailchimp-form-'.$post_id_to_clone ) ) {
2629
-				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2628
+			if ( ! wp_verify_nonce( $nonce, 'duplicate-mailchimp-form-' . $post_id_to_clone ) ) {
2629
+				wp_die( __( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ), __( "Failed nonce validation", 'yikes-inc-easy-mailchimp-extender' ), array( 'response' => 500, 'back_link' => true ) );
2630 2630
 			}
2631 2631
 
2632 2632
 			// Get the current form data.
2633 2633
 			$form_data = $this->form_interface->get_form( $post_id_to_clone );
2634 2634
 
2635 2635
 			// Update some of the data before duplication
2636
-			$form_data['form_name'] .= ' - Copy';
2637
-			$form_data['impressions'] = $form_data['submissions'] = 0;
2636
+			$form_data[ 'form_name' ] .= ' - Copy';
2637
+			$form_data[ 'impressions' ] = $form_data[ 'submissions' ] = 0;
2638 2638
 
2639 2639
 			// Create the new form, and handle the result.
2640 2640
 			$result = $this->form_interface->create_form( $form_data );
@@ -2665,11 +2665,11 @@  discard block
 block discarded – undo
2665 2665
 		*/
2666 2666
 		public function yikes_easy_mailchimp_reset_impression_stats() {
2667 2667
 			// grab & store our variables ( associated list & form name )
2668
-			$nonce = $_REQUEST['nonce'];
2669
-			$form_id_to_reset = $_REQUEST['mailchimp-form'];
2668
+			$nonce = $_REQUEST[ 'nonce' ];
2669
+			$form_id_to_reset = $_REQUEST[ 'mailchimp-form' ];
2670 2670
 			// verify our nonce
2671
-			if ( ! wp_verify_nonce( $nonce, 'reset-stats-mailchimp-form-'.$form_id_to_reset ) ) {
2672
-				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2671
+			if ( ! wp_verify_nonce( $nonce, 'reset-stats-mailchimp-form-' . $form_id_to_reset ) ) {
2672
+				wp_die( __( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ), __( "Failed nonce validation", 'yikes-inc-easy-mailchimp-extender' ), array( 'response' => 500, 'back_link' => true ) );
2673 2673
 			}
2674 2674
 
2675 2675
 			$result = $this->form_interface->update_form(
@@ -2697,8 +2697,8 @@  discard block
 block discarded – undo
2697 2697
 		*/
2698 2698
 		public function yikes_easy_mailchimp_update_form() {
2699 2699
 
2700
-			$nonce   = $_REQUEST['nonce'];
2701
-			$form_id = $_REQUEST['id'];
2700
+			$nonce   = $_REQUEST[ 'nonce' ];
2701
+			$form_id = $_REQUEST[ 'id' ];
2702 2702
 
2703 2703
 			// verify our nonce
2704 2704
 			if ( ! wp_verify_nonce( $nonce, 'update-mailchimp-form-' . $form_id ) ) {
@@ -2712,70 +2712,70 @@  discard block
 block discarded – undo
2712 2712
 			}
2713 2713
 
2714 2714
 			// Store our values!
2715
-			$list_id                 = $_POST['associated-list'];
2716
-			$form_name               = stripslashes( $_POST['form-name'] );
2717
-			$form_description        = sanitize_text_field( stripslashes( $_POST['form-description'] ) );
2718
-			$redirect_user_on_submit = $_POST['redirect-user-on-submission'];
2719
-			$redirect_page           = $_POST['redirect-user-to-selection'];
2715
+			$list_id                 = $_POST[ 'associated-list' ];
2716
+			$form_name               = stripslashes( $_POST[ 'form-name' ] );
2717
+			$form_description        = sanitize_text_field( stripslashes( $_POST[ 'form-description' ] ) );
2718
+			$redirect_user_on_submit = $_POST[ 'redirect-user-on-submission' ];
2719
+			$redirect_page           = $_POST[ 'redirect-user-to-selection' ];
2720 2720
 
2721 2721
 			// stripslashes_deep on save, to prevent foreign languages from added excessive backslashes
2722
-			$assigned_fields = isset( $_POST['field'] ) ? stripslashes_deep( $_POST['field'] ): array();
2722
+			$assigned_fields = isset( $_POST[ 'field' ] ) ? stripslashes_deep( $_POST[ 'field' ] ) : array();
2723 2723
 
2724 2724
 			// setup our submission settings serialized array
2725 2725
 			$submission_settings = array(
2726
-				'ajax'                   => $_POST['form-ajax-submission'],
2727
-				'redirect_on_submission' => $_POST['redirect-user-on-submission'],
2728
-				'redirect_page'          => $_POST['redirect-user-to-selection'],
2729
-				'custom_redirect_url'    => esc_url( $_POST['custom-redirect-url'] ),
2730
-				'redirect_new_window'	 => $_POST['redirect_new_window'],
2731
-				'hide_form_post_signup'  => $_POST['hide-form-post-signup'],
2732
-				'replace_interests'      => $_POST['replace-interest-groups'],
2726
+				'ajax'                   => $_POST[ 'form-ajax-submission' ],
2727
+				'redirect_on_submission' => $_POST[ 'redirect-user-on-submission' ],
2728
+				'redirect_page'          => $_POST[ 'redirect-user-to-selection' ],
2729
+				'custom_redirect_url'    => esc_url( $_POST[ 'custom-redirect-url' ] ),
2730
+				'redirect_new_window'	 => $_POST[ 'redirect_new_window' ],
2731
+				'hide_form_post_signup'  => $_POST[ 'hide-form-post-signup' ],
2732
+				'replace_interests'      => $_POST[ 'replace-interest-groups' ],
2733 2733
 			);
2734 2734
 
2735 2735
 			// setup our opt-in settings serialized array
2736 2736
 			$optin_settings = array(
2737
-				'optin'                => $_POST['single-double-optin'],
2738
-				'update_existing_user' => $_POST['update-existing-user'],
2739
-				'send_update_email'    => $_POST['update-existing-email'],
2737
+				'optin'                => $_POST[ 'single-double-optin' ],
2738
+				'update_existing_user' => $_POST[ 'update-existing-user' ],
2739
+				'send_update_email'    => $_POST[ 'update-existing-email' ],
2740 2740
 			);
2741 2741
 
2742 2742
 			// Setup our error settings serialized array
2743 2743
 			$error_settings = array(
2744
-				'success'				=> trim( $_POST['yikes-easy-mc-success-message'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-success-message'] ) ) : '',
2745
-				'success-single-optin'	=> trim( $_POST['yikes-easy-mc-success-single-optin-message'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-success-single-optin-message'] ) ) : '',
2746
-				'success-resubscribed'	=> trim( $_POST['yikes-easy-mc-user-resubscribed-success-message'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-user-resubscribed-success-message'] ) ) : '',
2747
-				'general-error'			=> trim( $_POST['yikes-easy-mc-general-error-message'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-general-error-message'] ) ) : '',
2748
-				'already-subscribed'	=> trim( $_POST['yikes-easy-mc-user-subscribed-message'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-user-subscribed-message'] ) ) : '',
2749
-				'update-link'			=> trim( $_POST['yikes-easy-mc-user-update-link'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-user-update-link'] ) ) : '',
2750
-				'email-subject'			=> trim( $_POST['yikes-easy-mc-user-email-subject'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-user-email-subject'] ) ) : '',
2751
-				'email-body'			=> trim( $_POST['yikes-easy-mc-user-email-body'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-user-email-body'] ) ) : '',
2752
-				'update-email-success'  => trim( $_POST['yikes-easy-mc-update-email-successful'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-update-email-successful'] ) ) : '',
2753
-				'update-email-failure'  => trim( $_POST['yikes-easy-mc-update-email-failure'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-update-email-failure'] ) ) : '',
2744
+				'success'				=> trim( $_POST[ 'yikes-easy-mc-success-message' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-success-message' ] ) ) : '',
2745
+				'success-single-optin'	=> trim( $_POST[ 'yikes-easy-mc-success-single-optin-message' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-success-single-optin-message' ] ) ) : '',
2746
+				'success-resubscribed'	=> trim( $_POST[ 'yikes-easy-mc-user-resubscribed-success-message' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-user-resubscribed-success-message' ] ) ) : '',
2747
+				'general-error'			=> trim( $_POST[ 'yikes-easy-mc-general-error-message' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-general-error-message' ] ) ) : '',
2748
+				'already-subscribed'	=> trim( $_POST[ 'yikes-easy-mc-user-subscribed-message' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-user-subscribed-message' ] ) ) : '',
2749
+				'update-link'			=> trim( $_POST[ 'yikes-easy-mc-user-update-link' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-user-update-link' ] ) ) : '',
2750
+				'email-subject'			=> trim( $_POST[ 'yikes-easy-mc-user-email-subject' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-user-email-subject' ] ) ) : '',
2751
+				'email-body'			=> trim( $_POST[ 'yikes-easy-mc-user-email-body' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-user-email-body' ] ) ) : '',
2752
+				'update-email-success'  => trim( $_POST[ 'yikes-easy-mc-update-email-successful' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-update-email-successful' ] ) ) : '',
2753
+				'update-email-failure'  => trim( $_POST[ 'yikes-easy-mc-update-email-failure' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-update-email-failure' ] ) ) : '',
2754 2754
 			);
2755 2755
 
2756 2756
 			// Setup the new form settings array
2757 2757
 			// @since 6.0.3.8
2758 2758
 			// To Do: Combine date & time so it's a single unix timestamp
2759 2759
 			$form_settings = array(
2760
-				'yikes-easy-mc-form-class-names'                 => trim( $_POST['yikes-easy-mc-form-class-names'] ),
2761
-				'yikes-easy-mc-inline-form'                      => $_POST['yikes-easy-mc-inline-form'][0],
2762
-				'yikes-easy-mc-submit-button-type'               => $_POST['yikes-easy-mc-submit-button-type'][0],
2763
-				'yikes-easy-mc-submit-button-text'               => trim( $_POST['yikes-easy-mc-submit-button-text'] ),
2764
-				'yikes-easy-mc-submit-button-image'              => esc_url( trim( $_POST['yikes-easy-mc-submit-button-image'] ) ),
2765
-				'yikes-easy-mc-submit-button-classes'            => trim( $_POST['yikes-easy-mc-submit-button-classes'] ),
2766
-				'yikes-easy-mc-form-schedule'                    => ( isset( $_POST['yikes-easy-mc-form-schedule'] ) ) ? '1' : '0',
2767
-				'yikes-easy-mc-form-restriction-start'           => strtotime( $_POST['yikes-easy-mc-form-restriction-start-date'] . ' ' . $_POST['yikes-easy-mc-form-restriction-start-time'] ),
2768
-				'yikes-easy-mc-form-restriction-end'             => strtotime( $_POST['yikes-easy-mc-form-restriction-end-date'] . ' ' . $_POST['yikes-easy-mc-form-restriction-end-time'] ),
2769
-				'yikes-easy-mc-form-restriction-pending-message' => trim( $_POST['yikes-easy-mc-form-restriction-pending-message'] ),
2770
-				'yikes-easy-mc-form-restriction-expired-message' => trim( $_POST['yikes-easy-mc-form-restriction-expired-message'] ),
2771
-				'yikes-easy-mc-form-login-required'              => ( isset( $_POST['yikes-easy-mc-form-login-required'] ) ) ? '1' : '0',
2772
-				'yikes-easy-mc-form-restriction-login-message'   => trim( $_POST['yikes-easy-mc-form-restriction-login-message'] ),
2760
+				'yikes-easy-mc-form-class-names'                 => trim( $_POST[ 'yikes-easy-mc-form-class-names' ] ),
2761
+				'yikes-easy-mc-inline-form'                      => $_POST[ 'yikes-easy-mc-inline-form' ][ 0 ],
2762
+				'yikes-easy-mc-submit-button-type'               => $_POST[ 'yikes-easy-mc-submit-button-type' ][ 0 ],
2763
+				'yikes-easy-mc-submit-button-text'               => trim( $_POST[ 'yikes-easy-mc-submit-button-text' ] ),
2764
+				'yikes-easy-mc-submit-button-image'              => esc_url( trim( $_POST[ 'yikes-easy-mc-submit-button-image' ] ) ),
2765
+				'yikes-easy-mc-submit-button-classes'            => trim( $_POST[ 'yikes-easy-mc-submit-button-classes' ] ),
2766
+				'yikes-easy-mc-form-schedule'                    => ( isset( $_POST[ 'yikes-easy-mc-form-schedule' ] ) ) ? '1' : '0',
2767
+				'yikes-easy-mc-form-restriction-start'           => strtotime( $_POST[ 'yikes-easy-mc-form-restriction-start-date' ] . ' ' . $_POST[ 'yikes-easy-mc-form-restriction-start-time' ] ),
2768
+				'yikes-easy-mc-form-restriction-end'             => strtotime( $_POST[ 'yikes-easy-mc-form-restriction-end-date' ] . ' ' . $_POST[ 'yikes-easy-mc-form-restriction-end-time' ] ),
2769
+				'yikes-easy-mc-form-restriction-pending-message' => trim( $_POST[ 'yikes-easy-mc-form-restriction-pending-message' ] ),
2770
+				'yikes-easy-mc-form-restriction-expired-message' => trim( $_POST[ 'yikes-easy-mc-form-restriction-expired-message' ] ),
2771
+				'yikes-easy-mc-form-login-required'              => ( isset( $_POST[ 'yikes-easy-mc-form-login-required' ] ) ) ? '1' : '0',
2772
+				'yikes-easy-mc-form-restriction-login-message'   => trim( $_POST[ 'yikes-easy-mc-form-restriction-login-message' ] ),
2773 2773
 			);
2774 2774
 
2775 2775
 			// additional custom fields (extensions / user defined fields)
2776 2776
 			$custom_fields = array();
2777
-			if ( isset( $_POST['custom-field'] ) ) {
2778
-				foreach ( $_POST['custom-field'] as $custom_field => $custom_value ) {
2777
+			if ( isset( $_POST[ 'custom-field' ] ) ) {
2778
+				foreach ( $_POST[ 'custom-field' ] as $custom_field => $custom_value ) {
2779 2779
 					if ( is_array( $custom_value ) ) {
2780 2780
 						$custom_fields[ $custom_field ] = array_filter( stripslashes_deep( $custom_value ) ); // array_filters to remove empty items (don't save them!)
2781 2781
 					} else {
@@ -2807,7 +2807,7 @@  discard block
 block discarded – undo
2807 2807
 			$this->form_interface->update_form( $form_id, $form_updates );
2808 2808
 
2809 2809
 			/* Custom action hook which allows users to update specific options when a form is updated - used in add ons */
2810
-			do_action( 'yikes-mailchimp-save-form', $form_id,  $custom_fields );
2810
+			do_action( 'yikes-mailchimp-save-form', $form_id, $custom_fields );
2811 2811
 
2812 2812
 			// redirect the user to the manage forms page, display confirmation
2813 2813
 			wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&id=' . $form_id . '&updated-form=true' ) ) );
@@ -2818,11 +2818,11 @@  discard block
 block discarded – undo
2818 2818
 			$email_body  = '<p>' . __( 'Greetings,', 'yikes-inc-easy-mailchimp-extender' ) . '</p>'; 
2819 2819
 
2820 2820
 			$email_body .= '<p>';
2821
-			$email_body .= 	__( 'A request has been made to update your MailChimp account profile information.', 'yikes-inc-easy-mailchimp-extender' );
2822
-			$email_body .=	__( ' To do so please use the following link: ', 'yikes-inc-easy-mailchimp-extender' );
2823
-			$email_body .=	'[link]';
2824
-			$email_body .=		__( 'Update MailChimp Profile Info', 'yikes-inc-easy-mailchimp-extender' );
2825
-			$email_body .= 	'[/link]';
2821
+			$email_body .= __( 'A request has been made to update your MailChimp account profile information.', 'yikes-inc-easy-mailchimp-extender' );
2822
+			$email_body .= __( ' To do so please use the following link: ', 'yikes-inc-easy-mailchimp-extender' );
2823
+			$email_body .= '[link]';
2824
+			$email_body .= __( 'Update MailChimp Profile Info', 'yikes-inc-easy-mailchimp-extender' );
2825
+			$email_body .= '[/link]';
2826 2826
 			$email_body .= '</p>';
2827 2827
 
2828 2828
 			$email_body .= '<p>' . __( 'If you did not request this update, please disregard this email.', 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
@@ -2838,13 +2838,13 @@  discard block
 block discarded – undo
2838 2838
 
2839 2839
 		/* Unsubscribe a given user from our list */
2840 2840
 		public function yikes_easy_mailchimp_unsubscribe_user() {
2841
-			$nonce    = $_REQUEST['nonce'];
2842
-			$list_id  = $_REQUEST['mailchimp-list'];
2843
-			$email_id = $_REQUEST['email_id'];
2841
+			$nonce    = $_REQUEST[ 'nonce' ];
2842
+			$list_id  = $_REQUEST[ 'mailchimp-list' ];
2843
+			$email_id = $_REQUEST[ 'email_id' ];
2844 2844
 
2845 2845
 			// verify our nonce
2846 2846
 			if ( ! wp_verify_nonce( $nonce, 'unsubscribe-user-' . $email_id ) ) {
2847
-				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2847
+				wp_die( __( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ), __( "Failed nonce validation", 'yikes-inc-easy-mailchimp-extender' ), array( 'response' => 500, 'back_link' => true ) );
2848 2848
 			}
2849 2849
 
2850 2850
 			$response = yikes_get_mc_api_manager()->get_list_handler()->member_unsubscribe( $list_id, $email_id );
@@ -2863,21 +2863,21 @@  discard block
 block discarded – undo
2863 2863
 
2864 2864
 		public function yikes_easy_mailchimp_create_missing_error_log() {
2865 2865
 			// grab our nonnce
2866
-			$nonce = $_REQUEST['nonce'];
2866
+			$nonce = $_REQUEST[ 'nonce' ];
2867 2867
 			// validate nonce
2868
-			if ( !wp_verify_nonce( $nonce, 'create_error_log' ) ) {
2869
-				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2868
+			if ( ! wp_verify_nonce( $nonce, 'create_error_log' ) ) {
2869
+				wp_die( __( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ), __( "Failed nonce validation", 'yikes-inc-easy-mailchimp-extender' ), array( 'response' => 500, 'back_link' => true ) );
2870 2870
 			}
2871 2871
 			// setup the path to the error log
2872 2872
 			$error_log = fopen( plugin_dir_path( __FILE__ ) . '../includes/error_log/yikes-easy-mailchimp-error-log.php', 'w' );
2873 2873
 			try {
2874 2874
 				// create the file
2875
-				fwrite( $error_log , '' );
2875
+				fwrite( $error_log, '' );
2876 2876
 				// close out
2877 2877
 				fclose( $error_log );
2878 2878
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings&error_log_created=true' ) ) );
2879 2879
 			} catch ( Exception $e ) {
2880
-				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings&error_log_created=false&error_message='.urlencode( $e->getMessage() ) ) ) );
2880
+				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings&error_log_created=false&error_message=' . urlencode( $e->getMessage() ) ) ) );
2881 2881
 			}
2882 2882
 		}
2883 2883
 
@@ -2888,9 +2888,9 @@  discard block
 block discarded – undo
2888 2888
 		public function yikes_easy_mailchimp_clear_transient_data() {
2889 2889
 
2890 2890
 			// verify our nonce
2891
-			$nonce = $_REQUEST['nonce'];
2891
+			$nonce = $_REQUEST[ 'nonce' ];
2892 2892
 			if ( ! wp_verify_nonce( $nonce, 'clear-mc-transient-data' ) ) {
2893
-				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2893
+				wp_die( __( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ), __( "Failed nonce validation", 'yikes-inc-easy-mailchimp-extender' ), array( 'response' => 500, 'back_link' => true ) );
2894 2894
 			}
2895 2895
 
2896 2896
 			$this->delete_yikes_mailchimp_transients();
@@ -2899,10 +2899,10 @@  discard block
 block discarded – undo
2899 2899
 			$referer = wp_get_referer();
2900 2900
 			if ( $referer && ( strpos( $referer, 'yikes-inc-easy-mailchimp-settings' ) > 0 ) ) {
2901 2901
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=api-cache-settings&transient-cleared=true' ) ) );
2902
-			} elseif ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] === 'yikes-mailchimp-edit-form' && isset( $_REQUEST['id'] ) && ! empty( $_REQUEST['id'] ) ) {
2902
+			} elseif ( isset( $_REQUEST[ 'page' ] ) && $_REQUEST[ 'page' ] === 'yikes-mailchimp-edit-form' && isset( $_REQUEST[ 'id' ] ) && ! empty( $_REQUEST[ 'id' ] ) ) {
2903 2903
 
2904 2904
 				// else check if we were editing a form.
2905
-				$id = filter_var( $_REQUEST['id'], FILTER_SANITIZE_NUMBER_INT );
2905
+				$id = filter_var( $_REQUEST[ 'id' ], FILTER_SANITIZE_NUMBER_INT );
2906 2906
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&id=' . $id ) ) );
2907 2907
 			} else {
2908 2908
 				// else redirect to the manage forms page.
@@ -2946,7 +2946,7 @@  discard block
 block discarded – undo
2946 2946
 		 */
2947 2947
 		public function yikes_mailchimp_load_helper_class() {
2948 2948
 			// check to see if it's already loaded up.
2949
-			if ( !class_exists( 'Yikes_Inc_Easy_Mailchimp_Forms_Helper' ) ) {
2949
+			if ( ! class_exists( 'Yikes_Inc_Easy_Mailchimp_Forms_Helper' ) ) {
2950 2950
 				// Include our main helper class file
2951 2951
 				include_once( YIKES_MC_PATH . 'admin/partials/helpers/init.php' );
2952 2952
 			}
Please login to merge, or discard this patch.
admin/partials/edit-form.php 1 patch
Spacing   +206 added lines, -206 removed lines patch added patch discarded remove patch
@@ -2,23 +2,23 @@  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
 		wp_die( __( 'Oh No!', 'yikes-inc-easy-mailchimp-extender' ), __( 'Error', 'yikes-inc-easy-mailchimp-extender' ) );
18 18
 	}
19 19
 
20 20
 	// grab and store the form ID
21
-	$form_id = (int) $_GET['id'];
21
+	$form_id = (int) $_GET[ 'id' ];
22 22
 
23 23
 	// Get our form interface.
24 24
 	$form_interface = yikes_easy_mailchimp_extender_get_form_interface();
@@ -31,19 +31,19 @@  discard block
 block discarded – undo
31 31
 
32 32
 	// if the form was not found return an error
33 33
 	if ( empty( $form ) ) {
34
-		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' ) );
34
+		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' ) );
35 35
 	}
36 36
 
37 37
 	// set global form data, mainly for use in custom form field declarations
38
-	$GLOBALS["form_data"] = $form;
38
+	$GLOBALS[ "form_data" ] = $form;
39 39
 
40
-	$custom_styles       = $form['custom_styles'];
41
-	$optin_settings      = $form['optin_settings'];
42
-	$submission_settings = $form['submission_settings'];
43
-	$error_messages      = $form['error_messages'];
40
+	$custom_styles       = $form[ 'custom_styles' ];
41
+	$optin_settings      = $form[ 'optin_settings' ];
42
+	$submission_settings = $form[ 'submission_settings' ];
43
+	$error_messages      = $form[ 'error_messages' ];
44 44
 
45
-	if ( isset( $form['form_settings'] ) ) {
46
-		$form_settings = $form['form_settings'];
45
+	if ( isset( $form[ 'form_settings' ] ) ) {
46
+		$form_settings = $form[ 'form_settings' ];
47 47
 	}
48 48
 
49 49
 	// get defaults if none are saved in the database yet
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	}
87 87
 
88 88
 	// Get the merge fields
89
-	$available_merge_variables = $list_handler->get_merge_fields( $form['list_id'] );
89
+	$available_merge_variables = $list_handler->get_merge_fields( $form[ 'list_id' ] );
90 90
 	if ( is_wp_error( $available_merge_variables ) ) {
91 91
 		$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
92 92
 		$error_logging->maybe_write_to_log(
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	}
99 99
 
100 100
 	// get the interest group data
101
-	$interest_groupings = $list_handler->get_interest_categories( $form['list_id'] );
101
+	$interest_groupings = $list_handler->get_interest_categories( $form[ 'list_id' ] );
102 102
 	if ( is_wp_error( $interest_groupings ) ) {
103 103
 		$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
104 104
 		$error_logging->maybe_write_to_log(
@@ -115,22 +115,22 @@  discard block
 block discarded – undo
115 115
 		add_query_arg(
116 116
 			array(
117 117
 				'action' => 'yikes-easy-mc-update-form',
118
-				'nonce' => wp_create_nonce( 'update-mailchimp-form'.-$form['id'] )
118
+				'nonce' => wp_create_nonce( 'update-mailchimp-form' . -$form[ 'id' ] )
119 119
 			)
120 120
 		)
121 121
 	);
122 122
 	/* Display Our Form */
123 123
 	?>
124 124
 	<!-- Freddie Logo -->
125
-	<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" />
125
+	<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" />
126 126
 
127
-	<h1>YIKES Easy Forms for MailChimp | <?php echo __( 'Edit' , 'yikes-inc-easy-mailchimp-extender' ) . ' ' . $form['form_name']; ?></h1>
127
+	<h1>YIKES Easy Forms for MailChimp | <?php echo __( 'Edit', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . $form[ 'form_name' ]; ?></h1>
128 128
 
129 129
 	<!-- Settings Page Description -->
130
-	<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>
130
+	<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>
131 131
 
132 132
 	<?php
133
-	if ( isset( $_REQUEST['updated-form'] ) && $_REQUEST['updated-form'] == 'true' ) {
133
+	if ( isset( $_REQUEST[ 'updated-form' ] ) && $_REQUEST[ 'updated-form' ] == 'true' ) {
134 134
 		?>
135 135
 		<div class="updated manage-form-admin-notice">
136 136
 			<p><?php _e( 'Opt-in form successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -154,15 +154,15 @@  discard block
 block discarded – undo
154 154
 						<div class="inside">
155 155
 
156 156
 							<label for="form-name">
157
-								<h3 class="bg-transparent"><?php _e( 'Form Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
158
-								<input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo stripslashes( esc_html( $form['form_name'] ) ); ?>" class="widefat" />
159
-								<p class="description"><?php _e( "The title of this signup form." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
157
+								<h3 class="bg-transparent"><?php _e( 'Form Name', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
158
+								<input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo stripslashes( esc_html( $form[ 'form_name' ] ) ); ?>" class="widefat" />
159
+								<p class="description"><?php _e( "The title of this signup form.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
160 160
 							</label>
161 161
 
162 162
 							<label for="form-description">
163
-								<h3 class="bg-transparent"><?php _e( 'Form Description' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
164
-								<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>
165
-								<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>
163
+								<h3 class="bg-transparent"><?php _e( 'Form Description', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
164
+								<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>
165
+								<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>
166 166
 								<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>
167 167
 							</label>
168 168
 
@@ -178,16 +178,16 @@  discard block
 block discarded – undo
178 178
 
179 179
 						<ul id="yikes_easy_mc_toolbar_links">
180 180
 							<li class="hidden_setting_list">
181
-								<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>
181
+								<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>
182 182
 								<div class="selected_setting_triangle"></div>
183 183
 							</li>
184 184
 							<li class="hidden_setting_list">
185
-								<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>
185
+								<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>
186 186
 							</li>
187 187
 							<li class="hidden_setting_list">
188
-								<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>
188
+								<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>
189 189
 							</li>
190
-							<?php do_action( 'yikes-mailchimp-edit-form-section-links' , $form ); ?>
190
+							<?php do_action( 'yikes-mailchimp-edit-form-section-links', $form ); ?>
191 191
 						</ul>
192 192
 
193 193
 					</div>
@@ -208,22 +208,22 @@  discard block
 block discarded – undo
208 208
 											<div class="meta-box-sortables ui-sortable">
209 209
 												<div class="postbox yikes-easy-mc-postbox">
210 210
 													<!-- container title -->
211
-													<h3 class="edit-form-title" id="form-builder-div" data-list-id="<?php echo $form['list_id'] ?>" ><?php _e( 'Form Builder' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
212
-													<p id="edit-form-description" class="description edit-form-description-form-builder"><?php _e( 'Click a field to show its advanced options or drag fields to re-arrange them. Click <span class="dashicons dashicons-edit"></span> to edit a field label. Make sure you hit "Update Form" to save all of your changes.' , 'yikes-inc-easy-mailchimp-extender' );?></p>
211
+													<h3 class="edit-form-title" id="form-builder-div" data-list-id="<?php echo $form[ 'list_id' ] ?>" ><?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
212
+													<p id="edit-form-description" class="description edit-form-description-form-builder"><?php _e( 'Click a field to show its advanced options or drag fields to re-arrange them. Click <span class="dashicons dashicons-edit"></span> to edit a field label. Make sure you hit "Update Form" to save all of your changes.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
213 213
 													<div id="form-builder-container" class="inside">
214 214
 														<!-- #poststuff -->
215
-														<?php echo $this->generate_form_editor( $form['fields'], $form['list_id'] , $available_merge_variables , isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
215
+														<?php echo $this->generate_form_editor( $form[ 'fields' ], $form[ 'list_id' ], $available_merge_variables, isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
216 216
 													</div>
217 217
 
218 218
 													<!-- Bulk Delete Form Fields -->
219
-													<a href="#" class="clear-form-fields" <?php if( isset( $form['fields'] ) && count( $form['fields'] ) <= 0 ) { ?> style="display:none;" <?php } ?>><?php _e( 'Clear Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
219
+													<a href="#" class="clear-form-fields" <?php if ( isset( $form[ 'fields' ] ) && count( $form[ 'fields' ] ) <= 0 ) { ?> style="display:none;" <?php } ?>><?php _e( 'Clear Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
220 220
 
221 221
 													<?php
222
-														$display_none = ( isset( $form['fields'] ) && count( $form['fields'] ) <= 0 ) ? 'display:none;' : '';
222
+														$display_none = ( isset( $form[ 'fields' ] ) && count( $form[ 'fields' ] ) <= 0 ) ? 'display:none;' : '';
223 223
 													?>
224 224
 
225 225
 													<!-- Save Fields Button -->
226
-													<?php submit_button( __( 'Update Form' ) , 'primary' , '' , false , array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;'.$display_none ) ); ?>
226
+													<?php submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;' . $display_none ) ); ?>
227 227
 
228 228
 													<!-- .inside -->
229 229
 												</div>
@@ -236,15 +236,15 @@  discard block
 block discarded – undo
236 236
 										<div id="postbox-container-1" class="postbox-container">
237 237
 											<div class="meta-box-sortables">
238 238
 												<div class="postbox yikes-easy-mc-postbox">
239
-													<h3 class="edit-form-title"><span><?php _e( "Form Fields &amp; Interest Groups" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
239
+													<h3 class="edit-form-title"><span><?php _e( "Form Fields &amp; Interest Groups", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
240 240
 													<div class="inside">
241 241
 
242 242
 														<h3 class="nav-tab-wrapper mv_ig_list">
243
-															<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>
244
-															<?php if( !isset( $merge_variable_error ) ) { ?>
245
-																<a href="#" class="nav-tab"><?php _e( 'Interest Groups' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
243
+															<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>
244
+															<?php if ( ! isset( $merge_variable_error ) ) { ?>
245
+																<a href="#" class="nav-tab"><?php _e( 'Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
246 246
 															<?php } else { ?>
247
-																<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>
247
+																<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>
248 248
 															<?php } ?>
249 249
 														</h3>
250 250
 
@@ -252,11 +252,11 @@  discard block
 block discarded – undo
252 252
 
253 253
 															<div id="merge-variables-container" class="list-container">
254 254
 																<?php
255
-																	if( ! isset( $merge_variable_error ) ) {
255
+																	if ( ! isset( $merge_variable_error ) ) {
256 256
 																		// build a list of available merge variables,
257 257
 																		// but exclude the ones already assigned to the form
258
-																		echo '<p class="description">' . __( "Select the fields below to add to the form builder." , 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
259
-																		$this->build_available_merge_vars( $form['fields'] , $available_merge_variables );
258
+																		echo '<p class="description">' . __( "Select the fields below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
259
+																		$this->build_available_merge_vars( $form[ 'fields' ], $available_merge_variables );
260 260
 																	} else {
261 261
 																		echo $merge_variable_error;
262 262
 																	}
@@ -265,14 +265,14 @@  discard block
 block discarded – undo
265 265
 
266 266
 															<div id="interest-groups-container" class="list-container">
267 267
 																<?php
268
-																	if( isset( $interest_groupings ) && ! isset( $interest_groupings['error'] ) ) {
268
+																	if ( isset( $interest_groupings ) && ! isset( $interest_groupings[ 'error' ] ) ) {
269 269
 																		// build a list of available merge variables,
270 270
 																		// but exclude the ones already assigned to the form
271
-																		echo '<p class="description">' . __( "Select an interest group below to add to the form builder." , 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
271
+																		echo '<p class="description">' . __( "Select an interest group below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
272 272
 																		// $this->build_available_merge_vars( $form['fields'] , $available_merge_variables );
273
-																		$this->build_available_interest_groups( $form['fields'] , $interest_groupings , $form['list_id'] );
273
+																		$this->build_available_interest_groups( $form[ 'fields' ], $interest_groupings, $form[ 'list_id' ] );
274 274
 																	} else {
275
-																		echo '<p class="description">' . $interest_groupings['error'] . '</p>';
275
+																		echo '<p class="description">' . $interest_groupings[ 'error' ] . '</p>';
276 276
 																	}
277 277
 																?>
278 278
 															</div>
@@ -305,19 +305,19 @@  discard block
 block discarded – undo
305 305
 										<div id="post-body-content">
306 306
 											<div class="meta-box-sortables ui-sortable">
307 307
 												<div class="postbox yikes-easy-mc-postbox">
308
-													<h3 class="edit-form-title"><span><?php _e( "Additional Form Settings" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
308
+													<h3 class="edit-form-title"><span><?php _e( "Additional Form Settings", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
309 309
 
310 310
 													<div class="inside form-settings-container">
311 311
 
312
-														<p class="edit-form-description"><?php _e( "Adjust some additional form settings below." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
312
+														<p class="edit-form-description"><?php _e( "Adjust some additional form settings below.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
313 313
 
314 314
 														<!-- begin form classes section -->
315 315
 														<strong class="section-title first"><?php _e( 'Overall Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
316 316
 														<section class="section-interior">
317 317
 
318 318
 															<!-- form classes -->
319
-															<label for="yikes-easy-mc-form-class-names"><strong><?php _e( 'Form Classes' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
320
-																<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' ); ?>" >
319
+															<label for="yikes-easy-mc-form-class-names"><strong><?php _e( 'Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
320
+																<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' ); ?>" >
321 321
 																<p class="description"><?php printf( __( 'Add additional class names to the %s element.', 'yikes-inc-easy-mailchimp-extender' ), '<code>' . htmlentities( '<form>' ) . '</code>' ); ?></p>
322 322
 															</label>
323 323
 
@@ -330,12 +330,12 @@  discard block
 block discarded – undo
330 330
 
331 331
 															<!-- setup the checked state here -->
332 332
 															<!-- inline form -->
333
-															<strong><?php _e( 'Inline Form' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
333
+															<strong><?php _e( 'Inline Form', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
334 334
 															<label class="inline-form-label">
335
-																<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' ); ?>
335
+																<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' ); ?>
336 336
 															</label>
337 337
 															<label class="inline-form-label">
338
-																<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' ); ?>
338
+																<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' ); ?>
339 339
 															</label>
340 340
 															<p class="description"><?php _e( 'Programatically setup this form so that all fields are on the same line.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
341 341
 															<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>
@@ -348,21 +348,21 @@  discard block
 block discarded – undo
348 348
 														<section class="section-interior">
349 349
 
350 350
 															<!-- Submit button type -->
351
-															<strong><?php _e( 'Submit Button Type' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
351
+															<strong><?php _e( 'Submit Button Type', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
352 352
 															<label class="inline-form-label">
353
-																<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' ); ?>
353
+																<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' ); ?>
354 354
 															</label>
355 355
 															<label class="inline-form-label">
356
-																<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' ); ?>
356
+																<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' ); ?>
357 357
 															</label>
358 358
 															<p class="description"><?php _e( 'Select the submit button type for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
359 359
 															<!-- end submit button type -->
360 360
 
361 361
 																<!-- Text submit button type -->
362
-																<section class="submit-button-type-text nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'image' ) { echo ' hidden'; } ?>">
362
+																<section class="submit-button-type-text nested-child<?php if ( $form_settings[ 'yikes-easy-mc-submit-button-type' ] == 'image' ) { echo ' hidden'; } ?>">
363 363
 																	<!-- submit button text -->
364
-																	<label for="yikes-easy-mc-submit-button-text"><strong><?php _e( 'Submit Button Text' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
365
-																		<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' ); ?>">
364
+																	<label for="yikes-easy-mc-submit-button-text"><strong><?php _e( 'Submit Button Text', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
365
+																		<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' ); ?>">
366 366
 																		<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>
367 367
 
368 368
 																		<p class="description"><?php _e( 'The submit button text set above, can be overwritten on a per-form basis using shortcodes.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -371,9 +371,9 @@  discard block
 block discarded – undo
371 371
 																<!-- end text submit button type -->
372 372
 
373 373
 																<!-- Image submit button type -->
374
-																<section class="submit-button-type-image nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'text' ) { echo ' hidden'; } ?>">
375
-																	<label for="yikes-easy-mc-submit-button-image"><strong><?php _e( 'Submit Button URL' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
376
-																		<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' ); ?>">
374
+																<section class="submit-button-type-image nested-child<?php if ( $form_settings[ 'yikes-easy-mc-submit-button-type' ] == 'text' ) { echo ' hidden'; } ?>">
375
+																	<label for="yikes-easy-mc-submit-button-image"><strong><?php _e( 'Submit Button URL', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
376
+																		<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' ); ?>">
377 377
 																		<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>
378 378
 																	</label>
379 379
 																</section>
@@ -381,8 +381,8 @@  discard block
 block discarded – undo
381 381
 
382 382
 
383 383
 															<!-- submit button classes -->
384
-															<label for="yikes-easy-mc-form-submit-button-classes"><strong style="float:left;"><?php _e( 'Submit Button Classes' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
385
-																<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' ); ?>" >
384
+															<label for="yikes-easy-mc-form-submit-button-classes"><strong style="float:left;"><?php _e( 'Submit Button Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
385
+																<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' ); ?>" >
386 386
 																<p class="description"><?php _e( 'Add custom classes to the submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
387 387
 															</label>
388 388
 															<!-- end submit button classes -->
@@ -395,45 +395,45 @@  discard block
 block discarded – undo
395 395
 														<section class="section-interior">
396 396
 															<!-- Schedule form -->
397 397
 															<label class="inline-form-label">
398
-																<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' ); ?>
398
+																<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' ); ?>
399 399
 															</label>
400 400
 															<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>
401 401
 															<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>
402 402
 																<!-- Start Date Limitation Nested -->
403
-																<section class="date-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?>">
403
+																<section class="date-restriction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-schedule' ] == '0' ) { echo ' hidden'; } ?>">
404 404
 																	<!-- Start Date -->
405
-																	<label for="yikes-easy-mc-form-restriction-start-date"><strong><?php _e( 'Start Date' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
406
-																		<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 ! empty($form_settings['yikes-easy-mc-form-restriction-start'] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings['yikes-easy-mc-form-restriction-start'] ) : ''; ?>" >
405
+																	<label for="yikes-easy-mc-form-restriction-start-date"><strong><?php _e( 'Start Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
406
+																		<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 ! empty( $form_settings[ 'yikes-easy-mc-form-restriction-start' ] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings[ 'yikes-easy-mc-form-restriction-start' ] ) : ''; ?>" >
407 407
 																		<?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
408 408
 																	</label>
409 409
 
410 410
 																	<!-- Start Time -->
411
-																	<label for="yikes-easy-mc-form-restriction-start-time"><strong><?php _e( 'Start Time' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
412
-																		<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 ! empty( $form_settings['yikes-easy-mc-form-restriction-start'] ) ? date( 'g:iA', $form_settings['yikes-easy-mc-form-restriction-start'] ) : ''; ?>" >
411
+																	<label for="yikes-easy-mc-form-restriction-start-time"><strong><?php _e( 'Start Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
412
+																		<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 ! empty( $form_settings[ 'yikes-easy-mc-form-restriction-start' ] ) ? date( 'g:iA', $form_settings[ 'yikes-easy-mc-form-restriction-start' ] ) : ''; ?>" >
413 413
 																	</label>
414 414
 																	<p class="description"><?php _e( 'Set the dates that this form should display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
415 415
 																</section>
416 416
 																<!-- end Start Date Limitation Nested -->
417 417
 
418 418
 																<!-- End Date Limitation Nested -->
419
-																<section class="date-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?> last">
419
+																<section class="date-restriction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-schedule' ] == '0' ) { echo ' hidden'; } ?> last">
420 420
 																	<!-- End Date -->
421
-																	<label for="yikes-easy-mc-form-restriction-end-date"><strong><?php _e( 'End Date' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
422
-																		<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 ! empty(  $form_settings['yikes-easy-mc-form-restriction-end'] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings['yikes-easy-mc-form-restriction-end'] ) : ''; ?>" >
421
+																	<label for="yikes-easy-mc-form-restriction-end-date"><strong><?php _e( 'End Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
422
+																		<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 ! empty( $form_settings[ 'yikes-easy-mc-form-restriction-end' ] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings[ 'yikes-easy-mc-form-restriction-end' ] ) : ''; ?>" >
423 423
 																		<?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
424 424
 																	</label>
425 425
 
426 426
 																	<!-- End Time -->
427
-																	<label for="yikes-easy-mc-form-restriction-end-time"><strong><?php _e( 'End Time' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
428
-																		<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 ! empty( $form_settings['yikes-easy-mc-form-restriction-end'] ) ? date( 'g:iA', $form_settings['yikes-easy-mc-form-restriction-end'] ) : ''; ?>" >
427
+																	<label for="yikes-easy-mc-form-restriction-end-time"><strong><?php _e( 'End Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
428
+																		<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 ! empty( $form_settings[ 'yikes-easy-mc-form-restriction-end' ] ) ? date( 'g:iA', $form_settings[ 'yikes-easy-mc-form-restriction-end' ] ) : ''; ?>" >
429 429
 																	</label>
430 430
 																	<p class="description"><?php _e( 'Set the dates that this form should no longer display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
431 431
 
432 432
 																	<!-- Form pending message -->
433
-																	<label for="yikes-easy-mc-form-restriction-pending-message"><strong><?php _e( 'Pending Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
433
+																	<label for="yikes-easy-mc-form-restriction-pending-message"><strong><?php _e( 'Pending Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
434 434
 																		<?php
435 435
 																			wp_editor(
436
-																				$form_settings['yikes-easy-mc-form-restriction-pending-message'],
436
+																				$form_settings[ 'yikes-easy-mc-form-restriction-pending-message' ],
437 437
 																				'yikes-easy-mc-form-restriction-pending-message',
438 438
 																				array(
439 439
 																					'editor_class' => 'yikes-easy-mc-form-restriction-pending-message',
@@ -445,10 +445,10 @@  discard block
 block discarded – undo
445 445
 																	<p class="description"><?php _e( 'Set the message that should display prior to the form being active.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
446 446
 
447 447
 																	<!-- form expired message -->
448
-																	<label for="yikes-easy-mc-form-restriction-expired-message"><strong><?php _e( 'Expired Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
448
+																	<label for="yikes-easy-mc-form-restriction-expired-message"><strong><?php _e( 'Expired Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
449 449
 																		<?php
450 450
 																			wp_editor(
451
-																				$form_settings['yikes-easy-mc-form-restriction-expired-message'],
451
+																				$form_settings[ 'yikes-easy-mc-form-restriction-expired-message' ],
452 452
 																				'yikes-easy-mc-form-restriction-expired-message',
453 453
 																				array(
454 454
 																					'editor_class' => 'yikes-easy-mc-form-restriction-expired-message',
@@ -463,16 +463,16 @@  discard block
 block discarded – undo
463 463
 
464 464
 																<!-- Require Users to be Logged In -->
465 465
 																<label class="inline-form-label">
466
-																	<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' ); ?>
466
+																	<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' ); ?>
467 467
 																</label>
468 468
 																<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>
469 469
 
470 470
 																<!-- Require Login Message -->
471
-																<section class="login-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-login-required'] == '0' ) { echo ' hidden'; } ?>">
472
-																	<label for="yikes-easy-mc-form-restriction-login-message"><strong><?php _e( 'Required Login Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
471
+																<section class="login-restriction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-login-required' ] == '0' ) { echo ' hidden'; } ?>">
472
+																	<label for="yikes-easy-mc-form-restriction-login-message"><strong><?php _e( 'Required Login Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
473 473
 																		<?php
474 474
 																			wp_editor(
475
-																				$form_settings['yikes-easy-mc-form-restriction-login-message'],
475
+																				$form_settings[ 'yikes-easy-mc-form-restriction-login-message' ],
476 476
 																				'yikes-easy-mc-form-restriction-login-message',
477 477
 																				array(
478 478
 																					'editor_class' => 'yikes-easy-mc-form-restriction-login-message',
@@ -501,14 +501,14 @@  discard block
 block discarded – undo
501 501
 										<div id="postbox-container-1" class="postbox-container">
502 502
 											<div class="meta-box-sortables">
503 503
 												<div class="postbox yikes-easy-mc-postbox">
504
-													<h3 class="edit-form-title"><span><?php _e( "Form Settings Explained" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
504
+													<h3 class="edit-form-title"><span><?php _e( "Form Settings Explained", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
505 505
 													<div class="inside">
506 506
 
507 507
 														<ul>
508
-															<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>
509
-															<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>
510
-															<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>
511
-															<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>
508
+															<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>
509
+															<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>
510
+															<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>
511
+															<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>
512 512
 														</ul>
513 513
 
514 514
 													</div>
@@ -536,78 +536,78 @@  discard block
 block discarded – undo
536 536
 										<div id="post-body-content">
537 537
 											<div class="meta-box-sortables ui-sortable">
538 538
 												<div class="postbox yikes-easy-mc-postbox">
539
-													<h3 class="edit-form-title"><span><?php _e( "Custom Messages" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
539
+													<h3 class="edit-form-title"><span><?php _e( "Custom Messages", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
540 540
 
541 541
 													<div class="inside error-message-container">
542 542
 														<?php
543 543
 															// build our default options
544 544
 															$error_message_array = array(
545
-																'success' => __( 'Thank You for subscribing! Check your email for the confirmation message.' , 'yikes-inc-easy-mailchimp-extender' ),
546
-																'success-single-optin' => __( 'Thank you for subscribing!' , 'yikes-inc-easy-mailchimp-extender' ),
545
+																'success' => __( 'Thank You for subscribing! Check your email for the confirmation message.', 'yikes-inc-easy-mailchimp-extender' ),
546
+																'success-single-optin' => __( 'Thank you for subscribing!', 'yikes-inc-easy-mailchimp-extender' ),
547 547
 																'success-resubscribed' => __( 'Thank you for already being a subscriber! Your profile info has been updated.', 'yikes-inc-easy-mailchimp-extender' ),
548
-																'general-error' => __( "Whoops! It looks like something went wrong. Please try again." , 'yikes-inc-easy-mailchimp-extender' ),
549
-																'email-exists-error' => __( "The email you entered is already a subscriber to this list." , 'yikes-inc-easy-mailchimp-extender' ),
548
+																'general-error' => __( "Whoops! It looks like something went wrong. Please try again.", 'yikes-inc-easy-mailchimp-extender' ),
549
+																'email-exists-error' => __( "The email you entered is already a subscriber to this list.", 'yikes-inc-easy-mailchimp-extender' ),
550 550
 																'update-link' => __( "You're already subscribed. To update your MailChimp profile, please [link]click to send yourself an update link[/link].", 'yikes-inc-easy-mailchimp-extender' ),
551 551
 																'email-subject' => __( 'MailChimp Profile Update', 'yikes-inc-easy-mailchimp-extender' ),
552 552
 																'update-email-success' => sprintf( __( '%s Update email successfully sent. Please check your inbox for the message.', 'yikes-inc-easy-mailchimp-extender' ), '&#10004;' ),
553 553
 																'update-email-failure' => sprintf( __( '%s Email failed to send. Please contact the site administrator.', 'yikes-inc-easy-mailchimp-extender' ), '&#10005;' ),
554 554
 
555 555
 															);
556
-															$global_error_messages = get_option( 'yikes-easy-mc-global-error-messages' , $error_message_array );
556
+															$global_error_messages = get_option( 'yikes-easy-mc-global-error-messages', $error_message_array );
557 557
 														?>
558
-														<p class="edit-form-description"><?php _e( "Customize the response messages for this form. Leave the field blank to use the default message. The messages shown below depend on the Opt-in Settings chosen." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
558
+														<p class="edit-form-description"><?php _e( "Customize the response messages for this form. Leave the field blank to use the default message. The messages shown below depend on the Opt-in Settings chosen.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
559 559
 
560 560
 														<!-- Success Message (refactored @ 6.3.0 for double optin) -->
561
-														<label for="yikes-easy-mc-success-message"><strong><?php _e( 'Success: Double opt-in' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
562
-															<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']; ?>" >
561
+														<label for="yikes-easy-mc-success-message"><strong><?php _e( 'Success: Double opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
562
+															<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' ]; ?>" >
563 563
 														</label>
564 564
 														<!-- Success Message (for single optin) -->
565
-														<label for="yikes-easy-mc-success-single-optin-message"><strong><?php _e( 'Success: Single opt-in' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
566
-															<input type="text" class="widefat" name="yikes-easy-mc-success-single-optin-message" id="yikes-easy-mc-success-single-optin-message" value="<?php echo isset( $error_messages['success-single-optin'] ) ? stripslashes( esc_html( $error_messages['success-single-optin'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success-single-optin']; ?>" >
565
+														<label for="yikes-easy-mc-success-single-optin-message"><strong><?php _e( 'Success: Single opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
566
+															<input type="text" class="widefat" name="yikes-easy-mc-success-single-optin-message" id="yikes-easy-mc-success-single-optin-message" value="<?php echo isset( $error_messages[ 'success-single-optin' ] ) ? stripslashes( esc_html( $error_messages[ 'success-single-optin' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'success-single-optin' ]; ?>" >
567 567
 														</label>
568 568
 														<!-- Resubscribing users when updating your profile via the form is allowed -->
569
-														<label for="yikes-easy-mc-user-resubscribed-success-message"><strong><?php _e( 'Success: Re-subscriber' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
570
-															<input type="text" class="widefat" name="yikes-easy-mc-user-resubscribed-success-message" id="yikes-easy-mc-user-resubscribed-success-message" value="<?php echo isset( $error_messages['success-resubscribed'] ) ? stripslashes( esc_html( $error_messages['success-resubscribed'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success-resubscribed']; ?>">
569
+														<label for="yikes-easy-mc-user-resubscribed-success-message"><strong><?php _e( 'Success: Re-subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
570
+															<input type="text" class="widefat" name="yikes-easy-mc-user-resubscribed-success-message" id="yikes-easy-mc-user-resubscribed-success-message" value="<?php echo isset( $error_messages[ 'success-resubscribed' ] ) ? stripslashes( esc_html( $error_messages[ 'success-resubscribed' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'success-resubscribed' ]; ?>">
571 571
 														</label>
572 572
 
573 573
 														<!-- Click the link to update user profile etc. etc. -->
574
-														<label for="yikes-easy-mc-user-subscribed-update-link"><strong><?php _e( 'Success: Re-subscriber with link to email profile update message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
575
-															<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']; ?>">
574
+														<label for="yikes-easy-mc-user-subscribed-update-link"><strong><?php _e( 'Success: Re-subscriber with link to email profile update message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
575
+															<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' ]; ?>">
576 576
 														</label>
577 577
 
578 578
 														<!-- Email Address is already subscribed -->
579
-														<label for="yikes-easy-mc-user-subscribed-message"><strong><?php _e( 'Error: Re-subscribers not permitted' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
580
-															<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']; ?>">
579
+														<label for="yikes-easy-mc-user-subscribed-message"><strong><?php _e( 'Error: Re-subscribers not permitted', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
580
+															<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' ]; ?>">
581 581
 														</label>
582 582
 
583 583
 														<!-- Update email successfully sent -->
584
-														<label for="yikes-easy-mc-update-email-successful"><strong><?php _e( 'Success: Update email successfully sent' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
585
-															<input type="text" class="widefat" name="yikes-easy-mc-update-email-successful" id="yikes-easy-mc-update-email-successful" value="<?php echo isset( $error_messages['update-email-success'] ) ? stripslashes( esc_attr( $error_messages['update-email-success'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-email-success']; ?>" >
584
+														<label for="yikes-easy-mc-update-email-successful"><strong><?php _e( 'Success: Update email successfully sent', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
585
+															<input type="text" class="widefat" name="yikes-easy-mc-update-email-successful" id="yikes-easy-mc-update-email-successful" value="<?php echo isset( $error_messages[ 'update-email-success' ] ) ? stripslashes( esc_attr( $error_messages[ 'update-email-success' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'update-email-success' ]; ?>" >
586 586
 														</label>
587 587
 
588 588
 														<!-- Update email failed to send -->
589
-														<label for="yikes-easy-mc-update-email-failure"><strong><?php _e( 'Error: Update email failed to send' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
590
-															<input type="text" class="widefat" name="yikes-easy-mc-update-email-failure" id="yikes-easy-mc-update-email-failure" value="<?php echo isset( $error_messages['update-email-failure'] ) ? stripslashes( esc_attr( $error_messages['update-email-failure'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-email-failure']; ?>" >
589
+														<label for="yikes-easy-mc-update-email-failure"><strong><?php _e( 'Error: Update email failed to send', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
590
+															<input type="text" class="widefat" name="yikes-easy-mc-update-email-failure" id="yikes-easy-mc-update-email-failure" value="<?php echo isset( $error_messages[ 'update-email-failure' ] ) ? stripslashes( esc_attr( $error_messages[ 'update-email-failure' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'update-email-failure' ]; ?>" >
591 591
 														</label>
592 592
 
593 593
 														<!-- General Error Message -->
594
-														<label for="yikes-easy-mc-general-error-message"><strong><?php _e( 'Error: General' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
595
-															<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
+														<label for="yikes-easy-mc-general-error-message"><strong><?php _e( 'Error: General', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
595
+															<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' ]; ?>" >
596 596
 														</label>
597 597
 
598 598
 														<!-- Email Section -->
599 599
 
600 600
 														<hr>
601 601
 														<div class="yikes-easy-mc-custom-messages-email-section">
602
-															<p class="edit-form-description"><?php _e( 'Customize the profile verification email sent to re-subscribers. Leave the text unedited to use the default message.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
602
+															<p class="edit-form-description"><?php _e( 'Customize the profile verification email sent to re-subscribers. Leave the text unedited to use the default message.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
603 603
 															<!-- Email Subject -->
604
-															<label for="yikes-easy-mc-user-email-subject"><strong><?php _e( 'Email Subject' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
605
-																<input type="text" class="widefat" name="yikes-easy-mc-user-email-subject" id="yikes-easy-mc-user-email-subject" value="<?php echo isset( $error_messages['email-subject'] ) ? stripslashes( esc_html( $error_messages['email-subject'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['email-subject']; ?>">
604
+															<label for="yikes-easy-mc-user-email-subject"><strong><?php _e( 'Email Subject', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
605
+																<input type="text" class="widefat" name="yikes-easy-mc-user-email-subject" id="yikes-easy-mc-user-email-subject" value="<?php echo isset( $error_messages[ 'email-subject' ] ) ? stripslashes( esc_html( $error_messages[ 'email-subject' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'email-subject' ]; ?>">
606 606
 															</label>
607 607
 															<!-- Email Body -->
608
-															<label for="yikes-easy-mc-user-email-body"><strong><?php _e( 'Email Body' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
608
+															<label for="yikes-easy-mc-user-email-body"><strong><?php _e( 'Email Body', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
609 609
 																<?php 
610
-																	$editor_content = ( isset( $error_messages['email-body'] ) && ! empty( $error_messages['email-body'] ) ) ? $error_messages['email-body'] : Yikes_Inc_Easy_Mailchimp_Forms_Admin::generate_default_email_body();
610
+																	$editor_content = ( isset( $error_messages[ 'email-body' ] ) && ! empty( $error_messages[ 'email-body' ] ) ) ? $error_messages[ 'email-body' ] : Yikes_Inc_Easy_Mailchimp_Forms_Admin::generate_default_email_body();
611 611
 																	wp_editor( $editor_content, 'yikes-easy-mc-user-email-body', array( 'textarea_id' => 'yikes-easy-mc-user-email-body' ) ); 
612 612
 																?>
613 613
 															</label>
@@ -625,17 +625,17 @@  discard block
 block discarded – undo
625 625
 										<div id="postbox-container-1" class="postbox-container yikes-easy-mc-custom-messages-section-help">
626 626
 											<div class="meta-box-sortables">
627 627
 												<div class="postbox yikes-easy-mc-postbox">
628
-													<h3 class="edit-form-title"><span><?php _e( "Custom Message Help" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
628
+													<h3 class="edit-form-title"><span><?php _e( "Custom Message Help", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
629 629
 													<div class="inside">
630 630
 														<ul>
631
-															<li class="yikes-easy-mc-success-message-help"><strong><?php _e( 'Success: Double opt-in' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after a double opt-in form has been submitted.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
632
-															<li class="yikes-easy-mc-success-single-optin-message-help"><strong><?php _e( 'Success Message: Single opt-in' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after a single opt-in form has been submitted.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
633
-															<li class="yikes-easy-mc-user-resubscribed-success-message-help"><strong><?php _e( 'Success: Re-subscriber' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after a subscriber submits a form for a list they are already subscribed to.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
634
-															<li class="yikes-easy-mc-user-subscribed-update-link-help"><strong><?php _e( 'Success: Re-subscriber with link to email profile update message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after a subscriber submits a form for a list they are already subscribed to. Wrap the text you want to be the link in <code>[link][/link]</code> tags.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
635
-															<li class="yikes-easy-mc-update-email-successful-help"><strong><?php _e( 'Success: Update email successfully sent', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after an update profile email is successfully sent.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
636
-															<li class="yikes-easy-mc-update-email-failure-help"><strong><?php _e( 'Error: Update email failed to send' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after an update profile email failed to send.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
637
-															<li class="yikes-easy-mc-user-subscribed-message-help"><strong><?php _e( 'Error: Re-subscribers not permitted' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after a subscriber tries to join a list they are already subscribed to. You can display the user\'s email in the message  using an <code>[email]</code> tag.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
638
-															<li class="yikes-easy-mc-general-error-message-help"><strong><?php _e( 'Error: General' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed if a form error has occurred.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
631
+															<li class="yikes-easy-mc-success-message-help"><strong><?php _e( 'Success: Double opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after a double opt-in form has been submitted.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
632
+															<li class="yikes-easy-mc-success-single-optin-message-help"><strong><?php _e( 'Success Message: Single opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after a single opt-in form has been submitted.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
633
+															<li class="yikes-easy-mc-user-resubscribed-success-message-help"><strong><?php _e( 'Success: Re-subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after a subscriber submits a form for a list they are already subscribed to.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
634
+															<li class="yikes-easy-mc-user-subscribed-update-link-help"><strong><?php _e( 'Success: Re-subscriber with link to email profile update message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after a subscriber submits a form for a list they are already subscribed to. Wrap the text you want to be the link in <code>[link][/link]</code> tags.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
635
+															<li class="yikes-easy-mc-update-email-successful-help"><strong><?php _e( 'Success: Update email successfully sent', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after an update profile email is successfully sent.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
636
+															<li class="yikes-easy-mc-update-email-failure-help"><strong><?php _e( 'Error: Update email failed to send', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after an update profile email failed to send.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
637
+															<li class="yikes-easy-mc-user-subscribed-message-help"><strong><?php _e( 'Error: Re-subscribers not permitted', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed after a subscriber tries to join a list they are already subscribed to. You can display the user\'s email in the message  using an <code>[email]</code> tag.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
638
+															<li class="yikes-easy-mc-general-error-message-help"><strong><?php _e( 'Error: General', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The message displayed if a form error has occurred.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
639 639
 														</ul>
640 640
 
641 641
 													</div>
@@ -643,13 +643,13 @@  discard block
 block discarded – undo
643 643
 												</div>
644 644
 
645 645
 												<div class="postbox yikes-easy-mc-postbox yikes-easy-mc-custom-messages-email-section-help">
646
-													<h3 class="edit-form-title"><span><?php _e( "Email Message Help" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
646
+													<h3 class="edit-form-title"><span><?php _e( "Email Message Help", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
647 647
 													<div class="inside">
648 648
 
649 649
 														<ul>
650
-															<li class="yikes-easy-mc-user-email-subject-help"><strong><?php _e( 'Email Subject' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The subject of the email sent to the user.' , 'yikes-inc-easy-mailchimp-extender' ); ?></li>
650
+															<li class="yikes-easy-mc-user-email-subject-help"><strong><?php _e( 'Email Subject', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> <?php _e( 'The subject of the email sent to the user.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
651 651
 															<li class="yikes-easy-mc-user-email-body-help">
652
-																<strong><?php _e( 'Email Body' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong> 
652
+																<strong><?php _e( 'Email Body', 'yikes-inc-easy-mailchimp-extender' ); ?></strong> 
653 653
 																<?php echo __( 'The text in the profile update verification email sent to the subscriber. Wrap the text you want to be the link in <code>[link][/link]</code> tags. The link is required in the email, please don\'t leave these tags out.', 'yikes-inc-easy-mailchimp-extender' ); ?>
654 654
 															</li>
655 655
 															<li class="yikes-easy-mc-user-email-body-help">
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
 																	<li><?php echo sprintf( __( '<code>[url]</code> displays your website\'s URL (i.e. %s).', 'yikes-inc-easy-mailchimp-extender' ), get_home_url() ); ?></li>
660 660
 																	<li><?php echo __( '<code>[email]</code> displays the subscriber\'s email address.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
661 661
 																	<li><?php echo __( '<code>[subscriber_id]</code> displays the subscriber\'s unique email ID.', 'yikes-inc-easy-mailchimp-extender' ); ?></li>
662
-																	<li><?php echo sprintf( __( '<code>[form_name]</code> displays your form\'s name (i.e. %s).', 'yikes-inc-easy-mailchimp-extender' ), $form['form_name'] ); ?></li>
662
+																	<li><?php echo sprintf( __( '<code>[form_name]</code> displays your form\'s name (i.e. %s).', 'yikes-inc-easy-mailchimp-extender' ), $form[ 'form_name' ] ); ?></li>
663 663
 																</ul>
664 664
 															</li>
665 665
 														</ul>
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
 							</label>
686 686
 							<!-- End Error Messages -->
687 687
 
688
-							<?php do_action( 'yikes-mailchimp-edit-form-sections' , $form ); ?>
688
+							<?php do_action( 'yikes-mailchimp-edit-form-sections', $form ); ?>
689 689
 
690 690
 						</div>
691 691
 						<!-- .inside -->
@@ -700,103 +700,103 @@  discard block
 block discarded – undo
700 700
 			<div id="postbox-container-1" class="postbox-container  yikes-easy-forms-sidebar">
701 701
 				<div class="meta-box-sortables">
702 702
 					<div class="postbox yikes-easy-mc-postbox">
703
-						<h3><span><?php _e( 'Form Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
703
+						<h3><span><?php _e( 'Form Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
704 704
 
705 705
 						<div class="inside">
706 706
 								<p class="inside-section-1">
707
-									<label for="shortcode"><?php _e( 'Edit Another Form' , 'yikes-inc-easy-mailchimp-extender' ); ?><br />
707
+									<label for="shortcode"><?php _e( 'Edit Another Form', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
708 708
 										<select class="widefat" name="form_switcher" id="form_switcher" onchange="YIKES_Easy_MC_SwitchForm(jQuery(this).val());">
709
-											<?php foreach( $all_forms as $single_form ) { ?>
710
-												<option <?php selected( $form_id , $single_form['id'] ); ?>value="<?php echo $single_form['id']; ?>"><?php echo $single_form['form_name']; ?></option>
709
+											<?php foreach ( $all_forms as $single_form ) { ?>
710
+												<option <?php selected( $form_id, $single_form[ 'id' ] ); ?>value="<?php echo $single_form[ 'id' ]; ?>"><?php echo $single_form[ 'form_name' ]; ?></option>
711 711
 											<?php } ?>
712 712
 										</select>
713 713
 									</label>
714 714
 								</p>
715 715
 
716 716
 								<p class="inside-section-2">
717
-									<label for="shortcode"><?php _e( 'Shortcode' , 'yikes-inc-easy-mailchimp-extender' ); ?><br />
718
-										<input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo $form['id']; ?>"]' />
717
+									<label for="shortcode"><?php _e( 'Shortcode', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
718
+										<input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo $form[ 'id' ]; ?>"]' />
719 719
 									</label>
720 720
 								</p>
721 721
 
722 722
 
723 723
 							<a href="#" class="expansion-section-title settings-sidebar">
724
-								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php _e( 'Associated List Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>
724
+								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php _e( 'Associated List Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
725 725
 							</a>
726 726
 							<div class="yikes-mc-settings-expansion-section">
727 727
 								<!-- Associated List -->
728 728
 								<p class="form-field-container">
729 729
 									<!-- necessary to prevent skipping on slideToggle(); -->
730
-									<label for="associated-list"><strong><?php _e( 'Associated List' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
730
+									<label for="associated-list"><strong><?php _e( 'Associated List', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
731 731
 										<select name="associated-list" id="associated-list" <?php if ( empty( $list_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() );">
732 732
 											<?php
733 733
 											if ( ! empty( $list_data ) ) {
734
-												foreach( $list_data as $mailing_list ) {
734
+												foreach ( $list_data as $mailing_list ) {
735 735
 													?>
736
-													<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>
736
+													<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>
737 737
 													<?php
738 738
 												}
739 739
 											} else {
740 740
 												?>
741
-												<option value="no-forms"><?php _e( 'No Lists Found' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
741
+												<option value="no-forms"><?php _e( 'No Lists Found', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
742 742
 												<?php
743 743
 											}
744 744
 											?>
745 745
 										</select>
746
-										<?php if( ! empty( $form['list_id'] ) ) { ?>
746
+										<?php if ( ! empty( $form[ 'list_id' ] ) ) { ?>
747 747
 											<p class="description view-list">
748
-												<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>
748
+												<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>
749 749
 											</p>
750 750
 											<p class="description">
751
-												<?php _e( "Users who sign up via this form will be added to the list selected above." , 'yikes-inc-easy-mailchimp-extender' ); ?>
751
+												<?php _e( "Users who sign up via this form will be added to the list selected above.", 'yikes-inc-easy-mailchimp-extender' ); ?>
752 752
 											</p>
753 753
 										<?php } else { ?>
754 754
 											<p class="description">
755
-												<?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' ); ?>.
755
+												<?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' ); ?>.
756 756
 											</p>
757 757
 										<?php } ?>
758 758
 
759 759
 										<!-- Display our Clear API Cache button -->
760 760
 										<?php if ( false === get_transient( 'yikes-easy-mailchimp-list-data' ) && false === get_transient( 'yikes-easy-mailchimp-profile-data' ) && false === get_transient( 'yikes-easy-mailchimp-account-data' ) && false === get_transient( 'yikesinc_eme_list_ids' ) && false === get_transient( 'yikes_eme_lists' ) ) { ?>
761
-											<p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No MailChimp data found in temporary cache storage.' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear MailChimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
761
+											<p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No MailChimp data found in temporary cache storage.', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear MailChimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
762 762
 										<?php } else { ?>
763
-											<p><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data' , 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" class="button-primary"><?php _e( 'Clear MailChimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
763
+											<p><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data', 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" class="button-primary"><?php _e( 'Clear MailChimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
764 764
 										<?php } ?>
765 765
 									</label>
766 766
 								</p>
767 767
 							</div>
768 768
 
769 769
 							<a href="#" class="expansion-section-title settings-sidebar">
770
-								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php _e( 'Opt-in Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>
770
+								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php _e( 'Opt-in Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
771 771
 							</a>
772 772
 							<div class="yikes-mc-settings-expansion-section">
773 773
 
774 774
 								<!-- Single or Double Opt-in -->
775 775
 								<?php
776
-									if( !isset( $optin_settings['optin'] ) ) {
777
-										$optin_settings['optin'] = '1';
776
+									if ( ! isset( $optin_settings[ 'optin' ] ) ) {
777
+										$optin_settings[ 'optin' ] = '1';
778 778
 									}
779 779
 								?>
780
-								<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>
780
+								<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>
781 781
 									<span class="edit-form-field-container-span">
782
-										<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>
783
-										&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>
782
+										<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>
783
+										&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>
784 784
 									</span>
785
-									<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>
785
+									<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>
786 786
 								</label></p>
787 787
 
788 788
 								<!-- Update Existing Users -->
789 789
 								<?php
790
-									if( !isset( $optin_settings['update_existing_user'] ) ) {
791
-										$optin_settings['update_existing_user'] = '1';
790
+									if ( ! isset( $optin_settings[ 'update_existing_user' ] ) ) {
791
+										$optin_settings[ 'update_existing_user' ] = '1';
792 792
 									}
793 793
 								?>
794
-								<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>
794
+								<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>
795 795
 									<span class="form-field-container-span">
796
-										<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>
797
-										&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>
796
+										<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>
797
+										&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>
798 798
 									</span>
799
-									<p class="description"><?php printf( __( "Update an existing subscriber's profile information instead of displaying a %s message." , "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></p>
799
+									<p class="description"><?php printf( __( "Update an existing subscriber's profile information instead of displaying a %s message.", "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></p>
800 800
 								</label></p>
801 801
 
802 802
 								<!--
@@ -805,101 +805,101 @@  discard block
 block discarded – undo
805 805
 									- No = Just update the user profile without an email
806 806
 								-->
807 807
 								<?php
808
-									$send_update_email = ( isset( $optin_settings['send_update_email'] ) && '' !== $optin_settings['send_update_email'] ) ? $optin_settings['send_update_email'] : 0;
808
+									$send_update_email = ( isset( $optin_settings[ 'send_update_email' ] ) && '' !== $optin_settings[ 'send_update_email' ] ) ? $optin_settings[ 'send_update_email' ] : 0;
809 809
 								?>
810
-								<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>
810
+								<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>
811 811
 									<span class="form-field-container-span">
812
-										<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>
813
-										&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>
812
+										<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>
813
+										&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>
814 814
 									</span>
815
-									<em><?php printf( __( "Send an email to the user granting their permission to update their profile information. Otherwise, an existing subscriber filling out this form, will have their profile information updated without any further interaction." , "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></em>
815
+									<em><?php printf( __( "Send an email to the user granting their permission to update their profile information. Otherwise, an existing subscriber filling out this form, will have their profile information updated without any further interaction.", "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></em>
816 816
 								</label></p>
817 817
 
818 818
 							</div>
819 819
 
820 820
 							<a href="#" class="expansion-section-title settings-sidebar">
821
-								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php _e( 'Submission Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>
821
+								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php _e( 'Submission Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
822 822
 							</a>
823 823
 							<div class="yikes-mc-settings-expansion-section">
824 824
 								<!-- AJAX form Submission -->
825 825
 								<?php
826
-									if( !isset( $submission_settings['ajax'] ) ) {
827
-										$submission_settings['ajax'] = '1';
826
+									if ( ! isset( $submission_settings[ 'ajax' ] ) ) {
827
+										$submission_settings[ 'ajax' ] = '1';
828 828
 									}
829 829
 								?>
830
-								<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>
830
+								<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>
831 831
 									<span class="form-field-container-span">
832
-										<label for="enable-ajax"><input type="radio" id="enable-ajax" name="form-ajax-submission" class="yikes-enable-disable-ajax" value="1" <?php checked( $submission_settings['ajax'] , '1' ); ?>><?php _e( 'Yes' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
833
-										&nbsp;<label for="disable-ajax"><input type="radio" id="disable-ajax"  name="form-ajax-submission" class="yikes-enable-disable-ajax" value="0" <?php checked( $submission_settings['ajax'] , '0' ); ?>><?php _e( 'No' , 'yikes-inc-easy-mailchimp-extender' ); ?></label>
832
+										<label for="enable-ajax"><input type="radio" id="enable-ajax" name="form-ajax-submission" class="yikes-enable-disable-ajax" value="1" <?php checked( $submission_settings[ 'ajax' ], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
833
+										&nbsp;<label for="disable-ajax"><input type="radio" id="disable-ajax"  name="form-ajax-submission" class="yikes-enable-disable-ajax" value="0" <?php checked( $submission_settings[ 'ajax' ], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
834 834
 									</span>
835
-									<p class="description"><?php _e( "AJAX form submissions transmit data without requiring the page to refresh." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
835
+									<p class="description"><?php _e( "AJAX form submissions transmit data without requiring the page to refresh.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
836 836
 								</label></p>
837 837
 
838 838
 								<!-- Redirect User On Submission -->
839 839
 								<?php
840
-									if( !isset( $submission_settings['redirect_on_submission'] ) ) {
841
-										$submission_settings['redirect_on_submission'] = '0';
842
-										$submission_settings['redirect_page'] = '';
840
+									if ( ! isset( $submission_settings[ 'redirect_on_submission' ] ) ) {
841
+										$submission_settings[ 'redirect_on_submission' ] = '0';
842
+										$submission_settings[ 'redirect_page' ] = '';
843 843
 									}
844 844
 								?>
845
-								<p><label for="redirect-user-on-submission"><strong><?php _e( 'Redirect On Submission' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
845
+								<p><label for="redirect-user-on-submission"><strong><?php _e( 'Redirect On Submission', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
846 846
 									<span class="form-field-container-span">
847
-										<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>
848
-										&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>
847
+										<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>
848
+										&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>
849 849
 									</span>
850
-									<?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'] ) : '' ); ?>
851
-									<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>
850
+									<?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' ] ) : '' ); ?>
851
+									<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>
852 852
 								</label></p>
853 853
 
854 854
 								<?php
855
-									if ( ! isset( $submission_settings['redirect_new_window'] ) ) {
856
-										$submission_settings['redirect_new_window'] = '0';
855
+									if ( ! isset( $submission_settings[ 'redirect_new_window' ] ) ) {
856
+										$submission_settings[ 'redirect_new_window' ] = '0';
857 857
 									}
858 858
 								?>
859 859
 
860 860
 								<!-- Option to open the redirect URL in a new window -->
861
-								<div class="redirect-new-window-div" <?php if ( ( ! isset( $submission_settings['redirect_on_submission'] ) || $submission_settings['redirect_on_submission'] === '0' ) || ( ! isset( $submission_settings['ajax'] ) || $submission_settings['ajax'] !== '1' )  ) { echo 'style="display:none;"'; } ?>>
862
-										<p><strong><?php _e( "Open Redirect URL in a New Window" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
861
+								<div class="redirect-new-window-div" <?php if ( ( ! isset( $submission_settings[ 'redirect_on_submission' ] ) || $submission_settings[ 'redirect_on_submission' ] === '0' ) || ( ! isset( $submission_settings[ 'ajax' ] ) || $submission_settings[ 'ajax' ] !== '1' ) ) { echo 'style="display:none;"'; } ?>>
862
+										<p><strong><?php _e( "Open Redirect URL in a New Window", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
863 863
 										<label for="redirect-new-window-yes">
864
-											<input type="radio" class="widefat custom-redirect-new-window" id="redirect-new-window-yes" name="redirect_new_window" value="1" <?php checked( $submission_settings['redirect_new_window'], '1' ); ?>/><?php _e( 'Yes' , 'yikes-inc-easy-mailchimp-extender' ); ?>
864
+											<input type="radio" class="widefat custom-redirect-new-window" id="redirect-new-window-yes" name="redirect_new_window" value="1" <?php checked( $submission_settings[ 'redirect_new_window' ], '1' ); ?>/><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?>
865 865
 										</label>
866 866
 										&nbsp;
867 867
 										<label for="redirect-new-window-no">
868
-											<input type="radio" class="widefat redirect-new-window" id="redirect-new-window-no" name="redirect_new_window" value="0" <?php checked( $submission_settings['redirect_new_window'] , '0' ); ?>/><?php _e( 'No' , 'yikes-inc-easy-mailchimp-extender' ); ?>
868
+											<input type="radio" class="widefat redirect-new-window" id="redirect-new-window-no" name="redirect_new_window" value="0" <?php checked( $submission_settings[ 'redirect_new_window' ], '0' ); ?>/><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?>
869 869
 										</label>
870
-										<p class="description"><?php _e( "Should the redirect URL open in a new window/tab?" , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
870
+										<p class="description"><?php _e( "Should the redirect URL open in a new window/tab?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
871 871
 								</div>
872 872
 
873 873
 								<!-- Hide Form On Submission -->
874 874
 								<?php
875
-									if( !isset( $submission_settings['hide_form_post_signup'] ) ) {
876
-										$submission_settings['hide_form_post_signup'] = '0';
875
+									if ( ! isset( $submission_settings[ 'hide_form_post_signup' ] ) ) {
876
+										$submission_settings[ 'hide_form_post_signup' ] = '0';
877 877
 									}
878 878
 								?>
879
-								<p><label for="hide-form-post-signup"><strong><?php _e( 'Hide Form After Sign Up' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
879
+								<p><label for="hide-form-post-signup"><strong><?php _e( 'Hide Form After Sign Up', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
880 880
 									<span class="form-field-container-span">
881
-										<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>
882
-										&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>
881
+										<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>
882
+										&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>
883 883
 									</span>
884
-									<p class="description"><?php _e( "Should the form be hidden after the user successfully signs up?" , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
884
+									<p class="description"><?php _e( "Should the form be hidden after the user successfully signs up?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
885 885
 								</label></p>
886 886
 
887 887
 								<!-- Append or Replace Interest Groups -->
888 888
 								<?php
889
-									if( !isset( $submission_settings['replace_interests'] ) ) {
890
-										$submission_settings['replace_interests'] = '1'; // defaults to true
889
+									if ( ! isset( $submission_settings[ 'replace_interests' ] ) ) {
890
+										$submission_settings[ 'replace_interests' ] = '1'; // defaults to true
891 891
 									}
892 892
 								?>
893
-								<p><label for="replace-interest-groups"><strong><?php _e( 'Existing Interest Groups' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
893
+								<p><label for="replace-interest-groups"><strong><?php _e( 'Existing Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
894 894
 									<span class="form-field-container-span">
895
-										<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>
896
-										&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>
895
+										<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>
896
+										&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>
897 897
 									</span>
898 898
 
899
-										<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>
899
+										<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>
900 900
 
901 901
 
902
-										<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>
902
+										<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>
903 903
 
904 904
 								</label></p>
905 905
 
@@ -912,9 +912,9 @@  discard block
 block discarded – undo
912 912
 
913 913
 							<span class="form-buttons-container" id="major-publishing-actions">
914 914
 								<?php
915
-									echo submit_button( __( 'Update Form' ) , 'primary' , '' , false , array( 'onclick' => 'jQuery(this).parent().prev().css({"display":"block","visibility":"inherit"});' ) );
916
-									$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' ) ) );
917
-									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>';
915
+									echo submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => 'jQuery(this).parent().prev().css({"display":"block","visibility":"inherit"});' ) );
916
+									$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' ) ) );
917
+									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>';
918 918
 								?>
919 919
 							</span>
920 920
 
Please login to merge, or discard this patch.