Completed
Pull Request — master (#811)
by
unknown
09:59 queued 07:34
created
admin/partials/menu/add-ons.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
 <div class="wrap">
8 8
 
9 9
 	<!-- Freddie Logo -->
10
-	<img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
10
+	<img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
11 11
 
12
-	<h1>Easy Forms for Mailchimp | <?php echo esc_attr__( 'Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="https://yikesplugins.com/plugins/?plugins=MailChimp" target="_blank" class="button-primary coming-soon-button" title="<?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1>
12
+	<h1>Easy Forms for Mailchimp | <?php echo esc_attr__( 'Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="https://yikesplugins.com/plugins/?plugins=MailChimp" target="_blank" class="button-primary coming-soon-button" title="<?php esc_attr_e( 'View All Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_attr_e( 'View All Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1>
13 13
 
14 14
 	<!-- Addons Page Description -->
15
-	<p class="yikes-easy-mc-about-text about-text"><?php esc_attr_e( "Below you'll find all free and paid add-ons available for Easy Forms for Mailchimp. Each add-on extends the functionality of the free plugin." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
15
+	<p class="yikes-easy-mc-about-text about-text"><?php esc_attr_e( "Below you'll find all free and paid add-ons available for Easy Forms for Mailchimp. Each add-on extends the functionality of the free plugin.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
16 16
 
17 17
 	<!-- Add-On Container -->
18 18
 	<section id="add-ons">
Please login to merge, or discard this patch.
admin/partials/menu/options.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@  discard block
 block discarded – undo
5 5
 */
6 6
 
7 7
 	/* Get and Store Option Values */
8
-	if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) === 'valid_api_key' ) {
9
-		$api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the Mailchimp API" , "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
8
+	if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) === 'valid_api_key' ) {
9
+		$api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the Mailchimp API", "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected", 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
10 10
 		$api_error_response = '';
11 11
 	} else {
12
-		$api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span>  ' . __( "Not Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
-		if( get_option( 'yikes-mc-api-invalid-key-response' , '' ) != '' ) {
14
-			$api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response' , '' ) . '</small></p>';
12
+		$api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span>  ' . __( "Not Connected", 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
+		if ( get_option( 'yikes-mc-api-invalid-key-response', '' ) != '' ) {
14
+			$api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response', '' ) . '</small></p>';
15 15
 		} else {
16 16
 			$api_error_response = '';
17 17
 		}
@@ -23,23 +23,23 @@  discard block
 block discarded – undo
23 23
 	* @since 6.2.2
24 24
 	*
25 25
 	*/
26
-	if ( isset( $_REQUEST['section'] ) ) {
27
-		$_REQUEST['section'] = preg_replace('/[^\w-]/', '', strip_tags ( $_REQUEST['section'] ) );
26
+	if ( isset( $_REQUEST[ 'section' ] ) ) {
27
+		$_REQUEST[ 'section' ] = preg_replace( '/[^\w-]/', '', strip_tags( $_REQUEST[ 'section' ] ) );
28 28
 	}
29 29
 ?>
30 30
 	<!-- Actual Settings Form -->
31 31
 	<div class="wrap">
32 32
 
33 33
 		<!-- Freddie Logo -->
34
-		<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
34
+		<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
35 35
 
36
-		<h1>Easy Forms for Mailchimp | <?php if ( isset( $_REQUEST['section'] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST['section'] ) ); } else { echo __( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
36
+		<h1>Easy Forms for Mailchimp | <?php if ( isset( $_REQUEST[ 'section' ] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST[ 'section' ] ) ); } else { echo __( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
37 37
 
38 38
 		<!-- Settings Page Description -->
39
-		<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Manage the overall settings for Easy forms for Mailchimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
39
+		<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Manage the overall settings for Easy forms for Mailchimp.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
40 40
 		<?php
41 41
 			/* Success Messages on Options Updated */
42
-			if( isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ) {
42
+			if ( isset( $_REQUEST[ 'settings-updated' ] ) && $_REQUEST[ 'settings-updated' ] == 'true' ) {
43 43
 				?>
44 44
 				<div class="updated manage-form-admin-notice">
45 45
 					<p><?php _e( 'Settings successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 				<?php
48 48
 			}
49 49
 			/* MailChimp API Cleared Successfully message */
50
-			if( isset( $_REQUEST['transient-cleared'] ) && $_REQUEST['transient-cleared'] == 'true' ) {
50
+			if ( isset( $_REQUEST[ 'transient-cleared' ] ) && $_REQUEST[ 'transient-cleared' ] == 'true' ) {
51 51
 				?>
52 52
 				<div class="updated manage-form-admin-notice">
53 53
 					<p><?php _e( 'Mailchimp API Cache successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 			}
57 57
 			/* Error Log Clear Messages */
58 58
 				/* Success Messages on Options Updated */
59
-				if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'true' ) {
59
+				if ( isset( $_REQUEST[ 'error-log-cleared' ] ) && $_REQUEST[ 'error-log-cleared' ] == 'true' ) {
60 60
 					?>
61 61
 					<div class="updated manage-form-admin-notice">
62 62
 						<p><?php _e( 'Error log successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 					<?php
65 65
 				}
66 66
 				/* MailChimp API Cleared Successfully message */
67
-				if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'false' ) {
67
+				if ( isset( $_REQUEST[ 'error-log-cleared' ] ) && $_REQUEST[ 'error-log-cleared' ] == 'false' ) {
68 68
 					?>
69 69
 					<div class="error manage-form-admin-notice">
70 70
 						<p><?php _e( "Whoops! We've encountered an error while trying to clear the error log. Please refresh the page and try again. If the error persists please get in touch with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -73,28 +73,28 @@  discard block
 block discarded – undo
73 73
 				}
74 74
 
75 75
 				/* Display a success message if our error log was sucessfully created, or display an error if not */
76
-				if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'true' ) {
76
+				if ( isset( $_GET[ 'error_log_created' ] ) && $_GET[ 'error_log_created' ] == 'true' ) {
77 77
 					?>
78 78
 					<div class="updated">
79 79
 						<p><?php _e( 'Error log successfully created. You may now start logging errors.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
80 80
 					</div>
81 81
 					<?php
82
-				} else if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'false' ) {
82
+				} else if ( isset( $_GET[ 'error_log_created' ] ) && $_GET[ 'error_log_created' ] == 'false' ) {
83 83
 					?>
84 84
 					<div class="error">
85
-						<p><?php echo esc_attr( urldecode( $_GET['error_message'] ) , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
85
+						<p><?php echo esc_attr( urldecode( $_GET[ 'error_message' ] ), 'yikes-inc-easy-mailchimp-extender' ); ?></p>
86 86
 					</div>
87 87
 					<?php
88 88
 				}
89 89
 
90 90
 				/* Display a success message if the user successfully imported some forms */
91
-				if( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-forms'] ) && $_GET['import-forms'] == 'true' ) {
91
+				if ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'import-export-forms' && isset( $_GET[ 'import-forms' ] ) && $_GET[ 'import-forms' ] == 'true' ) {
92 92
 					?>
93 93
 					<div class="updated">
94 94
 						<p><?php printf( __( 'Opt-in forms successfully imported. <a href="%s" title="View Forms">View Forms</a>', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
95 95
 					</div>
96 96
 					<?php
97
-				} elseif( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-settings'] ) && $_GET['import-settings'] == 'true' ) {
97
+				} elseif ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'import-export-forms' && isset( $_GET[ 'import-settings' ] ) && $_GET[ 'import-settings' ] == 'true' ) {
98 98
 					?>
99 99
 					<div class="updated">
100 100
 						<p><?php printf( __( 'YIKES Easy Forms for Mailchimp settings successfully imported.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
 
116 116
 						<div class="postbox yikes-easy-mc-postbox">
117 117
 
118
-							<?php if( !isset( $_REQUEST['section'] ) || $_REQUEST['section'] == '' ) {
118
+							<?php if ( ! isset( $_REQUEST[ 'section' ] ) || $_REQUEST[ 'section' ] == '' ) {
119 119
 								include YIKES_MC_PATH . 'admin/partials/menu/options-sections/general-settings.php';
120 120
 							} else {
121
-								if( isset( $_REQUEST['addon'] ) && $_REQUEST['addon'] == 'true' ) {
122
-									include apply_filters( 'yikes-mailchimp-'.$_REQUEST['section'].'-options-path' , '' );
121
+								if ( isset( $_REQUEST[ 'addon' ] ) && $_REQUEST[ 'addon' ] == 'true' ) {
122
+									include apply_filters( 'yikes-mailchimp-' . $_REQUEST[ 'section' ] . '-options-path', '' );
123 123
 								} else {
124 124
 									// White list a set of files that are allowed to be included here
125 125
 									$file_base = 'admin/partials/menu/options-sections/';
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 										$file_base . 'recaptcha-settings.php',
133 133
 									);
134 134
 									// Ensure the included file is allowed and whitelisted above, before including it
135
-									if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php', $acceptable_files ) ) {
136
-										include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php';
135
+									if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST[ 'section' ] . '.php', $acceptable_files ) ) {
136
+										include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST[ 'section' ] . '.php';
137 137
 									} else {
138 138
 										wp_die( esc_attr__( 'Invalid file. If this error persists, please contact support.', 'yikes-inc-easy-mailchimp' ) );
139 139
 									}
Please login to merge, or discard this patch.
admin/partials/upgrade-helpers/upgrade-migrate-options.php 1 patch
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -9,33 +9,33 @@  discard block
 block discarded – undo
9 9
 	*/
10 10
 		
11 11
 	// enqueue the styles for our migration page..
12
-	wp_enqueue_style( 'yikes_mc_migrate_option_styles' , YIKES_MC_URL . 'admin/css/yikes-inc-easy-mailchimp-migrate-option-styles.css' );
13
-	wp_enqueue_style( 'animate-css' , YIKES_MC_URL . 'admin/css/animate.min.css' );
12
+	wp_enqueue_style( 'yikes_mc_migrate_option_styles', YIKES_MC_URL . 'admin/css/yikes-inc-easy-mailchimp-migrate-option-styles.css' );
13
+	wp_enqueue_style( 'animate-css', YIKES_MC_URL . 'admin/css/animate.min.css' );
14 14
 	
15 15
 	// store our old options
16 16
 	$old_plugin_options = get_option( 'ykseme_storage' );
17 17
 	
18 18
 	$global_error_messages = array(
19
-		'success' => __( $old_plugin_options['single-optin-message'] , 'yikes-inc-easy-mailchimp-extender' ),
20
-		'general-error' => __( "Whoops! It looks like something went wrong. Please try again." , 'yikes-inc-easy-mailchimp-extender' ),
21
-		'email-exists-error' => __( "The email you entered is already a subscriber to this list." , 'yikes-inc-easy-mailchimp-extender' ),
22
-		'success-single-optin' => __( 'Thank you for subscribing!' , 'yikes-inc-easy-mailchimp-extender' ),
19
+		'success' => __( $old_plugin_options[ 'single-optin-message' ], 'yikes-inc-easy-mailchimp-extender' ),
20
+		'general-error' => __( "Whoops! It looks like something went wrong. Please try again.", 'yikes-inc-easy-mailchimp-extender' ),
21
+		'email-exists-error' => __( "The email you entered is already a subscriber to this list.", 'yikes-inc-easy-mailchimp-extender' ),
22
+		'success-single-optin' => __( 'Thank you for subscribing!', 'yikes-inc-easy-mailchimp-extender' ),
23 23
 		'success-resubscribed' => __( 'Thank you for already being a subscriber! Your profile info has been updated.', 'yikes-inc-easy-mailchimp-extender' ),
24 24
 		'update-link' => __( "To update your Mailchimp profile, please [link]click to send yourself an update link[/link].", 'yikes-inc-easy-mailchimp-extender' ),
25 25
 		'email-subject' => __( 'Mailchimp Profile Update', 'yikes-inc-easy-mailchimp-extender' ),
26 26
 	);
27 27
 	
28 28
 	// if old options are defined...
29
-	if( $old_plugin_options ) {
29
+	if ( $old_plugin_options ) {
30 30
 		
31 31
 		// Verify the NONCE is valid
32
-		check_admin_referer( 'yikes-mc-migrate-options' , 'migrate_options_nonce' );
32
+		check_admin_referer( 'yikes-mc-migrate-options', 'migrate_options_nonce' );
33 33
 		
34 34
 		?>
35 35
 			
36 36
 		<div class="wrap" style="text-align:center;">
37
-			<h3><?php _e( 'Migrating old plugin options' , 'yikes-inc-easy-mailchimp-extender' ); ?><span class="upgrading-ellipse-one">.</span><span class="upgrading-ellipse-two">.</span><span class="upgrading-ellipse-three">.</h3>
38
-			<p><?php _e( 'please be patient while your options are updated and the process has completed' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
37
+			<h3><?php _e( 'Migrating old plugin options', 'yikes-inc-easy-mailchimp-extender' ); ?><span class="upgrading-ellipse-one">.</span><span class="upgrading-ellipse-two">.</span><span class="upgrading-ellipse-three">.</h3>
38
+			<p><?php _e( 'please be patient while your options are updated and the process has completed', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
39 39
 			<!-- empty list, populate when options  get updated -->
40 40
 			<ul id="options-updated" class="yikes-easy-mc-hidden">
41 41
 				<hr />
@@ -49,82 +49,82 @@  discard block
 block discarded – undo
49 49
 				
50 50
 					// loop over our old options, and store them in a new option value
51 51
 					$do_not_migrate_options = array(
52
-						'ssl_verify_peer', 'api_validation' , 'widget_yikes_mc_widget' , 'flavor' , 'single-optin-message' , 'double-optin-message' ,
53
-						'mailchimp-optIn-default-list' , 'version' , 'yks-mailchimp-jquery-datepicker' , 'ssl_verify_peer' , 'optIn-checkbox' , 'yks-mailchimp-optin-checkbox-text',
54
-						'yks-mailchimp-required-text' , 'optin'
52
+						'ssl_verify_peer', 'api_validation', 'widget_yikes_mc_widget', 'flavor', 'single-optin-message', 'double-optin-message',
53
+						'mailchimp-optIn-default-list', 'version', 'yks-mailchimp-jquery-datepicker', 'ssl_verify_peer', 'optIn-checkbox', 'yks-mailchimp-optin-checkbox-text',
54
+						'yks-mailchimp-required-text', 'optin'
55 55
 					);
56 56
 							
57
-					foreach( $old_plugin_options as $option_name => $option_value ) {
57
+					foreach ( $old_plugin_options as $option_name => $option_value ) {
58 58
 												
59
-						if( ! in_array( $option_name , $do_not_migrate_options ) ) {
59
+						if ( ! in_array( $option_name, $do_not_migrate_options ) ) {
60 60
 							// ajax request to update our options one by one..
61 61
 							// if its an array, we need to json encode it
62
-							if( is_array( $option_value ) ) {
62
+							if ( is_array( $option_value ) ) {
63 63
 								
64
-								if( $option_name == 'lists' ) {
64
+								if ( $option_name == 'lists' ) {
65 65
 																	
66
-									if( ! empty( $option_value ) ) {
66
+									if ( ! empty( $option_value ) ) {
67 67
 										$settings = 1;
68 68
 										$form_length = count( $option_value );
69
-										foreach( $option_value as $mailchimp_form ) {
69
+										foreach ( $option_value as $mailchimp_form ) {
70 70
 											// update and pass our placeholder value
71 71
 											reset( $mailchimp_form );
72
-											$form_id = $mailchimp_form['id'];
72
+											$form_id = $mailchimp_form[ 'id' ];
73 73
 											
74
-											$fields = $mailchimp_form['fields'];	
74
+											$fields = $mailchimp_form[ 'fields' ];	
75 75
 											reset( $fields );
76 76
 											$first_field_key = key( $fields );
77 77
 											$array_keys = array_keys( $fields );
78 78
 											
79 79
 											$x = 1;								
80 80
 					
81
-											foreach( $array_keys as $parent_key ) {
81
+											foreach ( $array_keys as $parent_key ) {
82 82
 												
83 83
 												// alter the field keys so they show up after an import
84 84
 												$split_parent_key = explode( '-', $parent_key );
85 85
 
86
-												$new_parent_key = ( isset( $split_parent_key[1] ) ) ? strtoupper( $split_parent_key[1] ) : $parent_key;
86
+												$new_parent_key = ( isset( $split_parent_key[ 1 ] ) ) ? strtoupper( $split_parent_key[ 1 ] ) : $parent_key;
87 87
 
88
-												$mailchimp_form['fields'][$new_parent_key] = $mailchimp_form['fields'][$parent_key];
88
+												$mailchimp_form[ 'fields' ][ $new_parent_key ] = $mailchimp_form[ 'fields' ][ $parent_key ];
89 89
 
90
-												unset( $mailchimp_form['fields'][$parent_key] );			
90
+												unset( $mailchimp_form[ 'fields' ][ $parent_key ] );			
91 91
 										
92 92
 												// update our placeholder key to be 'placeholder'
93
-												$mailchimp_form['fields'][$new_parent_key]['placeholder'] = isset( $mailchimp_form['fields'][$new_parent_key]['placeholder-'.$form_id.'-'.$x] ) ? $mailchimp_form['fields'][$new_parent_key]['placeholder-'.$form_id.'-'.$x] : '';
93
+												$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'placeholder' ] = isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'placeholder-' . $form_id . '-' . $x ] ) ? $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'placeholder-' . $form_id . '-' . $x ] : '';
94 94
 												// update field classes
95
-												$mailchimp_form['fields'][$new_parent_key]['additional-classes'] = isset( $mailchimp_form['fields'][$new_parent_key]['custom-field-class-'.$form_id.'-'.$x] ) ? $mailchimp_form['fields'][$new_parent_key]['custom-field-class-'.$form_id.'-'.$x] : '';
95
+												$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'additional-classes' ] = isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'custom-field-class-' . $form_id . '-' . $x ] ) ? $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'custom-field-class-' . $form_id . '-' . $x ] : '';
96 96
 												// update help field - populate description
97
-												$mailchimp_form['fields'][$new_parent_key]['description'] = isset( $mailchimp_form['fields'][$new_parent_key]['help'] ) ? $mailchimp_form['fields'][$new_parent_key]['help'] : ''; 
97
+												$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'description' ] = isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'help' ] ) ? $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'help' ] : ''; 
98 98
 												// remove the old placeholder structure
99
-												unset( $mailchimp_form['fields'][$new_parent_key]['placeholder-'.$form_id.'-'.$x] );
99
+												unset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'placeholder-' . $form_id . '-' . $x ] );
100 100
 												// remove old custom class structure
101
-												unset( $mailchimp_form['fields'][$new_parent_key]['custom-field-class-'.$form_id.'-'.$x] );
101
+												unset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'custom-field-class-' . $form_id . '-' . $x ] );
102 102
 												// remove old help/description 
103
-												unset( $mailchimp_form['fields'][$new_parent_key]['help'] );
103
+												unset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'help' ] );
104 104
 																							
105 105
 												// check if choices is set, and encode them
106
-												if( isset( $mailchimp_form['fields'][$new_parent_key]['choices'] ) && ! empty( $mailchimp_form['fields'][$new_parent_key]['choices'] ) ) {
107
-													$mailchimp_form['fields'][$new_parent_key]['choices'] = addslashes( addslashes( json_encode( $mailchimp_form['fields'][$new_parent_key]['choices'] ) ) );
106
+												if ( isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'choices' ] ) && ! empty( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'choices' ] ) ) {
107
+													$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'choices' ] = addslashes( addslashes( json_encode( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'choices' ] ) ) );
108 108
 												}	
109 109
 
110 110
 												// update 'default' to 'default-choice' for radio/dropdown
111
-												if( isset( $mailchimp_form['fields'][$new_parent_key]['type'] ) && in_array( $mailchimp_form['fields'][$new_parent_key]['type'], array( 'radio', 'dropdown' ) ) ) {
112
-													$mailchimp_form['fields'][$new_parent_key]['default_choice'] = $mailchimp_form['fields'][$new_parent_key]['default'];
113
-													unset( $mailchimp_form['fields'][$new_parent_key]['default'] );
111
+												if ( isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ] ) && in_array( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ], array( 'radio', 'dropdown' ) ) ) {
112
+													$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'default_choice' ] = $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'default' ];
113
+													unset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'default' ] );
114 114
 												}
115 115
 												
116 116
 												// update 'date_format' on 'birthday' and 'date' fields
117
-												if( isset( $mailchimp_form['fields'][$new_parent_key]['type'] ) && in_array( $mailchimp_form['fields'][$new_parent_key]['type'], array( 'date', 'birthday' ) ) ) {
118
-													if( $mailchimp_form['fields'][$new_parent_key]['type'] == 'date' ) { // date
119
-														$mailchimp_form['fields'][$new_parent_key]['date_format'] = 'MM/DD'; // mailchimp default (can be altered)
117
+												if ( isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ] ) && in_array( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ], array( 'date', 'birthday' ) ) ) {
118
+													if ( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ] == 'date' ) { // date
119
+														$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'date_format' ] = 'MM/DD'; // mailchimp default (can be altered)
120 120
 													} else { // birthday 
121
-														$mailchimp_form['fields'][$new_parent_key]['date_format'] = 'MM/DD/YYYY'; // mailchimp default (can be altered)
121
+														$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'date_format' ] = 'MM/DD/YYYY'; // mailchimp default (can be altered)
122 122
 													}
123 123
 												}
124 124
 												
125 125
 												// update 'phone_format' on 'phone'
126
-												if( isset( $mailchimp_form['fields'][$new_parent_key]['type'] ) && in_array( $mailchimp_form['fields'][$new_parent_key]['type'], array( 'phone' ) ) ) {
127
-													$mailchimp_form['fields'][$new_parent_key]['phone_format'] = 'phone_format '; // phone format
126
+												if ( isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ] ) && in_array( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ], array( 'phone' ) ) ) {
127
+													$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'phone_format' ] = 'phone_format '; // phone format
128 128
 												}
129 129
 												
130 130
 												$x++;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 																								
142 142
 												$.post( ajaxurl, mc_data, function(response) {
143 143
 													jQuery( '#options-updated' ).show();
144
-													jQuery( '#options-updated' ).append( '<li class="animated fadeInDown"><?php echo '<strong>'; ?>' + response.form_name + '<?php echo '</strong> ' . __( "successfully imported." , 'yikes-inc-easy-mailchimp-extender' ); ?></li>' );	
144
+													jQuery( '#options-updated' ).append( '<li class="animated fadeInDown"><?php echo '<strong>'; ?>' + response.form_name + '<?php echo '</strong> ' . __( "successfully imported.", 'yikes-inc-easy-mailchimp-extender' ); ?></li>' );	
145 145
 													if( response.completed_import ) {
146 146
 														setTimeout( function() {
147 147
 															// finished with the loop...lets let the user know....and then redirect them....
@@ -150,13 +150,13 @@  discard block
 block discarded – undo
150 150
 															jQuery( '.upgrading-ellipse-two' ).remove();
151 151
 															jQuery( '.upgrading-ellipse-three' ).remove();
152 152
 															jQuery( '.wrap' ).find( 'h3' ).next().fadeOut();
153
-															jQuery( '#options-updated' ).append( '<li class="animated fadeInDown migration-complete-notification"><em><?php _e( "Migration Complete. Please wait..." , 'yikes-inc-easy-mailchimp-extender' ); ?> </em> <img src="<?php echo esc_url_raw( admin_url( "images/wpspin_light.gif" ) ); ?>" /></li>' );
153
+															jQuery( '#options-updated' ).append( '<li class="animated fadeInDown migration-complete-notification"><em><?php _e( "Migration Complete. Please wait...", 'yikes-inc-easy-mailchimp-extender' ); ?> </em> <img src="<?php echo esc_url_raw( admin_url( "images/wpspin_light.gif" ) ); ?>" /></li>' );
154 154
 															// redirect our user to the main plugin page...
155 155
 															setTimeout( function() {
156 156
 																<?php 
157 157
 																	// migrate options that didnt make it (they were never stored in the 'ykseme_storage' options array)
158
-																	add_option( 'yikes-mc-api-validation' , get_option( 'api_validation' , 'invalid_api_key' ) );
159
-																	add_option( 'yikes-mc-error-messages' , $global_error_messages );
158
+																	add_option( 'yikes-mc-api-validation', get_option( 'api_validation', 'invalid_api_key' ) );
159
+																	add_option( 'yikes-mc-error-messages', $global_error_messages );
160 160
 																	// delete our old options after a successful migration (and some new ones that are no longer needed)
161 161
 																	delete_option( 'widget_yikes_mc_widget' );
162 162
 																	delete_option( 'api_validation' );
@@ -177,26 +177,26 @@  discard block
 block discarded – undo
177 177
 							}
178 178
 							/* Rename our ReCaptcha Options */
179 179
 								/* Public Site Key */
180
-								if( $option_name == 'recaptcha-api-key' ) {
180
+								if ( $option_name == 'recaptcha-api-key' ) {
181 181
 									$option_name = 'recaptcha-site-key';
182 182
 								}
183 183
 								/* Private Key */
184
-								if( $option_name == 'recaptcha-private-api-key'  ) {
184
+								if ( $option_name == 'recaptcha-private-api-key' ) {
185 185
 									$option_name = 'recaptcha-secret-key';
186 186
 								}
187 187
 								/* Change 'recaptcha-setting' to 'recaptcha-status' */
188 188
 								/* Status */
189
-								if( $option_name == 'recaptcha-setting' ) {
189
+								if ( $option_name == 'recaptcha-setting' ) {
190 190
 									$option_name = 'recaptcha-status';
191 191
 								}
192 192
 							/* End  re-name ReCaptcha options */
193 193
 							
194 194
 
195
-							if( is_array( $option_value ) ) {
195
+							if ( is_array( $option_value ) ) {
196 196
 								$option_value = json_encode( $option_value );
197 197
 							}
198 198
 							// do noit migrate the lists option, it's not useful to us
199
-							if( $option_name != 'lists' ) {
199
+							if ( $option_name != 'lists' ) {
200 200
 								?>
201 201
 									var data = {
202 202
 										'action': 'migrate_old_plugin_settings',
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 													
207 207
 									$.post( ajaxurl, data, function(response) {
208 208
 										jQuery( '#options-updated' ).show();
209
-										jQuery( '#options-updated' ).append( '<li class="animated fadeInDown"><?php echo '<strong>' . ucwords( str_replace( '_' , ' ' , str_replace( '-' , ' ' , $option_name ) ) ) . '</strong> ' . __( "successfully imported." , 'yikes-inc-easy-mailchimp-extender' ); ?></li>' );	
209
+										jQuery( '#options-updated' ).append( '<li class="animated fadeInDown"><?php echo '<strong>' . ucwords( str_replace( '_', ' ', str_replace( '-', ' ', $option_name ) ) ) . '</strong> ' . __( "successfully imported.", 'yikes-inc-easy-mailchimp-extender' ); ?></li>' );	
210 210
 									});
211 211
 								<?php
212 212
 								
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 					}, 2000 );
231 231
 			</script>
232 232
 		<?php
233
-			wp_die( '<strong>' . __( 'Old plugin options do not exist. Redirecting you...' , 'yikes-inc-easy-mailchimp-extender' ) . '</strong>' , 500 );
233
+			wp_die( '<strong>' . __( 'Old plugin options do not exist. Redirecting you...', 'yikes-inc-easy-mailchimp-extender' ) . '</strong>', 500 );
234 234
 		?>
235 235
 		</div>
236 236
 		<?php
Please login to merge, or discard this patch.
admin/partials/dashboard-widgets/class.list-activity-widget.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 	// Construction
10 10
 	public function __construct() {
11 11
 
12
-		if ( apply_filters( 'yikes-mailchimp-dashboard-widgets-enabled', true ) === true &&  yikes_get_mc_api_key() != '' && get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'valid_api_key' ) {
12
+		if ( apply_filters( 'yikes-mailchimp-dashboard-widgets-enabled', true ) === true && yikes_get_mc_api_key() != '' && get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'valid_api_key' ) {
13 13
 
14 14
 			// hook in and display our list stats dashboard widget
15 15
 			add_action( 'wp_dashboard_setup', array( $this, 'yks_mc_add_dashboard_widget' ), 10 );
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 
55 55
 			/* List Stats Dashboard Widget */
56 56
 			wp_add_dashboard_widget(
57
-				'yikes_easy_mc_list_stats_widget',         // Widget slug.
58
-				__( 'Mailchimp List Stats', 'yikes-inc-easy-mailchimp-extender' ),         // Title.
57
+				'yikes_easy_mc_list_stats_widget', // Widget slug.
58
+				__( 'Mailchimp List Stats', 'yikes-inc-easy-mailchimp-extender' ), // Title.
59 59
 				array( $this, 'list_stats_dashboard_widget' ) // Display function.
60 60
 			);
61 61
 		}
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 					<?php
88 88
 					foreach ( $list_data as $list ) {
89 89
 						?>
90
-						<option value="<?php echo $list['id']; ?>"><?php echo $list['name']; ?></option>
90
+						<option value="<?php echo $list[ 'id' ]; ?>"><?php echo $list[ 'name' ]; ?></option>
91 91
 						<?php
92 92
 					}
93 93
 					?>
Please login to merge, or discard this patch.
admin/partials/front-end-widgets/front-end-widget-form.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 			// Widget name will appear in UI
26 26
 			__( 'Easy Mailchimp Forms', 'yikes-inc-easy-mailchimp-extender' ),
27 27
 			// Widget description
28
-			array( 'description' => __( 'Mailchimp opt-in widget for your sidebar.', 'yikes-inc-easy-mailchimp-extender' ), )
28
+			array( 'description' => __( 'Mailchimp opt-in widget for your sidebar.', 'yikes-inc-easy-mailchimp-extender' ),)
29 29
 		);
30 30
 	}
31 31
 
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 		// Get all form IDs so we can use the first one as a default.
40 40
 		$form_ids = $this->form_interface->get_form_ids();
41 41
 
42
-		$title              = isset( $instance['title'] ) ? apply_filters( 'widget_title', $instance['title'] ) : __( 'Mailchimp Signup Form', 'yikes-inc-easy-mailchimp-extender' );
43
-		$form_id            = isset( $instance['form_id'] ) ? $instance['form_id'] : $form_ids[0];
44
-		$form_description   = isset( $instance['form_description'] ) ? $instance['form_description'] : '';
45
-		$submit_button_text = isset( $instance['submit_text'] ) ? $instance['submit_text'] : __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
42
+		$title              = isset( $instance[ 'title' ] ) ? apply_filters( 'widget_title', $instance[ 'title' ] ) : __( 'Mailchimp Signup Form', 'yikes-inc-easy-mailchimp-extender' );
43
+		$form_id            = isset( $instance[ 'form_id' ] ) ? $instance[ 'form_id' ] : $form_ids[ 0 ];
44
+		$form_description   = isset( $instance[ 'form_description' ] ) ? $instance[ 'form_description' ] : '';
45
+		$submit_button_text = isset( $instance[ 'submit_text' ] ) ? $instance[ 'submit_text' ] : __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
46 46
 
47 47
 		// Build our array based on settings chosen
48 48
 		$shortcode_attributes = array(
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
 		$shortcode_attributes = apply_filters( 'yikes_mailchimp_widget_shortcode_attributes', $shortcode_attributes, $instance );
55 55
 
56 56
 		// before and after widget arguments are defined by themes
57
-		echo $args['before_widget'];
57
+		echo $args[ 'before_widget' ];
58 58
 
59 59
 		if ( ! empty( $title ) ) {
60
-			echo $args['before_title'] . $title . $args['after_title'];
60
+			echo $args[ 'before_title' ] . $title . $args[ 'after_title' ];
61 61
 		}
62 62
 
63 63
 		// Custom action hooks to place content in the widget before the form
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		do_action( 'yikes-mailchimp-after-form-' . $form_id );
74 74
 		do_action( 'yikes-mailchimp-after-form' );
75 75
 
76
-		echo $args['after_widget'];
76
+		echo $args[ 'after_widget' ];
77 77
 	}
78 78
 
79 79
 	// Widget Backend 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		if ( empty( $all_forms ) ) {
84 84
 			?>
85 85
 				<section class="no-forms-widget">
86
-				<strong><span class="dashicons dashicons-no-alt no-forms-found-icon"></span><?php echo sprintf( __( 'No forms found. It looks like you need to <a href="%s" title="%s">%s</a>.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ), __( 'Create a form' , 'yikes-inc-easy-mailchimp-extender' ), __( 'create a form' , 'yikes-inc-easy-mailchimp-extender' ) ); ?></strong>
86
+				<strong><span class="dashicons dashicons-no-alt no-forms-found-icon"></span><?php echo sprintf( __( 'No forms found. It looks like you need to <a href="%s" title="%s">%s</a>.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ), __( 'Create a form', 'yikes-inc-easy-mailchimp-extender' ), __( 'create a form', 'yikes-inc-easy-mailchimp-extender' ) ); ?></strong>
87 87
 				</section>
88 88
 			<?php
89 89
 			return;
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 			$submit_text = __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
111 111
 		}
112 112
 
113
-		 if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) == 'invalid_api_key' ) {
113
+		 if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
114 114
 			?>
115
-				<p class="enter-valid-api-error-widget"><strong><?php _e( 'Please enter a valid Mailchimp API key to connect your site to Mailchimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
115
+				<p class="enter-valid-api-error-widget"><strong><?php _e( 'Please enter a valid Mailchimp API key to connect your site to Mailchimp.', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
116 116
 			<?php
117 117
 			return;
118 118
 		}
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
 			<select id="<?php echo $this->get_field_id( 'form_id' ); ?>" name="<?php echo $this->get_field_name( 'form_id' ); ?>" class="widefat">
130 130
 				<?php
131 131
 				// build our array
132
-				foreach( $all_forms as $id => $form ) {
132
+				foreach ( $all_forms as $id => $form ) {
133 133
 					?>
134
-						<option <?php selected( $selected_form , $id ); ?> name="<?php echo $this->get_field_name( 'form_id' ); ?>" value="<?php echo $id; ?>"><?php echo stripslashes( $form['form_name'] ); ?></option>
134
+						<option <?php selected( $selected_form, $id ); ?> name="<?php echo $this->get_field_name( 'form_id' ); ?>" value="<?php echo $id; ?>"><?php echo stripslashes( $form[ 'form_name' ] ); ?></option>
135 135
 					<?php
136 136
 				}
137 137
 				?>
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
 		<p>
142 142
 			<label for="<?php echo $this->get_field_id( 'form_description' ); ?>"><?php _e( 'Display Form Description:' ); ?></label>
143
-			<input class="widefat" id="<?php echo $this->get_field_id( 'form_description' ); ?>" name="<?php echo $this->get_field_name( 'form_description' ); ?>" type="checkbox" value="1" <?php if( isset( $instance['form_description'] ) ) { checked( $instance['form_description'] , 1 ); } ?> />
143
+			<input class="widefat" id="<?php echo $this->get_field_id( 'form_description' ); ?>" name="<?php echo $this->get_field_name( 'form_description' ); ?>" type="checkbox" value="1" <?php if ( isset( $instance[ 'form_description' ] ) ) { checked( $instance[ 'form_description' ], 1 ); } ?> />
144 144
 		</p>
145 145
 
146 146
 		<p>
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
 	// Updating widget replacing old instances with new
154 154
 	public function update( $new_instance, $old_instance ) {
155 155
 		$instance = array();
156
-		$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
157
-		$instance['form_id'] = $new_instance['form_id'];
158
-		$instance['form_description'] = isset( $new_instance['form_description'] ) ? '1' : '';
159
-		$instance['submit_text'] = ( ! empty( $new_instance['submit_text'] ) ) ? strip_tags( $new_instance['submit_text'] ) : 'Submit';
156
+		$instance[ 'title' ] = ( ! empty( $new_instance[ 'title' ] ) ) ? strip_tags( $new_instance[ 'title' ] ) : '';
157
+		$instance[ 'form_id' ] = $new_instance[ 'form_id' ];
158
+		$instance[ 'form_description' ] = isset( $new_instance[ 'form_description' ] ) ? '1' : '';
159
+		$instance[ 'submit_text' ] = ( ! empty( $new_instance[ 'submit_text' ] ) ) ? strip_tags( $new_instance[ 'submit_text' ] ) : 'Submit';
160 160
 		return $instance;
161 161
 	}
162 162
 	
Please login to merge, or discard this patch.
admin/partials/edit-form.php 1 patch
Spacing   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -2,20 +2,20 @@  discard block
 block discarded – undo
2 2
 <?php
3 3
 
4 4
 // If an error was returned.
5
-if ( isset( $_GET['sql_error'] ) ) {
5
+if ( isset( $_GET[ 'sql_error' ] ) ) {
6 6
 
7 7
 	if ( get_option( 'yikes-mailchimp-debug-status', '' ) === '1' ) {
8
-		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
+		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' ) );
9 9
 	} else {
10 10
 		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 11
 	}
12 12
 }
13 13
 
14 14
 // Get The Form ID.
15
-if ( ! isset( $_GET['id'] ) ) {
15
+if ( ! isset( $_GET[ 'id' ] ) ) {
16 16
 	wp_die( esc_html_e( 'Oh No!', 'yikes-inc-easy-mailchimp-extender' ), esc_html_e( 'Error', 'yikes-inc-easy-mailchimp-extender' ) );
17 17
 }
18
-$form_id = (int) filter_var( wp_unslash( $_GET['id'] ), FILTER_SANITIZE_NUMBER_INT );
18
+$form_id = (int) filter_var( wp_unslash( $_GET[ 'id' ] ), FILTER_SANITIZE_NUMBER_INT );
19 19
 
20 20
 // Get our form interface.
21 21
 $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
 }
36 36
 
37 37
 // Set global form data, mainly for use in custom form field declarations or add-ons.
38
-$GLOBALS['form_data'] = $form;
39
-$custom_styles        = $form['custom_styles'];
40
-$optin_settings       = $form['optin_settings'];
41
-$submission_settings  = $form['submission_settings'];
42
-$error_messages       = $form['error_messages'];
43
-
44
-if ( isset( $form['form_settings'] ) ) {
45
-	$form_settings = $form['form_settings'];
38
+$GLOBALS[ 'form_data' ] = $form;
39
+$custom_styles        = $form[ 'custom_styles' ];
40
+$optin_settings       = $form[ 'optin_settings' ];
41
+$submission_settings  = $form[ 'submission_settings' ];
42
+$error_messages       = $form[ 'error_messages' ];
43
+
44
+if ( isset( $form[ 'form_settings' ] ) ) {
45
+	$form_settings = $form[ 'form_settings' ];
46 46
 }
47 47
 
48 48
 // Get defaults if none are saved in the database yet.
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 }
81 81
 
82 82
 // Get the merge fields.
83
-$available_merge_variables = $list_handler->get_merge_fields( $form['list_id'] );
83
+$available_merge_variables = $list_handler->get_merge_fields( $form[ 'list_id' ] );
84 84
 if ( is_wp_error( $available_merge_variables ) ) {
85 85
 	$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
86 86
 	$error_logging->maybe_write_to_log(
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 }
93 93
 
94 94
 // Get the interest groups.
95
-$interest_groupings = $list_handler->get_interest_categories( $form['list_id'] );
95
+$interest_groupings = $list_handler->get_interest_categories( $form[ 'list_id' ] );
96 96
 if ( is_wp_error( $interest_groupings ) ) {
97 97
 	$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
98 98
 	$error_logging->maybe_write_to_log(
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 }
105 105
 
106 106
 // Get the tags.
107
-$tags = $list_handler->get_segments( $form['list_id'], 'static' );
107
+$tags = $list_handler->get_segments( $form[ 'list_id' ], 'static' );
108 108
 if ( is_wp_error( $tags ) ) {
109 109
 	$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
110 110
 	$error_logging->maybe_write_to_log(
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 $url = add_query_arg(
120 120
 	array(
121 121
 		'action' => 'yikes-easy-mc-update-form',
122
-		'nonce'  => wp_create_nonce( 'update-mailchimp-form-' . $form['id'] ),
122
+		'nonce'  => wp_create_nonce( 'update-mailchimp-form-' . $form[ 'id' ] ),
123 123
 	)
124 124
 );
125 125
 ?>
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
 <img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
128 128
 
129 129
 <?php /* translators: the placeholder is the form's name */ ?>
130
-<h1>YIKES Easy Forms for Mailchimp | <?php echo sprintf( esc_html__( 'Edit %1s', 'yikes-inc-easy-mailchimp-extender' ), esc_html( $form['form_name'] ) ); ?></h1>
130
+<h1>YIKES Easy Forms for Mailchimp | <?php echo sprintf( esc_html__( 'Edit %1s', 'yikes-inc-easy-mailchimp-extender' ), esc_html( $form[ 'form_name' ] ) ); ?></h1>
131 131
 
132 132
 <!-- Settings Page Description -->
133 133
 <p class="yikes-easy-mc-about-text about-text"><?php esc_html_e( 'Update this Mailchimp form\'s fields, styles and settings below.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
134 134
 
135 135
 <?php
136
-if ( isset( $_REQUEST['updated-form'] ) && filter_var( $_REQUEST['updated-form'], FILTER_SANITIZE_STRING ) === 'true' ) {
136
+if ( isset( $_REQUEST[ 'updated-form' ] ) && filter_var( $_REQUEST[ 'updated-form' ], FILTER_SANITIZE_STRING ) === 'true' ) {
137 137
 	?>
138 138
 	<div class="updated manage-form-admin-notice">
139 139
 		<p><?php esc_html_e( 'Opt-in form successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -155,13 +155,13 @@  discard block
 block discarded – undo
155 155
 
156 156
 							<label for="form-name">
157 157
 								<h3 class="bg-transparent"><?php esc_html_e( 'Form Name', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
158
-								<input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo esc_html( stripslashes( $form['form_name'] ) ); ?>" class="widefat" />
158
+								<input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo esc_html( stripslashes( $form[ 'form_name' ] ) ); ?>" class="widefat" />
159 159
 								<p class="description"><?php esc_html_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 163
 								<h3 class="bg-transparent"><?php esc_html_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'] ) ? esc_textarea( stripslashes( $form['form_description'] ) ) : ''; ?></textarea>
164
+								<textarea name="form-description" id="form-description" class="large-text edit-form-form-description"><?php echo isset( $form[ 'form_description' ] ) ? esc_textarea( stripslashes( $form[ 'form_description' ] ) ) : ''; ?></textarea>
165 165
 								<p class="description"><?php esc_html_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( esc_html_e( '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>
@@ -208,26 +208,26 @@  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-form-id="<?php echo esc_attr( $form['id'] ); ?>" data-list-id="<?php echo esc_attr( $form['list_id'] ); ?>" ><?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
211
+													<h3 class="edit-form-title" id="form-builder-div" data-form-id="<?php echo esc_attr( $form[ 'id' ] ); ?>" data-list-id="<?php echo esc_attr( $form[ 'list_id' ] ); ?>" ><?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
212 212
 													<div class="tags-title" style="display: none;">
213 213
 														<span class="tags-title-text">Tags</span>
214 214
 														<div class="tags-title-container"></div>
215 215
 													</div>
216
-													<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>
216
+													<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>
217 217
 													<div id="form-builder-container" class="inside">
218 218
 														<!-- #poststuff -->
219
-														<?php echo $this->generate_form_editor( $form['fields'], $form['list_id'], $available_merge_variables, isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
219
+														<?php echo $this->generate_form_editor( $form[ 'fields' ], $form[ 'list_id' ], $available_merge_variables, isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
220 220
 													</div>
221 221
 
222 222
 													<!-- Bulk Delete Form Fields -->
223
-													<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>
223
+													<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>
224 224
 
225 225
 													<?php
226
-														$display_none = ( isset( $form['fields'] ) && count( $form['fields'] ) <= 0 ) ? 'display:none;' : '';
226
+														$display_none = ( isset( $form[ 'fields' ] ) && count( $form[ 'fields' ] ) <= 0 ) ? 'display:none;' : '';
227 227
 													?>
228 228
 
229 229
 													<!-- Save Fields Button -->
230
-													<?php submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;'.$display_none ) ); ?>
230
+													<?php submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;' . $display_none ) ); ?>
231 231
 
232 232
 													<!-- .inside -->
233 233
 												</div>
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 																<?php
262 262
 																if ( ! isset( $merge_variable_error ) ) {
263 263
 																	echo '<p class="description">' . __( "Select the fields below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
264
-																	$this->build_available_merge_vars( $form['fields'], $available_merge_variables );
264
+																	$this->build_available_merge_vars( $form[ 'fields' ], $available_merge_variables );
265 265
 																} else {
266 266
 																	echo $merge_variable_error;
267 267
 																}
@@ -270,22 +270,22 @@  discard block
 block discarded – undo
270 270
 
271 271
 															<div id="interest-groups-container" class="list-container">
272 272
 																<?php
273
-																if ( isset( $interest_groupings ) && ! isset( $interest_groupings['error'] ) ) {
273
+																if ( isset( $interest_groupings ) && ! isset( $interest_groupings[ 'error' ] ) ) {
274 274
 																	echo '<p class="description">' . __( "Select an interest group below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
275
-																	$this->build_available_interest_groups( $form['fields'], $interest_groupings, $form['list_id'] );
275
+																	$this->build_available_interest_groups( $form[ 'fields' ], $interest_groupings, $form[ 'list_id' ] );
276 276
 																} else {
277
-																	echo '<p class="description">' . $interest_groupings['error'] . '</p>';
277
+																	echo '<p class="description">' . $interest_groupings[ 'error' ] . '</p>';
278 278
 																}
279 279
 																?>
280 280
 															</div>
281 281
 
282 282
 															<div id="tags-container" class="list-container">
283 283
 																<?php
284
-																if ( isset( $tags ) && ! isset( $tags['error'] ) ) {
284
+																if ( isset( $tags ) && ! isset( $tags[ 'error' ] ) ) {
285 285
 																	echo '<p class="description">' . __( "Select a tag to add to the form builder. Selected tags will be added to all subscribers of this form.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
286
-																	$this->build_available_tags( isset( $form['tags'] ) ? $form['tags'] : array(), $tags, $form['list_id'] );
286
+																	$this->build_available_tags( isset( $form[ 'tags' ] ) ? $form[ 'tags' ] : array(), $tags, $form[ 'list_id' ] );
287 287
 																} else {
288
-																	echo '<p class="description">' . $interest_groupings['error'] . '</p>';
288
+																	echo '<p class="description">' . $interest_groupings[ 'error' ] . '</p>';
289 289
 																}
290 290
 																?>
291 291
 															</div>
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 
331 331
 															<!-- form classes -->
332 332
 															<label for="yikes-easy-mc-form-class-names"><strong><?php _e( 'Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
333
-																<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' ); ?>" >
333
+																<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' ); ?>" >
334 334
 																<p class="description"><?php printf( __( 'Add additional class names to the %s element.', 'yikes-inc-easy-mailchimp-extender' ), '<code>' . htmlentities( '<form>' ) . '</code>' ); ?></p>
335 335
 															</label>
336 336
 
@@ -345,10 +345,10 @@  discard block
 block discarded – undo
345 345
 															<!-- inline form -->
346 346
 															<strong><?php _e( 'Inline Form', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
347 347
 															<label class="inline-form-label">
348
-																<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' ); ?>
348
+																<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' ); ?>
349 349
 															</label>
350 350
 															<label class="inline-form-label">
351
-																<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' ); ?>
351
+																<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' ); ?>
352 352
 															</label>
353 353
 															<p class="description"><?php _e( 'Programatically setup this form so that all fields are on the same line.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
354 354
 															<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>
@@ -363,19 +363,19 @@  discard block
 block discarded – undo
363 363
 															<!-- Submit button type -->
364 364
 															<strong><?php _e( 'Submit Button Type', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
365 365
 															<label class="inline-form-label">
366
-																<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' ); ?>
366
+																<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' ); ?>
367 367
 															</label>
368 368
 															<label class="inline-form-label">
369
-																<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' ); ?>
369
+																<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' ); ?>
370 370
 															</label>
371 371
 															<p class="description"><?php _e( 'Select the submit button type for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
372 372
 															<!-- end submit button type -->
373 373
 
374 374
 																<!-- Text submit button type -->
375
-																<section class="submit-button-type-text nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'image' ) { echo ' hidden'; } ?>">
375
+																<section class="submit-button-type-text nested-child<?php if ( $form_settings[ 'yikes-easy-mc-submit-button-type' ] == 'image' ) { echo ' hidden'; } ?>">
376 376
 																	<!-- submit button text -->
377 377
 																	<label for="yikes-easy-mc-submit-button-text"><strong><?php _e( 'Submit Button Text', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
378
-																		<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' ); ?>">
378
+																		<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' ); ?>">
379 379
 																		<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>
380 380
 
381 381
 																		<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>
@@ -384,9 +384,9 @@  discard block
 block discarded – undo
384 384
 																<!-- end text submit button type -->
385 385
 
386 386
 																<!-- Image submit button type -->
387
-																<section class="submit-button-type-image nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'text' ) { echo ' hidden'; } ?>">
387
+																<section class="submit-button-type-image nested-child<?php if ( $form_settings[ 'yikes-easy-mc-submit-button-type' ] == 'text' ) { echo ' hidden'; } ?>">
388 388
 																	<label for="yikes-easy-mc-submit-button-image"><strong><?php _e( 'Submit Button URL', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
389
-																		<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' ); ?>">
389
+																		<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' ); ?>">
390 390
 																		<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>
391 391
 																	</label>
392 392
 																</section>
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
 															<!-- submit button classes -->
397 397
 															<label for="yikes-easy-mc-form-submit-button-classes"><strong style="float:left;"><?php _e( 'Submit Button Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
398
-																<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' ); ?>" >
398
+																<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' ); ?>" >
399 399
 																<p class="description"><?php _e( 'Add custom classes to the submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
400 400
 															</label>
401 401
 															<!-- end submit button classes -->
@@ -408,37 +408,37 @@  discard block
 block discarded – undo
408 408
 														<section class="section-interior">
409 409
 															<!-- Schedule form -->
410 410
 															<label class="inline-form-label">
411
-																<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' ); ?>
411
+																<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' ); ?>
412 412
 															</label>
413 413
 															<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>
414 414
 															<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>
415 415
 																<!-- Start Date Limitation Nested -->
416
-																<section class="date-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?>">
416
+																<section class="date-restriction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-schedule' ] == '0' ) { echo ' hidden'; } ?>">
417 417
 																	<!-- Start Date -->
418 418
 																	<label for="yikes-easy-mc-form-restriction-start-date"><strong><?php _e( 'Start Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
419
-																		<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'] ) : ''; ?>" >
419
+																		<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' ] ) : ''; ?>" >
420 420
 																		<?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
421 421
 																	</label>
422 422
 
423 423
 																	<!-- Start Time -->
424 424
 																	<label for="yikes-easy-mc-form-restriction-start-time"><strong><?php _e( 'Start Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
425
-																		<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'] ) : ''; ?>" >
425
+																		<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' ] ) : ''; ?>" >
426 426
 																	</label>
427 427
 																	<p class="description"><?php _e( 'Set the dates that this form should display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
428 428
 																</section>
429 429
 																<!-- end Start Date Limitation Nested -->
430 430
 
431 431
 																<!-- End Date Limitation Nested -->
432
-																<section class="date-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?> last">
432
+																<section class="date-restriction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-schedule' ] == '0' ) { echo ' hidden'; } ?> last">
433 433
 																	<!-- End Date -->
434 434
 																	<label for="yikes-easy-mc-form-restriction-end-date"><strong><?php _e( 'End Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
435
-																		<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'] ) : ''; ?>" >
435
+																		<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' ] ) : ''; ?>" >
436 436
 																		<?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
437 437
 																	</label>
438 438
 
439 439
 																	<!-- End Time -->
440 440
 																	<label for="yikes-easy-mc-form-restriction-end-time"><strong><?php _e( 'End Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
441
-																		<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'] ) : ''; ?>" >
441
+																		<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' ] ) : ''; ?>" >
442 442
 																	</label>
443 443
 																	<p class="description"><?php _e( 'Set the dates that this form should no longer display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
444 444
 
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
 																	<label for="yikes-easy-mc-form-restriction-pending-message"><strong><?php _e( 'Pending Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
447 447
 																		<?php
448 448
 																			wp_editor(
449
-																				$form_settings['yikes-easy-mc-form-restriction-pending-message'],
449
+																				$form_settings[ 'yikes-easy-mc-form-restriction-pending-message' ],
450 450
 																				'yikes-easy-mc-form-restriction-pending-message',
451 451
 																				array(
452 452
 																					'editor_class' => 'yikes-easy-mc-form-restriction-pending-message',
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 																	<label for="yikes-easy-mc-form-restriction-expired-message"><strong><?php _e( 'Expired Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
462 462
 																		<?php
463 463
 																			wp_editor(
464
-																				$form_settings['yikes-easy-mc-form-restriction-expired-message'],
464
+																				$form_settings[ 'yikes-easy-mc-form-restriction-expired-message' ],
465 465
 																				'yikes-easy-mc-form-restriction-expired-message',
466 466
 																				array(
467 467
 																					'editor_class' => 'yikes-easy-mc-form-restriction-expired-message',
@@ -476,16 +476,16 @@  discard block
 block discarded – undo
476 476
 
477 477
 																<!-- Require Users to be Logged In -->
478 478
 																<label class="inline-form-label">
479
-																	<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' ); ?>
479
+																	<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' ); ?>
480 480
 																</label>
481 481
 																<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>
482 482
 
483 483
 																<!-- Require Login Message -->
484
-																<section class="login-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-login-required'] == '0' ) { echo ' hidden'; } ?>">
484
+																<section class="login-restriction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-login-required' ] == '0' ) { echo ' hidden'; } ?>">
485 485
 																	<label for="yikes-easy-mc-form-restriction-login-message"><strong><?php _e( 'Required Login Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
486 486
 																		<?php
487 487
 																			wp_editor(
488
-																				$form_settings['yikes-easy-mc-form-restriction-login-message'],
488
+																				$form_settings[ 'yikes-easy-mc-form-restriction-login-message' ],
489 489
 																				'yikes-easy-mc-form-restriction-login-message',
490 490
 																				array(
491 491
 																					'editor_class' => 'yikes-easy-mc-form-restriction-login-message',
@@ -572,40 +572,40 @@  discard block
 block discarded – undo
572 572
 
573 573
 														<!-- Success Message (refactored @ 6.3.0 for double optin) -->
574 574
 														<label for="yikes-easy-mc-success-message"><strong><?php _e( 'Success: Double opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
575
-															<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']; ?>" >
575
+															<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' ]; ?>" >
576 576
 														</label>
577 577
 														<!-- Success Message (for single optin) -->
578 578
 														<label for="yikes-easy-mc-success-single-optin-message"><strong><?php _e( 'Success: Single opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
579
-															<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']; ?>" >
579
+															<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' ]; ?>" >
580 580
 														</label>
581 581
 														<!-- Resubscribing users when updating your profile via the form is allowed -->
582 582
 														<label for="yikes-easy-mc-user-resubscribed-success-message"><strong><?php _e( 'Success: Re-subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
583
-															<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']; ?>">
583
+															<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' ]; ?>">
584 584
 														</label>
585 585
 
586 586
 														<!-- Click the link to update user profile etc. etc. -->
587 587
 														<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>
588
-															<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']; ?>">
588
+															<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' ]; ?>">
589 589
 														</label>
590 590
 
591 591
 														<!-- Email Address is already subscribed -->
592 592
 														<label for="yikes-easy-mc-user-subscribed-message"><strong><?php _e( 'Error: Re-subscribers not permitted', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
593
-															<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']; ?>">
593
+															<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' ]; ?>">
594 594
 														</label>
595 595
 
596 596
 														<!-- Update email successfully sent -->
597 597
 														<label for="yikes-easy-mc-update-email-successful"><strong><?php _e( 'Success: Update email successfully sent', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
598
-															<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']; ?>" >
598
+															<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' ]; ?>" >
599 599
 														</label>
600 600
 
601 601
 														<!-- Update email failed to send -->
602 602
 														<label for="yikes-easy-mc-update-email-failure"><strong><?php _e( 'Error: Update email failed to send', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
603
-															<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']; ?>" >
603
+															<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' ]; ?>" >
604 604
 														</label>
605 605
 
606 606
 														<!-- General Error Message -->
607 607
 														<label for="yikes-easy-mc-general-error-message"><strong><?php _e( 'Error: General', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
608
-															<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']; ?>" >
608
+															<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' ]; ?>" >
609 609
 														</label>
610 610
 
611 611
 														<!-- Email Section -->
@@ -615,12 +615,12 @@  discard block
 block discarded – undo
615 615
 															<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>
616 616
 															<!-- Email Subject -->
617 617
 															<label for="yikes-easy-mc-user-email-subject"><strong><?php _e( 'Email Subject', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
618
-																<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']; ?>">
618
+																<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' ]; ?>">
619 619
 															</label>
620 620
 															<!-- Email Body -->
621 621
 															<label for="yikes-easy-mc-user-email-body"><strong><?php _e( 'Email Body', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
622 622
 																<?php 
623
-																	$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();
623
+																	$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();
624 624
 																	wp_editor( $editor_content, 'yikes-easy-mc-user-email-body', array( 'textarea_id' => 'yikes-easy-mc-user-email-body' ) ); 
625 625
 																?>
626 626
 															</label>
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
 																	<li>
731 731
 																	<?php
732 732
 																		/* translators: First two placeholders are HTML <code> tags, third one is the form's name  */
733
-																		echo sprintf( esc_html__( '%1$1s[form_name]%2$2s displays your form\'s name (i.e. %3$3s).', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>', esc_html( $form['form_name'] ) );
733
+																		echo sprintf( esc_html__( '%1$1s[form_name]%2$2s displays your form\'s name (i.e. %3$3s).', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>', esc_html( $form[ 'form_name' ] ) );
734 734
 																	?>
735 735
 																	</li>
736 736
 																	<li>
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
 									<label for="shortcode"><?php esc_html_e( 'Edit Another Form', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
787 787
 										<select class="widefat" name="form_switcher" id="form_switcher" onchange="YIKES_Easy_MC_SwitchForm(jQuery(this).val());">
788 788
 											<?php foreach ( $all_forms as $single_form ) { ?>
789
-												<option <?php selected( $form_id, $single_form['id'] ); ?> value="<?php echo esc_attr( $single_form['id'] ); ?>"><?php echo esc_html( $single_form['form_name'] ); ?></option>
789
+												<option <?php selected( $form_id, $single_form[ 'id' ] ); ?> value="<?php echo esc_attr( $single_form[ 'id' ] ); ?>"><?php echo esc_html( $single_form[ 'form_name' ] ); ?></option>
790 790
 											<?php } ?>
791 791
 										</select>
792 792
 									</label>
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
 
795 795
 								<p class="inside-section-2">
796 796
 									<label for="shortcode"><?php esc_html_e( 'Shortcode', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
797
-										<input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo esc_attr( $form['id'] ); ?>"]' />
797
+										<input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo esc_attr( $form[ 'id' ] ); ?>"]' />
798 798
 									</label>
799 799
 								</p>
800 800
 
@@ -810,9 +810,9 @@  discard block
 block discarded – undo
810 810
 										<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() );">
811 811
 											<?php
812 812
 											if ( ! empty( $list_data ) ) {
813
-												foreach( $list_data as $mailing_list ) {
813
+												foreach ( $list_data as $mailing_list ) {
814 814
 													?>
815
-													<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>
815
+													<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>
816 816
 													<?php
817 817
 												}
818 818
 											} else {
@@ -822,9 +822,9 @@  discard block
 block discarded – undo
822 822
 											}
823 823
 											?>
824 824
 										</select>
825
-										<?php if( ! empty( $form['list_id'] ) ) { ?>
825
+										<?php if ( ! empty( $form[ 'list_id' ] ) ) { ?>
826 826
 											<p class="description view-list">
827
-												<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>
827
+												<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>
828 828
 											</p>
829 829
 											<p class="description">
830 830
 												<?php _e( "Users who sign up via this form will be added to the list selected above.", 'yikes-inc-easy-mailchimp-extender' ); ?>
@@ -852,28 +852,28 @@  discard block
 block discarded – undo
852 852
 
853 853
 								<!-- Single or Double Opt-in -->
854 854
 								<?php
855
-									if( !isset( $optin_settings['optin'] ) ) {
856
-										$optin_settings['optin'] = '1';
855
+									if ( ! isset( $optin_settings[ 'optin' ] ) ) {
856
+										$optin_settings[ 'optin' ] = '1';
857 857
 									}
858 858
 								?>
859 859
 								<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>
860 860
 									<span class="edit-form-field-container-span">
861
-										<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>
862
-										&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>
861
+										<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>
862
+										&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>
863 863
 									</span>
864 864
 									<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>
865 865
 								</label></p>
866 866
 
867 867
 								<!-- Update Existing Users -->
868 868
 								<?php
869
-									if( !isset( $optin_settings['update_existing_user'] ) ) {
870
-										$optin_settings['update_existing_user'] = '1';
869
+									if ( ! isset( $optin_settings[ 'update_existing_user' ] ) ) {
870
+										$optin_settings[ 'update_existing_user' ] = '1';
871 871
 									}
872 872
 								?>
873 873
 								<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>
874 874
 									<span class="form-field-container-span">
875
-										<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>
876
-										&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>
875
+										<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>
876
+										&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>
877 877
 									</span>
878 878
 									<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>
879 879
 								</label></p>
@@ -884,9 +884,9 @@  discard block
 block discarded – undo
884 884
 									- No = Just update the user profile without an email
885 885
 								-->
886 886
 								<?php
887
-									$send_update_email = ( isset( $optin_settings['send_update_email'] ) && '' !== $optin_settings['send_update_email'] ) ? $optin_settings['send_update_email'] : 0;
887
+									$send_update_email = ( isset( $optin_settings[ 'send_update_email' ] ) && '' !== $optin_settings[ 'send_update_email' ] ) ? $optin_settings[ 'send_update_email' ] : 0;
888 888
 								?>
889
-								<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>
889
+								<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>
890 890
 									<span class="form-field-container-span">
891 891
 										<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>
892 892
 										&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>
@@ -902,77 +902,77 @@  discard block
 block discarded – undo
902 902
 							<div class="yikes-mc-settings-expansion-section">
903 903
 								<!-- AJAX form Submission -->
904 904
 								<?php
905
-									if( !isset( $submission_settings['ajax'] ) ) {
906
-										$submission_settings['ajax'] = '1';
905
+									if ( ! isset( $submission_settings[ 'ajax' ] ) ) {
906
+										$submission_settings[ 'ajax' ] = '1';
907 907
 									}
908 908
 								?>
909 909
 								<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>
910 910
 									<span class="form-field-container-span">
911
-										<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>
912
-										&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>
911
+										<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>
912
+										&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>
913 913
 									</span>
914 914
 									<p class="description"><?php _e( "AJAX form submissions transmit data without requiring the page to refresh.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
915 915
 								</label></p>
916 916
 
917 917
 								<!-- Redirect User On Submission -->
918 918
 								<?php
919
-									if( !isset( $submission_settings['redirect_on_submission'] ) ) {
920
-										$submission_settings['redirect_on_submission'] = '0';
921
-										$submission_settings['redirect_page'] = '';
919
+									if ( ! isset( $submission_settings[ 'redirect_on_submission' ] ) ) {
920
+										$submission_settings[ 'redirect_on_submission' ] = '0';
921
+										$submission_settings[ 'redirect_page' ] = '';
922 922
 									}
923 923
 								?>
924 924
 								<p><label for="redirect-user-on-submission"><strong><?php _e( 'Redirect On Submission', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
925 925
 									<span class="form-field-container-span">
926
-										<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>
927
-										&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>
926
+										<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>
927
+										&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>
928 928
 									</span>
929
-									<?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'] ) : '' ); ?>
929
+									<?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' ] ) : '' ); ?>
930 930
 									<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>
931 931
 								</label></p>
932 932
 
933 933
 								<?php
934
-									if ( ! isset( $submission_settings['redirect_new_window'] ) ) {
935
-										$submission_settings['redirect_new_window'] = '0';
934
+									if ( ! isset( $submission_settings[ 'redirect_new_window' ] ) ) {
935
+										$submission_settings[ 'redirect_new_window' ] = '0';
936 936
 									}
937 937
 								?>
938 938
 
939 939
 								<!-- Option to open the redirect URL in a new window -->
940
-								<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;"'; } ?>>
940
+								<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;"'; } ?>>
941 941
 										<p><strong><?php _e( "Open Redirect URL in a New Window", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
942 942
 										<label for="redirect-new-window-yes">
943
-											<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' ); ?>
943
+											<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' ); ?>
944 944
 										</label>
945 945
 										&nbsp;
946 946
 										<label for="redirect-new-window-no">
947
-											<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' ); ?>
947
+											<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' ); ?>
948 948
 										</label>
949 949
 										<p class="description"><?php _e( "Should the redirect URL open in a new window/tab?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
950 950
 								</div>
951 951
 
952 952
 								<!-- Hide Form On Submission -->
953 953
 								<?php
954
-									if( !isset( $submission_settings['hide_form_post_signup'] ) ) {
955
-										$submission_settings['hide_form_post_signup'] = '0';
954
+									if ( ! isset( $submission_settings[ 'hide_form_post_signup' ] ) ) {
955
+										$submission_settings[ 'hide_form_post_signup' ] = '0';
956 956
 									}
957 957
 								?>
958 958
 								<p><label for="hide-form-post-signup"><strong><?php _e( 'Hide Form After Sign Up', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
959 959
 									<span class="form-field-container-span">
960
-										<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>
961
-										&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>
960
+										<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>
961
+										&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>
962 962
 									</span>
963 963
 									<p class="description"><?php _e( "Should the form be hidden after the user successfully signs up?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
964 964
 								</label></p>
965 965
 
966 966
 								<!-- Append or Replace Interest Groups -->
967 967
 								<?php
968
-									if( !isset( $submission_settings['replace_interests'] ) ) {
969
-										$submission_settings['replace_interests'] = '1'; // defaults to true
968
+									if ( ! isset( $submission_settings[ 'replace_interests' ] ) ) {
969
+										$submission_settings[ 'replace_interests' ] = '1'; // defaults to true
970 970
 									}
971 971
 								?>
972 972
 								<p><label for="replace-interest-groups"><strong><?php _e( 'Existing Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
973 973
 									<span class="form-field-container-span">
974
-										<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>
975
-										&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>
974
+										<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>
975
+										&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>
976 976
 									</span>
977 977
 
978 978
 										<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>
@@ -992,7 +992,7 @@  discard block
 block discarded – undo
992 992
 							<span class="form-buttons-container" id="major-publishing-actions">
993 993
 								<?php
994 994
 									echo submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => 'jQuery(this).parent().prev().css({"display":"block","visibility":"inherit"});' ) );
995
-									$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' ) ) );
995
+									$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' ) ) );
996 996
 									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>';
997 997
 								?>
998 998
 							</span>
Please login to merge, or discard this patch.
admin/class-yikes-inc-easy-mailchimp-extender-admin.php 1 patch
Spacing   +354 added lines, -354 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
 			'add_tag_nonce'                     => wp_create_nonce( 'add-tag' ),
@@ -870,7 +870,7 @@  discard block
 block discarded – undo
870 870
 	 * Convert the php date format string to a js date format
871 871
 	 */
872 872
 	public function yikes_jQuery_datepicker_date_format( $site_option ) {
873
-		switch( $site_option ) {
873
+		switch ( $site_option ) {
874 874
 			//Predefined WP date formats
875 875
 			default:
876 876
 			case 'F j, Y':
@@ -1082,7 +1082,7 @@  discard block
 block discarded – undo
1082 1082
 
1083 1083
 		/* Register General Settings Section */
1084 1084
 
1085
-		register_setting( 'yikes_inc_easy_mc_general_settings_page', 'yikes-mc-api-key', array( $this , 'yikes_mc_validate_api_key' ) );
1085
+		register_setting( 'yikes_inc_easy_mc_general_settings_page', 'yikes-mc-api-key', array( $this, 'yikes_mc_validate_api_key' ) );
1086 1086
 
1087 1087
 		register_setting( 'yikes_inc_easy_mc_general_settings_page', 'yikes-mailchimp-use-nonce' );
1088 1088
 
@@ -1127,7 +1127,7 @@  discard block
 block discarded – undo
1127 1127
 		add_settings_field(
1128 1128
 			'optin-checkbox-init',
1129 1129
 			__( 'Select Checkboxes to Generate', 'yikes-inc-easy-mailchimp-extender' ),
1130
-			'',  // callback + validation inside of admin/partials/menu/options.php
1130
+			'', // callback + validation inside of admin/partials/menu/options.php
1131 1131
 			'yikes_inc_easy_mc_checkbox_settings'
1132 1132
 		);
1133 1133
 		/* End Checkbox Settings */
@@ -1149,21 +1149,21 @@  discard block
 block discarded – undo
1149 1149
 			add_settings_field(
1150 1150
 				'yikes-mc-recaptcha-site-key',
1151 1151
 				__( 'Enter reCAPTCHA Site Key', 'yikes-inc-easy-mailchimp-extender' ),
1152
-				'',  // callback + validation inside of admin/partials/menu/options.php
1152
+				'', // callback + validation inside of admin/partials/menu/options.php
1153 1153
 				'yikes_easy_mc_settings_recpatcha_section'
1154 1154
 			);
1155 1155
 
1156 1156
 			add_settings_field(
1157 1157
 				'yikes-mc-recaptcha-secret-key',
1158 1158
 				__( 'Enter reCAPTCHA Secret Key', 'yikes-inc-easy-mailchimp-extender' ),
1159
-				'',  // callback + validation inside of admin/partials/menu/options.php
1159
+				'', // callback + validation inside of admin/partials/menu/options.php
1160 1160
 				'yikes_easy_mc_settings_recpatcha_section'
1161 1161
 			);
1162 1162
 
1163 1163
 			add_settings_field(
1164 1164
 				'yikes-mc-recaptcha-status',
1165 1165
 				__( 'Enable ReCaptcha', 'yikes-inc-easy-mailchimp-extender' ),
1166
-				'',  // callback + validation inside of admin/partials/menu/options.php
1166
+				'', // callback + validation inside of admin/partials/menu/options.php
1167 1167
 				'yikes_easy_mc_settings_recpatcha_section'
1168 1168
 			);
1169 1169
 
@@ -1183,7 +1183,7 @@  discard block
 block discarded – undo
1183 1183
 			add_settings_field(
1184 1184
 				'yikes-mailchimp-debug-status',
1185 1185
 				__( 'Enable Debugging', 'yikes-inc-easy-mailchimp-extender' ),
1186
-				'',  // callback + validation inside of admin/partials/menu/options.php
1186
+				'', // callback + validation inside of admin/partials/menu/options.php
1187 1187
 				'yikes_easy_mc_settings_debug_section'
1188 1188
 			);
1189 1189
 
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
 			update_option( 'yikes-mc-api-validation', 'invalid_api_key' );
1204 1204
 			return '';
1205 1205
 		}
1206
-		$api_key = strip_tags ( trim( $input ) );
1206
+		$api_key = strip_tags( trim( $input ) );
1207 1207
 		$dash_position = strpos( trim( $input ), '-' );
1208 1208
 		if ( $dash_position !== false ) {
1209 1209
 			$manager = new Yikes_Inc_Easy_MailChimp_API_Manager( $api_key );
@@ -1218,9 +1218,9 @@  discard block
 block discarded – undo
1218 1218
 			update_option( 'yikes-mc-api-validation', 'valid_api_key' );
1219 1219
 				// Clear the API key transient data
1220 1220
 			$this->delete_yikes_mailchimp_transients();
1221
-		}  else {
1221
+		} else {
1222 1222
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
1223
-			$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' ) );
1223
+			$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' ) );
1224 1224
 			update_option( 'yikes-mc-api-invalid-key-response', $response->get_error_message() );
1225 1225
 			update_option( 'yikes-mc-api-validation', 'invalid_api_key' );
1226 1226
 		}
@@ -1269,11 +1269,11 @@  discard block
 block discarded – undo
1269 1269
 	public function check_for_old_yks_mc_options() {
1270 1270
 		$old_plugin_options = get_option( 'ykseme_storage' );
1271 1271
 		// only perform options migrations if the site is not a multi-site setup
1272
-		if ( !is_multisite() ) {
1272
+		if ( ! is_multisite() ) {
1273 1273
 			if ( apply_filters( 'yikes_mc_old_options_filter', $old_plugin_options ) ) {
1274 1274
 				// display a notice to the user that they should 'migrate'
1275 1275
 				// from the old plugin settings to the new ones
1276
-				add_action( 'admin_notices', array( $this , 'display_options_migrate_notice' ) , 11 );
1276
+				add_action( 'admin_notices', array( $this, 'display_options_migrate_notice' ), 11 );
1277 1277
 			}
1278 1278
 		}
1279 1279
 	}
@@ -1306,11 +1306,11 @@  discard block
 block discarded – undo
1306 1306
 
1307 1307
 			// Confirm that the necessary forms table in the database exists, else bail
1308 1308
 			global $wpdb;
1309
-			if ( $wpdb->get_var("show tables like '" . $wpdb->prefix . "yikes_easy_mc_forms'") != $wpdb->prefix . "yikes_easy_mc_forms" ) {
1309
+			if ( $wpdb->get_var( "show tables like '" . $wpdb->prefix . "yikes_easy_mc_forms'" ) != $wpdb->prefix . "yikes_easy_mc_forms" ) {
1310 1310
 				return;
1311 1311
 			}
1312 1312
 
1313
-			if ( isset( $_GET['yikes-mc-options-migration-dismissed'] ) && $_GET['yikes-mc-options-migration-dismissed'] == 'true' ) {
1313
+			if ( isset( $_GET[ 'yikes-mc-options-migration-dismissed' ] ) && $_GET[ 'yikes-mc-options-migration-dismissed' ] == 'true' ) {
1314 1314
 					// Delete the options, start a-new! (this will disable the migration notice altogether)
1315 1315
 					delete_option( 'widget_yikes_mc_widget' );
1316 1316
 					delete_option( 'api_validation' );
@@ -1324,7 +1324,7 @@  discard block
 block discarded – undo
1324 1324
 			} else {
1325 1325
 			?>
1326 1326
 				<div class="yikes-easy-mc-updated migrate-options-notice">
1327
-					<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>
1327
+					<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>
1328 1328
 					<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>
1329 1329
 					<p><em><?php _e( "It's also strongly recommended that you take a backup of your database.", 'yikes-inc-easy-mailchimp-extender' ); ?></em></p>
1330 1330
 					<section id="migration-buttons">
@@ -1349,9 +1349,9 @@  discard block
 block discarded – undo
1349 1349
 		*	and return the index ( used to find the list name assigned to a form )
1350 1350
 		*	- http://stackoverflow.com/questions/6661530/php-multi-dimensional-array-search
1351 1351
 		*/
1352
-		function findMCListID($id, $array) {
1353
-		   foreach ($array as $key => $val) {
1354
-			   if ($val['id'] === $id) {
1352
+		function findMCListID( $id, $array ) {
1353
+		   foreach ( $array as $key => $val ) {
1354
+			   if ( $val[ 'id' ] === $id ) {
1355 1355
 				   return $key;
1356 1356
 			   }
1357 1357
 		   }
@@ -1361,8 +1361,8 @@  discard block
 block discarded – undo
1361 1361
 		/* Ajax Migrate Options */
1362 1362
 		function migrate_archived_options() {
1363 1363
 			// all options prefixed with 'yikes-mc-'
1364
-			$option_name = 'yikes-mc-'.$_POST['option_name'];
1365
-			$option_value = $_POST['option_value'];
1364
+			$option_name = 'yikes-mc-' . $_POST[ 'option_name' ];
1365
+			$option_value = $_POST[ 'option_value' ];
1366 1366
 			if ( json_decode( $option_value ) ) {
1367 1367
 				// decode our lists() array, and store it
1368 1368
 				$opt_value = json_decode( $option_value, true );
@@ -1376,22 +1376,22 @@  discard block
 block discarded – undo
1376 1376
 
1377 1377
 		/* Ajax Migrate Forms */
1378 1378
 		function migrate_previously_setup_forms() {
1379
-			$option_name = $_POST['option_name'];
1380
-			$done = $_POST['done_import'];
1379
+			$option_name = $_POST[ 'option_name' ];
1380
+			$done = $_POST[ 'done_import' ];
1381 1381
 			// Create some starter forms for the user
1382 1382
 			// based on previously imported lists (to our old version)
1383 1383
 			if ( $option_name == 'yikes-mc-lists' ) {
1384
-				$option_value = $_POST['option_value'];
1385
-				$new_options = json_decode( stripslashes_deep( $option_value ) , true );
1384
+				$option_value = $_POST[ 'option_value' ];
1385
+				$new_options = json_decode( stripslashes_deep( $option_value ), true );
1386 1386
 
1387
-				$list_id = $new_options['id'];
1388
-				$form_name = $new_options['name'];
1389
-				$fields = $new_options['fields']; // our fields array
1387
+				$list_id = $new_options[ 'id' ];
1388
+				$form_name = $new_options[ 'name' ];
1389
+				$fields = $new_options[ 'fields' ]; // our fields array
1390 1390
 
1391
-				$custom_styles = isset( $new_options['custom_styles'] ) ? $new_options['custom_styles']: '0'; // store as an array with all of our styles
1392
-				$custom_template = isset( $new_options['custom_template'] ) ? $new_options['custom_template'] : '0'; // store template data as an array ( active , template used )
1393
-				$redirect_user_on_submit = isset( $new_options['yks_mailchimp_redirect_'.$list_id] ) ? '1' : '0';
1394
-				$redirect_page = isset( $new_options['page_id_'.$list_id] ) ? $new_options['page_id_'.$list_id] : '';
1391
+				$custom_styles = isset( $new_options[ 'custom_styles' ] ) ? $new_options[ 'custom_styles' ] : '0'; // store as an array with all of our styles
1392
+				$custom_template = isset( $new_options[ 'custom_template' ] ) ? $new_options[ 'custom_template' ] : '0'; // store template data as an array ( active , template used )
1393
+				$redirect_user_on_submit = isset( $new_options[ 'yks_mailchimp_redirect_' . $list_id ] ) ? '1' : '0';
1394
+				$redirect_page = isset( $new_options[ 'page_id_' . $list_id ] ) ? $new_options[ 'page_id_' . $list_id ] : '';
1395 1395
 
1396 1396
 				/* Insert Forms Function  */
1397 1397
 				$this->form_interface->create_form( array(
@@ -1427,8 +1427,8 @@  discard block
 block discarded – undo
1427 1427
 		*	@since v5.6 - complete re-write
1428 1428
 		*/
1429 1429
 		public function generate_options_pages_sidebar_menu() {
1430
-			if ( isset( $_REQUEST['section'] ) ) {
1431
-				$selected = $_REQUEST['section'];
1430
+			if ( isset( $_REQUEST[ 'section' ] ) ) {
1431
+				$selected = $_REQUEST[ 'section' ];
1432 1432
 			}
1433 1433
 			$installed_addons = get_option( 'yikes-easy-mc-active-addons', array() );
1434 1434
 
@@ -1445,25 +1445,25 @@  discard block
 block discarded – undo
1445 1445
 				<h3><span><?php _e( 'Additional Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
1446 1446
 				<div class="inside">
1447 1447
 					<ul id="settings-nav">
1448
-						<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>
1449
-						<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>
1450
-						<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>
1451
-						<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>
1452
-						<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>
1453
-						<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>
1448
+						<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>
1449
+						<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>
1450
+						<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>
1451
+						<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>
1452
+						<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>
1453
+						<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>
1454 1454
 					</ul>
1455 1455
 					<?php
1456 1456
 						// create our add-on settings pages
1457
-						if ( !empty( $installed_addons ) ) {
1457
+						if ( ! empty( $installed_addons ) ) {
1458 1458
 							?>
1459 1459
 							<hr class="add-on-settings-divider" />
1460 1460
 							<strong><?php _e( 'Addon Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
1461 1461
 							<ul id="addon-settings-nav">
1462 1462
 							<?php
1463
-							foreach( $installed_addons as $addon_name ) {
1463
+							foreach ( $installed_addons as $addon_name ) {
1464 1464
 								?>
1465 1465
 									<li>
1466
-										<?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>
1466
+										<?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>
1467 1467
 								<?php
1468 1468
 							}
1469 1469
 							?>
@@ -1512,19 +1512,19 @@  discard block
 block discarded – undo
1512 1512
 						<select name="associated-list" id="associated-list" class=" input-field" <?php $this->is_user_mc_api_valid_form( true ); disabled( true, empty( $lists ) ); ?>>
1513 1513
 							<?php
1514 1514
 							if ( ! empty( $lists ) ) {
1515
-								foreach( $lists as $mailing_list ) {
1515
+								foreach ( $lists as $mailing_list ) {
1516 1516
 									?>
1517
-									<option value="<?php echo $mailing_list['id']; ?>"><?php echo stripslashes( $mailing_list['name'] ) . ' (' . $mailing_list['stats']['member_count'] . ') '; ?></option>
1517
+									<option value="<?php echo $mailing_list[ 'id' ]; ?>"><?php echo stripslashes( $mailing_list[ 'name' ] ) . ' (' . $mailing_list[ 'stats' ][ 'member_count' ] . ') '; ?></option>
1518 1518
 									<?php
1519 1519
 								}
1520 1520
 							} else {
1521 1521
 								if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
1522 1522
 									?>
1523
-									<option><?php echo __( "Please enter a valid API key." , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
1523
+									<option><?php echo __( "Please enter a valid API key.", 'yikes-inc-easy-mailchimp-extender' ); ?></option>
1524 1524
 									<?php
1525 1525
 								} else {
1526 1526
 									?>
1527
-									<option><?php echo __( "No lists were found on the account." , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
1527
+									<option><?php echo __( "No lists were found on the account.", 'yikes-inc-easy-mailchimp-extender' ); ?></option>
1528 1528
 									<?php
1529 1529
 
1530 1530
 								}
@@ -1533,8 +1533,8 @@  discard block
 block discarded – undo
1533 1533
 						</select>
1534 1534
 
1535 1535
 						<?php
1536
-						if ( isset( $_GET['transient-cleared'] ) ) {
1537
-							if ( 'true' === $_GET['transient-cleared'] ) {
1536
+						if ( isset( $_GET[ 'transient-cleared' ] ) ) {
1537
+							if ( 'true' === $_GET[ 'transient-cleared' ] ) {
1538 1538
 								?>
1539 1539
 								<div class="yikes-list-refreshed-notice">
1540 1540
 									<p><?php esc_attr_e( 'Mailchimp list data has been succesfully refreshed.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -1547,7 +1547,7 @@  discard block
 block discarded – undo
1547 1547
 							if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) != 'invalid_api_key' ) {
1548 1548
 								?>
1549 1549
 									<p class="description">
1550
-										<?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' ) ); ?>
1550
+										<?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' ) ); ?>
1551 1551
 									</p>
1552 1552
 								<?php
1553 1553
 							}
@@ -1556,9 +1556,9 @@  discard block
 block discarded – undo
1556 1556
 					</label>
1557 1557
 					<?php
1558 1558
 						if ( $this->is_user_mc_api_valid_form( false ) ) {
1559
-							echo submit_button( __( 'Create', 'yikes-inc-easy-mailchimp-extender' ) , 'primary', '', false , array( 'style' => 'margin:.75em 0 .5em 0;' ) );
1559
+							echo submit_button( __( 'Create', 'yikes-inc-easy-mailchimp-extender' ), 'primary', '', false, array( 'style' => 'margin:.75em 0 .5em 0;' ) );
1560 1560
 						} else {
1561
-							echo '<p class="description">' . __( "Please enter a valid Mailchimp API key to get started." , 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
1561
+							echo '<p class="description">' . __( "Please enter a valid Mailchimp API key to get started.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
1562 1562
 							?>
1563 1563
 								<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>
1564 1564
 							<?php
@@ -1588,7 +1588,7 @@  discard block
 block discarded – undo
1588 1588
 				$post_types = get_post_types();
1589 1589
 				?>
1590 1590
 				<label id="redirect-user-to-selection-label" for="redirect-user-to-selection" class="<?php if ( $redirect == '0' ) { echo 'yikes-easy-mc-hidden'; } ?>">
1591
-					<?php _e( "Select A Page or Post" , 'yikes-inc-easy-mailchimp-extender' ); ?>
1591
+					<?php _e( "Select A Page or Post", 'yikes-inc-easy-mailchimp-extender' ); ?>
1592 1592
 					<select id="redirect-user-to-selection" name="redirect-user-to-selection" onchange="shouldWeDisplayCustomURL( this );return;">
1593 1593
 				<?php
1594 1594
 
@@ -1604,7 +1604,7 @@  discard block
 block discarded – undo
1604 1604
 					$excluded_post_types = apply_filters( 'yikes-mailchimp-excluded-redirect-post-types', $excluded_post_types );
1605 1605
 
1606 1606
 						// loop over registered post types, and query!
1607
-						foreach( $post_types as $registered_post_type ) {
1607
+						foreach ( $post_types as $registered_post_type ) {
1608 1608
 
1609 1609
 							// exclude a few built in custom post types and any defined by the filter
1610 1610
 							if ( ! in_array( $registered_post_type, $excluded_post_types ) ) {
@@ -1626,8 +1626,8 @@  discard block
 block discarded – undo
1626 1626
 									?>
1627 1627
 										<optgroup label="<?php echo ucwords( str_replace( '_', ' ', $registered_post_type ) ); ?>">
1628 1628
 									<?php
1629
-											foreach( $post_ids as $post_id ) {
1630
-												?><option <?php selected( $redirect_page , $post_id ); ?> value="<?php echo $post_id; ?>"><?php echo get_the_title( $post_id ) ?></option><?php
1629
+											foreach ( $post_ids as $post_id ) {
1630
+												?><option <?php selected( $redirect_page, $post_id ); ?> value="<?php echo $post_id; ?>"><?php echo get_the_title( $post_id ) ?></option><?php
1631 1631
 											}
1632 1632
 									?>
1633 1633
 										</optgroup>
@@ -1643,7 +1643,7 @@  discard block
 block discarded – undo
1643 1643
 					</select>
1644 1644
 
1645 1645
 					<label name="custom-redirect-url" class="custom_redirect_url_label" <?php if ( ! isset( $redirect_page ) || $redirect_page != 'custom_url' ) { echo 'style="display:none;"'; } ?>>
1646
-						<?php _e( "Enter Custom URL" , 'yikes-inc-easy-mailchimp-extender' ); ?>
1646
+						<?php _e( "Enter Custom URL", 'yikes-inc-easy-mailchimp-extender' ); ?>
1647 1647
 						<input type="text" class="widefat custom-redirect-url" name="custom-redirect-url" value="<?php echo $custom_redirect_url; ?>" />
1648 1648
 					</label>
1649 1649
 
@@ -1702,7 +1702,7 @@  discard block
 block discarded – undo
1702 1702
 							</p>
1703 1703
 						</div>
1704 1704
 
1705
-						<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>
1705
+						<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>
1706 1706
 
1707 1707
 						<section id="about-yikes-inc" class="inside">
1708 1708
 							<a href="https://www.yikesinc.com" target="_blank" title="YIKES Inc.">
@@ -1720,7 +1720,7 @@  discard block
 block discarded – undo
1720 1720
 						<!-- review us container -->
1721 1721
 						<h3><?php _e( 'Easy Forms for Mailchimp Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
1722 1722
 						<div id="review-yikes-easy-mc" class="inside">
1723
-							<p><?php _e( "Check out available add-ons for some seriously enhanced features." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
1723
+							<p><?php _e( "Check out available add-ons for some seriously enhanced features.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
1724 1724
 							<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>
1725 1725
 						</div>
1726 1726
 
@@ -1747,11 +1747,11 @@  discard block
 block discarded – undo
1747 1747
 
1748 1748
 			// if no list id, die!
1749 1749
 			if ( ! $list_id ) {
1750
-				wp_die( __( "We've encountered an error. No list ID was sent." , 'yikes-inc-easy-mailchimp-extender' ) );
1750
+				wp_die( __( "We've encountered an error. No list ID was sent.", 'yikes-inc-easy-mailchimp-extender' ) );
1751 1751
 			}
1752 1752
 
1753 1753
 			if ( ! $merge_variables ) {
1754
-				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' ) );
1754
+				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' ) );
1755 1755
 			}
1756 1756
 
1757 1757
 			if ( ! empty( $form_fields ) ) {
@@ -1762,17 +1762,17 @@  discard block
 block discarded – undo
1762 1762
 				$available_interest_groups	= array();
1763 1763
 
1764 1764
 				// Default variables as arrays - these are used for holding the MailChimp merge field ID
1765
-				$merge_field_ids			= array();
1766
-				$mailchimp_merge_field_ids	= array();
1765
+				$merge_field_ids = array();
1766
+				$mailchimp_merge_field_ids = array();
1767 1767
 
1768 1768
 				// loop over merge variables
1769
-				if ( ! empty( $merge_variables['merge_fields'] ) ) {
1770
-					$available_merge_variables = wp_list_pluck( $merge_variables['merge_fields'], 'tag' );
1771
-					$mailchimp_merge_field_ids = wp_list_pluck( $merge_variables['merge_fields'], 'merge_id' );
1769
+				if ( ! empty( $merge_variables[ 'merge_fields' ] ) ) {
1770
+					$available_merge_variables = wp_list_pluck( $merge_variables[ 'merge_fields' ], 'tag' );
1771
+					$mailchimp_merge_field_ids = wp_list_pluck( $merge_variables[ 'merge_fields' ], 'merge_id' );
1772 1772
 					
1773 1773
 					// Array will look like $merge_tag => $merge_id
1774
-					foreach( $available_merge_variables as $index => $merge_tag ) { 
1775
-						$merge_field_ids[$merge_tag] = $mailchimp_merge_field_ids[$index];
1774
+					foreach ( $available_merge_variables as $index => $merge_tag ) { 
1775
+						$merge_field_ids[ $merge_tag ] = $mailchimp_merge_field_ids[ $index ];
1776 1776
 					}
1777 1777
 				}
1778 1778
 
@@ -1787,46 +1787,46 @@  discard block
 block discarded – undo
1787 1787
 				$excluded_fields = array_diff( $assigned_fields, $merged_fields );
1788 1788
 
1789 1789
 				$i = 1;
1790
-				foreach( $form_fields as $field ) {
1790
+				foreach ( $form_fields as $field ) {
1791 1791
 
1792
-					if ( isset( $field['merge'] ) ) {
1792
+					if ( isset( $field[ 'merge' ] ) ) {
1793 1793
 						// @todo: don't use in_array()
1794
-						$excluded_field = in_array( $field['merge'], $excluded_fields, true );
1794
+						$excluded_field = in_array( $field[ 'merge' ], $excluded_fields, true );
1795 1795
 						?>
1796
-						<section class="draggable" id="<?php echo $field['merge']; ?>">
1796
+						<section class="draggable" id="<?php echo $field[ 'merge' ]; ?>">
1797 1797
 							<!-- top -->
1798 1798
 							<a class="expansion-section-title settings-sidebar">
1799 1799
 								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span>
1800
-								<span class="yikes-mc-expansion-section-field-label"> <?php echo stripslashes( $field['label'] ); ?> </span>
1800
+								<span class="yikes-mc-expansion-section-field-label"> <?php echo stripslashes( $field[ 'label' ] ); ?> </span>
1801 1801
 								<?php if ( $excluded_field ) { ?>
1802 1802
 									<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' ); ?>">
1803 1803
 								<?php } ?>
1804
-								<input maxlength="50" type="text" class="yikes-mc-edit-field-label-input" value="<?php echo stripslashes( $field['label'] ); ?>" />
1804
+								<input maxlength="50" type="text" class="yikes-mc-edit-field-label-input" value="<?php echo stripslashes( $field[ 'label' ] ); ?>" />
1805 1805
 								<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>
1806 1806
 								<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>
1807 1807
 								<span class="yikes-mc-edit-field-label-message"></span>
1808
-								<span class="field-type-text"><small><?php echo __( 'type', 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $field['type']; ?></small></span>
1808
+								<span class="field-type-text"><small><?php echo __( 'type', 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $field[ 'type' ]; ?></small></span>
1809 1809
 							</a>
1810 1810
 							<!-- expansion section -->
1811 1811
 							<div class="yikes-mc-settings-expansion-section">
1812 1812
 
1813 1813
 								<?php if ( $excluded_field ) { ?>
1814
-									<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>
1814
+									<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>
1815 1815
 								<?php } ?>
1816 1816
 
1817 1817
 								<!-- store field data -->
1818
-								<input type="hidden" class="yikes-mc-merge-field-label" name="field[<?php echo $field['merge']; ?>][label]" value="<?php echo htmlspecialchars( $field['label'] ); ?>" />
1819
-								<input type="hidden" class="yikes-mc-merge-field-type" name="field[<?php echo $field['merge']; ?>][type]" value="<?php echo $field['type']; ?>" />
1820
-								<input type="hidden" class="yikes-mc-merge-field-tag" name="field[<?php echo $field['merge']; ?>][merge]" value="<?php echo $field['merge']; ?>" />
1821
-								<input type="hidden" class="field-<?php echo $field['merge']; ?>-position position-input" name="field[<?php echo $field['merge']; ?>][position]" value="<?php echo $i++; ?>" />
1822
-								<?php if ( isset( $merge_field_ids[ $field['merge'] ] ) && is_int( $merge_field_ids[ $field['merge'] ] ) ) { ?> 
1823
-									<input type="hidden" class="yikes-mc-merge-field-id" name="field[<?php echo $field['merge']; ?>][id]" value="<?php echo $merge_field_ids[ $field['merge'] ] ?>" />  
1818
+								<input type="hidden" class="yikes-mc-merge-field-label" name="field[<?php echo $field[ 'merge' ]; ?>][label]" value="<?php echo htmlspecialchars( $field[ 'label' ] ); ?>" />
1819
+								<input type="hidden" class="yikes-mc-merge-field-type" name="field[<?php echo $field[ 'merge' ]; ?>][type]" value="<?php echo $field[ 'type' ]; ?>" />
1820
+								<input type="hidden" class="yikes-mc-merge-field-tag" name="field[<?php echo $field[ 'merge' ]; ?>][merge]" value="<?php echo $field[ 'merge' ]; ?>" />
1821
+								<input type="hidden" class="field-<?php echo $field[ 'merge' ]; ?>-position position-input" name="field[<?php echo $field[ 'merge' ]; ?>][position]" value="<?php echo $i++; ?>" />
1822
+								<?php if ( isset( $merge_field_ids[ $field[ 'merge' ] ] ) && is_int( $merge_field_ids[ $field[ 'merge' ] ] ) ) { ?> 
1823
+									<input type="hidden" class="yikes-mc-merge-field-id" name="field[<?php echo $field[ 'merge' ]; ?>][id]" value="<?php echo $merge_field_ids[ $field[ 'merge' ] ] ?>" />  
1824 1824
 								<?php } ?>
1825 1825
 
1826
-								<?php if ( $field['type'] == 'radio' || $field['type'] == 'dropdown' || $field['type'] == 'select' ) {
1827
-									$choices = json_decode( $field['choices'], true );
1826
+								<?php if ( $field[ 'type' ] == 'radio' || $field[ 'type' ] == 'dropdown' || $field[ 'type' ] == 'select' ) {
1827
+									$choices = json_decode( $field[ 'choices' ], true );
1828 1828
 								?>
1829
-									<input type="hidden" name="field[<?php echo $field['merge']; ?>][choices]" value='<?php echo esc_attr( json_encode( $choices ) ); ?>' />
1829
+									<input type="hidden" name="field[<?php echo $field[ 'merge' ]; ?>][choices]" value='<?php echo esc_attr( json_encode( $choices ) ); ?>' />
1830 1830
 								<?php } ?>
1831 1831
 
1832 1832
 								<!-- Single or Double Opt-in -->
@@ -1842,12 +1842,12 @@  discard block
 block discarded – undo
1842 1842
 												</label>
1843 1843
 											</td>
1844 1844
 											<td>
1845
-												<input class="widefat merge-tag-text" type="text" readonly value="<?php echo $field['merge']; ?>">
1845
+												<input class="widefat merge-tag-text" type="text" readonly value="<?php echo $field[ 'merge' ]; ?>">
1846 1846
 											</td>
1847 1847
 										</tr>
1848 1848
 
1849 1849
 										<!-- Placeholder Value -->
1850
-										<?php switch( $field['type'] ) {
1850
+										<?php switch ( $field[ 'type' ] ) {
1851 1851
 
1852 1852
 											case 'text':
1853 1853
 											case 'email':
@@ -1861,13 +1861,13 @@  discard block
 block discarded – undo
1861 1861
 										<!-- Placeholder -->
1862 1862
 										<tr valign="top">
1863 1863
 											<td scope="row">
1864
-												<label for="placeholder_<?php echo esc_attr( $field['merge'] ); ?>">
1864
+												<label for="placeholder_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
1865 1865
 													<?php _e( 'Placeholder', 'yikes-inc-easy-mailchimp-extender' ); ?>
1866 1866
 												</label>
1867 1867
 											</td>
1868 1868
 											<td>
1869
-												<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'] : '' ; ?>" />
1870
-												<p class="description"><small><?php _e( "Assign a placeholder value to this field.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
1869
+												<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' ] : ''; ?>" />
1870
+												<p class="description"><small><?php _e( "Assign a placeholder value to this field.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
1871 1871
 											</td>
1872 1872
 										</tr>
1873 1873
 										<?php
@@ -1878,13 +1878,13 @@  discard block
 block discarded – undo
1878 1878
 											?>
1879 1879
 												<tr valign="top">
1880 1880
 													<td scope="row">
1881
-														<label for="placeholder_<?php echo esc_attr( $field['merge'] ); ?>">
1881
+														<label for="placeholder_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
1882 1882
 															<?php _e( 'Placeholder', 'yikes-inc-easy-mailchimp-extender' ); ?>
1883 1883
 														</label>
1884 1884
 													</td>
1885 1885
 													<td>
1886
-														<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"' : '' ; ?> />
1887
-														<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>
1886
+														<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"' : ''; ?> />
1887
+														<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>
1888 1888
 													</td>
1889 1889
 												</tr>
1890 1890
 											<?php
@@ -1894,7 +1894,7 @@  discard block
 block discarded – undo
1894 1894
 										?>
1895 1895
 
1896 1896
 										<!-- Default Value -->
1897
-										<?php switch( $field['type'] ) {
1897
+										<?php switch ( $field[ 'type' ] ) {
1898 1898
 											default:
1899 1899
 											case 'text':
1900 1900
 											case 'number':
@@ -1902,15 +1902,15 @@  discard block
 block discarded – undo
1902 1902
 										?>
1903 1903
 											<tr valign="top">
1904 1904
 												<td scope="row">
1905
-													<label for="default_value_<?php echo esc_attr( $field['merge'] ); ?>">
1905
+													<label for="default_value_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
1906 1906
 														<?php _e( 'Default Value', 'yikes-inc-easy-mailchimp-extender' ); ?>
1907 1907
 													</label>
1908 1908
 												</td>
1909 1909
 												<td>
1910
-													<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 } ?> />
1911
-													<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>
1910
+													<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 } ?> />
1911
+													<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>
1912 1912
 													<?php
1913
-													switch( $field['type'] ) {
1913
+													switch ( $field[ 'type' ] ) {
1914 1914
 														case 'text':
1915 1915
 															?>
1916 1916
 																<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>
@@ -1932,28 +1932,28 @@  discard block
 block discarded – undo
1932 1932
 													</td>
1933 1933
 													<td>
1934 1934
 														<?php
1935
-															$field['default_choice'] = ! isset( $field['default_choice'] ) ? 'no-default' : $field['default_choice'];
1935
+															$field[ 'default_choice' ] = ! isset( $field[ 'default_choice' ] ) ? 'no-default' : $field[ 'default_choice' ];
1936 1936
 															$x = 0;
1937 1937
 														?>
1938
-														<label for="<?php echo $field['merge'] . '-no-default'; ?>">
1939
-															<input id="<?php echo $field['merge'] . '-no-default'; ?>"
1938
+														<label for="<?php echo $field[ 'merge' ] . '-no-default'; ?>">
1939
+															<input id="<?php echo $field[ 'merge' ] . '-no-default'; ?>"
1940 1940
 															       type="radio"
1941
-															       name="field[<?php echo $field['merge']; ?>][default_choice]"
1942
-															       value="no-default" <?php checked( $field['default_choice'], 'no-default' ); ?>
1941
+															       name="field[<?php echo $field[ 'merge' ]; ?>][default_choice]"
1942
+															       value="no-default" <?php checked( $field[ 'default_choice' ], 'no-default' ); ?>
1943 1943
 															>
1944 1944
 															No Default&nbsp;
1945 1945
 														</label>
1946 1946
 														<?php
1947 1947
 														foreach ( $choices as $choice => $value ) { ?>
1948
-															<label for="<?php echo $field['merge'].'-'.$x; ?>">
1949
-																<input id="<?php echo $field['merge'].'-'.$x; ?>"
1948
+															<label for="<?php echo $field[ 'merge' ] . '-' . $x; ?>">
1949
+																<input id="<?php echo $field[ 'merge' ] . '-' . $x; ?>"
1950 1950
 																       type="radio"
1951
-																       name="field[<?php echo $field['merge']; ?>][default_choice]"
1952
-																       value="<?php echo $x; ?>" <?php checked( $field['default_choice'], $x ); ?>>
1951
+																       name="field[<?php echo $field[ 'merge' ]; ?>][default_choice]"
1952
+																       value="<?php echo $x; ?>" <?php checked( $field[ 'default_choice' ], $x ); ?>>
1953 1953
 																<?php echo $value; ?>&nbsp;
1954 1954
 															</label>
1955 1955
 														<?php $x++; } ?>
1956
-														<p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
1956
+														<p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
1957 1957
 													</td>
1958 1958
 												</tr>
1959 1959
 
@@ -1969,13 +1969,13 @@  discard block
 block discarded – undo
1969 1969
 														</label>
1970 1970
 													</td>
1971 1971
 													<td>
1972
-														<select type="default" name="field[<?php echo $field['merge']; ?>][default_choice]">
1973
-															<option value="no-default" <?php selected( $field['default_choice'] , 'no-default' ); ?>>No Default</option>
1974
-															<?php foreach( json_decode( $field['choices'], true ) as $choice => $value ) { ?>
1975
-																<option value="<?php echo $choice; ?>" <?php selected( $field['default_choice'] , $choice ); ?>><?php echo $value; ?></option>
1972
+														<select type="default" name="field[<?php echo $field[ 'merge' ]; ?>][default_choice]">
1973
+															<option value="no-default" <?php selected( $field[ 'default_choice' ], 'no-default' ); ?>>No Default</option>
1974
+															<?php foreach ( json_decode( $field[ 'choices' ], true ) as $choice => $value ) { ?>
1975
+																<option value="<?php echo $choice; ?>" <?php selected( $field[ 'default_choice' ], $choice ); ?>><?php echo $value; ?></option>
1976 1976
 															<?php } ?>
1977 1977
 														</select>
1978
-														<p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
1978
+														<p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
1979 1979
 													</td>
1980 1980
 												</tr>
1981 1981
 
@@ -1992,82 +1992,82 @@  discard block
 block discarded – undo
1992 1992
 										<!-- Field Description -->
1993 1993
 										<tr valign="top">
1994 1994
 											<td scope="row">
1995
-												<label for="description_<?php echo esc_attr( $field['merge'] ); ?>">
1995
+												<label for="description_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
1996 1996
 													<?php _e( 'Description', 'yikes-inc-easy-mailchimp-extender' ); ?>
1997 1997
 												</label>
1998 1998
 											</td>
1999 1999
 											<td>
2000
-												<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>
2001
-												<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>
2000
+												<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>
2001
+												<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>
2002 2002
 											</td>
2003 2003
 										</tr>
2004 2004
 										<!-- Description Above Field -->
2005 2005
 										<tr valign="top" class="yikes-checkbox-container">
2006 2006
 											<td scope="row">
2007
-												<label for="description_above_<?php echo esc_attr( $field['merge'] ); ?>">
2007
+												<label for="description_above_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
2008 2008
 													<?php _e( 'Description Above Field', 'yikes-inc-easy-mailchimp-extender' ); ?>
2009 2009
 												</label>
2010 2010
 											</td>
2011 2011
 											<td>
2012
-												<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"' : ''; ?> />
2013
-												<p 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></p>
2012
+												<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"' : ''; ?> />
2013
+												<p 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></p>
2014 2014
 											</td>
2015 2015
 										</tr>
2016 2016
 										<!-- Additional Classes -->
2017 2017
 										<tr valign="top">
2018 2018
 											<td scope="row">
2019
-												<label for="classes_<?php echo esc_attr( $field['merge'] ); ?>">
2019
+												<label for="classes_<?php echo esc_attr( $field[ 'merge' ] ); ?>">
2020 2020
 													<?php _e( 'Additional Classes', 'yikes-inc-easy-mailchimp-extender' ); ?>
2021 2021
 												</label>
2022 2022
 											</td>
2023 2023
 											<td>
2024
-												<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'] ) ) : '' ; ?>" />
2025
-												<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>
2024
+												<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' ] ) ) : ''; ?>" />
2025
+												<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>
2026 2026
 											</td>
2027 2027
 										</tr>
2028 2028
 										<!-- Required Toggle -->
2029 2029
 										<tr valign="top" class="yikes-checkbox-container yikes-checkbox-container-first">
2030 2030
 											<td scope="row">
2031
-												<label for="field-required-<?php echo esc_attr( $field['merge'] ); ?>">
2031
+												<label for="field-required-<?php echo esc_attr( $field[ 'merge' ] ); ?>">
2032 2032
 													<?php _e( 'Field Required?', 'yikes-inc-easy-mailchimp-extender' ); ?>
2033 2033
 												</label>
2034 2034
 											</td>
2035 2035
 											<td>
2036
-												<?php $checked = isset( $field['require'] ) ? $field['require'] : '0'; ?>
2037
-												<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' ); } ?>">
2038
-												<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
+												<?php $checked = isset( $field[ 'require' ] ) ? $field[ 'require' ] : '0'; ?>
2037
+												<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' ); } ?>">
2038
+												<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>
2039 2039
 											</td>
2040 2040
 										</tr>
2041 2041
 										<!-- Visible Toggle -->
2042 2042
 										<tr valign="top" class="yikes-checkbox-container">
2043 2043
 											<td scope="row">
2044
-												<label for="hide-field-<?php echo esc_attr( $field['merge'] ); ?>">
2044
+												<label for="hide-field-<?php echo esc_attr( $field[ 'merge' ] ); ?>">
2045 2045
 													<?php _e( 'Hide Field', 'yikes-inc-easy-mailchimp-extender' ); ?>
2046 2046
 												</label>
2047 2047
 											</td>
2048 2048
 											<td>
2049
-												<?php $hide = isset( $field['hide'] ) ? $field['hide'] : '0'; ?>
2050
-												<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' ); } ?>">
2051
-												<p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2049
+												<?php $hide = isset( $field[ 'hide' ] ) ? $field[ 'hide' ] : '0'; ?>
2050
+												<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' ); } ?>">
2051
+												<p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2052 2052
 											</td>
2053 2053
 										</tr>
2054 2054
 										<!-- Toggle Field Label Visibility -->
2055 2055
 										<tr valign="top" class="yikes-checkbox-container">
2056 2056
 											<td scope="row">
2057
-												<label for="hide-label-<?php echo esc_attr( $field['merge'] ); ?>">
2057
+												<label for="hide-label-<?php echo esc_attr( $field[ 'merge' ] ); ?>">
2058 2058
 													<?php _e( 'Hide Label', 'yikes-inc-easy-mailchimp-extender' ); ?>
2059 2059
 												</label>
2060 2060
 											</td>
2061 2061
 											<td>
2062
-												<?php $hide_label = isset( $field['hide-label'] ) ? $field['hide-label'] : '0'; ?>
2063
-												<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 ); ?>/>
2064
-												<p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2062
+												<?php $hide_label = isset( $field[ 'hide-label' ] ) ? $field[ 'hide-label' ] : '0'; ?>
2063
+												<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 ); ?>/>
2064
+												<p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2065 2065
 											</td>
2066 2066
 										</tr>
2067 2067
 										<!-- Display Phone/Date Formats back to the user -->
2068 2068
 										<!-- Phone Format Initial Load -->
2069 2069
 										<?php
2070
-											switch( $field['type'] ) {
2070
+											switch ( $field[ 'type' ] ) {
2071 2071
 												/* Store the phone format, for properly regex pattern */
2072 2072
 												case 'phone':
2073 2073
 												case 'birthday':
@@ -2077,23 +2077,23 @@  discard block
 block discarded – undo
2077 2077
 															<td scope="row">
2078 2078
 																<label for="placeholder">
2079 2079
 																	<?php
2080
-																		switch( $field['type'] ) {
2080
+																		switch ( $field[ 'type' ] ) {
2081 2081
 																			default:
2082 2082
 																			case 'birthday':
2083 2083
 																				$type = __( 'Date Format', 'yikes-inc-easy-mailchimp-extender' );
2084
-																				$format = ( isset( $field['date_format'] ) ) ? $field['date_format'] : 'MM/DD';
2084
+																				$format = ( isset( $field[ 'date_format' ] ) ) ? $field[ 'date_format' ] : 'MM/DD';
2085 2085
 																				$format_name = 'date_format';
2086 2086
 																				break;
2087 2087
 
2088 2088
 																			case 'date':
2089 2089
 																				$type = __( 'Date Format', 'yikes-inc-easy-mailchimp-extender' );
2090
-																				$format = ( isset( $field['date_format'] ) ) ? $field['date_format'] : 'MM/DD/YYYY';
2090
+																				$format = ( isset( $field[ 'date_format' ] ) ) ? $field[ 'date_format' ] : 'MM/DD/YYYY';
2091 2091
 																				$format_name = 'date_format';
2092 2092
 																				break;
2093 2093
 
2094 2094
 																			case 'phone':
2095 2095
 																				$type = __( 'Phone Format', 'yikes-inc-easy-mailchimp-extender' );
2096
-																				$format = isset( $field['phone_format'] ) && ! empty( $field['phone_format'] ) ? $field['phone_format'] : __( 'International', 'yikes-inc-easy-mailchimp-extender' );
2096
+																				$format = isset( $field[ 'phone_format' ] ) && ! empty( $field[ 'phone_format' ] ) ? $field[ 'phone_format' ] : __( 'International', 'yikes-inc-easy-mailchimp-extender' );
2097 2097
 																				$format_name = 'phone_format';
2098 2098
 																				break;
2099 2099
 																		}
@@ -2103,7 +2103,7 @@  discard block
 block discarded – undo
2103 2103
 															</td>
2104 2104
 															<td>
2105 2105
 																<strong><?php echo $format; ?></strong>
2106
-																<input type="hidden" name="field[<?php echo $field['merge']; ?>][<?php echo $format_name; ?>]" value="<?php echo $format; ?>" />
2106
+																<input type="hidden" name="field[<?php echo $field[ 'merge' ]; ?>][<?php echo $format_name; ?>]" value="<?php echo $format; ?>" />
2107 2107
 																<p class="description"><small>
2108 2108
 																	<?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' ) ); ?>
2109 2109
 																</small></p>
@@ -2124,8 +2124,8 @@  discard block
 block discarded – undo
2124 2124
 											</td>
2125 2125
 											<td>
2126 2126
 												<span class="toggle-container">
2127
-													<a href="#" class="close-form-expansion"><?php _e( "Close" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
2128
-													<a href="#" class="remove-field" alt="<?php echo $field['merge']; ?>"><?php _e( "Remove Field" , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
2127
+													<a href="#" class="close-form-expansion"><?php _e( "Close", 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
2128
+													<a href="#" class="remove-field" alt="<?php echo $field[ 'merge' ]; ?>"><?php _e( "Remove Field", 'yikes-inc-easy-mailchimp-extender' ); ?></a>
2129 2129
 												</span>
2130 2130
 											</td>
2131 2131
 										</tr>
@@ -2143,35 +2143,35 @@  discard block
 block discarded – undo
2143 2143
 						/**** Interest Group ****/
2144 2144
 
2145 2145
 						?>
2146
-						<section class="draggable" id="<?php echo $field['group_id']; ?>">
2146
+						<section class="draggable" id="<?php echo $field[ 'group_id' ]; ?>">
2147 2147
 							<!-- top -->
2148 2148
 							<a href="#" class="expansion-section-title settings-sidebar">
2149
-								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php echo stripslashes( $field['label'] ); ?>
2150
-								<?php if ( in_array( $field['group_id'] , $excluded_fields ) ) { ?>
2149
+								<span class="dashicons dashicons-plus yikes-mc-expansion-toggle"></span><?php echo stripslashes( $field[ 'label' ] ); ?>
2150
+								<?php if ( in_array( $field[ 'group_id' ], $excluded_fields ) ) { ?>
2151 2151
 									<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' ); ?>">
2152 2152
 								<?php } ?>
2153
-								<span class="field-type-text"><small><?php echo __( 'type', 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $field['type']; ?></small></span>
2153
+								<span class="field-type-text"><small><?php echo __( 'type', 'yikes-inc-easy-mailchimp-extender' ) . ' : ' . $field[ 'type' ]; ?></small></span>
2154 2154
 							</a>
2155 2155
 							<!-- expansion section -->
2156 2156
 							<div class="yikes-mc-settings-expansion-section">
2157 2157
 
2158 2158
 								<!-- check if this field exists in the available interest group array -->
2159
-								<?php if ( in_array( $field['group_id'] , $excluded_fields ) ) { ?>
2160
-									<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>
2159
+								<?php if ( in_array( $field[ 'group_id' ], $excluded_fields ) ) { ?>
2160
+									<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>
2161 2161
 								<?php } ?>
2162 2162
 
2163 2163
 								<!-- store the label -->
2164
-								<input type="hidden" name="field[<?php echo $field['group_id']; ?>][label]" value="<?php echo htmlspecialchars( $field['label'] ); ?>" />
2165
-								<input type="hidden" name="field[<?php echo $field['group_id']; ?>][type]" value="<?php echo $field['type']; ?>" />
2166
-								<input type="hidden" name="field[<?php echo $field['group_id']; ?>][group_id]" value="<?php echo $field['group_id']; ?>" />
2167
-								<input type="hidden" name="field[<?php echo $field['group_id']; ?>][groups]" value='<?php echo esc_attr( json_encode( json_decode( $field['groups'], true ) ) ); ?>' />
2164
+								<input type="hidden" name="field[<?php echo $field[ 'group_id' ]; ?>][label]" value="<?php echo htmlspecialchars( $field[ 'label' ] ); ?>" />
2165
+								<input type="hidden" name="field[<?php echo $field[ 'group_id' ]; ?>][type]" value="<?php echo $field[ 'type' ]; ?>" />
2166
+								<input type="hidden" name="field[<?php echo $field[ 'group_id' ]; ?>][group_id]" value="<?php echo $field[ 'group_id' ]; ?>" />
2167
+								<input type="hidden" name="field[<?php echo $field[ 'group_id' ]; ?>][groups]" value='<?php echo esc_attr( json_encode( json_decode( $field[ 'groups' ], true ) ) ); ?>' />
2168 2168
 
2169 2169
 								<!-- Single or Double Opt-in -->
2170 2170
 								<p class="type-container"><!-- necessary to prevent skipping on slideToggle(); -->
2171 2171
 
2172 2172
 									<table class="form-table form-field-container">
2173 2173
 										<!-- Default Value -->
2174
-										<?php switch( $field['type'] ) {
2174
+										<?php switch ( $field[ 'type' ] ) {
2175 2175
 											default:
2176 2176
 											case 'radio':
2177 2177
 											case 'checkboxes':
@@ -2184,15 +2184,15 @@  discard block
 block discarded – undo
2184 2184
 													</td>
2185 2185
 													<td>
2186 2186
 														<?php
2187
-														$field['default_choice'] = isset( $field['default_choice'] ) ? $field['default_choice'] : '';
2187
+														$field[ 'default_choice' ] = isset( $field[ 'default_choice' ] ) ? $field[ 'default_choice' ] : '';
2188 2188
 
2189 2189
 														$default_shown = false;
2190 2190
 
2191
-														foreach ( json_decode( $field['groups'], true ) as $id => $group ) {
2192
-															$field_id   = "{$field['group_id']}-{$id}";
2193
-															$field_type = 'hidden' == $field['type'] ? 'checkbox' : $field['type'];
2191
+														foreach ( json_decode( $field[ 'groups' ], true ) as $id => $group ) {
2192
+															$field_id   = "{$field[ 'group_id' ]}-{$id}";
2193
+															$field_type = 'hidden' == $field[ 'type' ] ? 'checkbox' : $field[ 'type' ];
2194 2194
 															$field_type = 'checkboxes' == $field_type ? 'checkbox' : $field_type;
2195
-															$field_name = "field[{$field['group_id']}][default_choice]";
2195
+															$field_name = "field[{$field[ 'group_id' ]}][default_choice]";
2196 2196
 															$field_name = 'checkbox' == $field_type ? $field_name . '[]' : $field_name;
2197 2197
 
2198 2198
 															// Determine if the current group is checked.
@@ -2200,13 +2200,13 @@  discard block
 block discarded – undo
2200 2200
 															switch ( $field_type ) {
2201 2201
 																case 'radio':
2202 2202
 																default:
2203
-																	$default = is_array( $field['default_choice'] ) ? current( $field['default_choice'] ) : $field['default_choice'];
2204
-																	$checked = is_array( $field['default_choice'] ) ? checked( current( $field['default_choice'] ), $id, false ) : checked( $field['default_choice'], $id, false );
2203
+																	$default = is_array( $field[ 'default_choice' ] ) ? current( $field[ 'default_choice' ] ) : $field[ 'default_choice' ];
2204
+																	$checked = is_array( $field[ 'default_choice' ] ) ? checked( current( $field[ 'default_choice' ] ), $id, false ) : checked( $field[ 'default_choice' ], $id, false );
2205 2205
 																break;
2206 2206
 
2207 2207
 																case 'checkbox':
2208 2208
 																case 'hidden':
2209
-																	if ( is_array( $field['default_choice'] ) && in_array( $id, $field['default_choice'] ) ) {
2209
+																	if ( is_array( $field[ 'default_choice' ] ) && in_array( $id, $field[ 'default_choice' ] ) ) {
2210 2210
 																		$checked = checked( true, true, false );
2211 2211
 																	}
2212 2212
 																break;
@@ -2221,7 +2221,7 @@  discard block
 block discarded – undo
2221 2221
 																	    type="<?php echo $field_type; ?>"
2222 2222
 																	    name="<?php echo $field_name; ?>"
2223 2223
 																	    value="no-default" 
2224
-																	    <?php is_array( $field['default_choice'] ) ? checked( current( $field['default_choice'] ), 'no-default' ) : checked( $field['default_choice'], 'no-default' ); ?>>
2224
+																	    <?php is_array( $field[ 'default_choice' ] ) ? checked( current( $field[ 'default_choice' ] ), 'no-default' ) : checked( $field[ 'default_choice' ], 'no-default' ); ?>>
2225 2225
 																	No Default&nbsp;
2226 2226
 																</label>
2227 2227
 																<?php
@@ -2237,7 +2237,7 @@  discard block
 block discarded – undo
2237 2237
 															</label>
2238 2238
 															<?php
2239 2239
 														} ?>
2240
-														<p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2240
+														<p class="description"><small><?php _e( "Select the option that should be selected by default.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2241 2241
 													</td>
2242 2242
 												</tr>
2243 2243
 
@@ -2253,13 +2253,13 @@  discard block
 block discarded – undo
2253 2253
 														</label>
2254 2254
 													</td>
2255 2255
 													<td>
2256
-														<select type="default" name="field[<?php echo $field['group_id']; ?>][default_choice]">
2256
+														<select type="default" name="field[<?php echo $field[ 'group_id' ]; ?>][default_choice]">
2257 2257
 															<option value="no-default">No Default</option>
2258
-															<?php foreach( json_decode( stripslashes_deep( $field['groups'] ) , true ) as $id => $group ) { ?>
2259
-																<option value="<?php echo $id; ?>" <?php selected( $field['default_choice'] , $id ); ?>><?php echo stripslashes( $group ); ?></option>
2258
+															<?php foreach ( json_decode( stripslashes_deep( $field[ 'groups' ] ), true ) as $id => $group ) { ?>
2259
+																<option value="<?php echo $id; ?>" <?php selected( $field[ 'default_choice' ], $id ); ?>><?php echo stripslashes( $group ); ?></option>
2260 2260
 															<?php } ?>
2261 2261
 														</select>
2262
-														<p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2262
+														<p class="description"><small><?php _e( "Which option should be selected by default?", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2263 2263
 													</td>
2264 2264
 												</tr>
2265 2265
 
@@ -2272,78 +2272,78 @@  discard block
 block discarded – undo
2272 2272
 										<!-- Field Description -->
2273 2273
 										<tr valign="top">
2274 2274
 											<td scope="row">
2275
-												<label for="description_<?php echo esc_attr( $field['group_id'] ); ?>">
2275
+												<label for="description_<?php echo esc_attr( $field[ 'group_id' ] ); ?>">
2276 2276
 													<?php _e( 'Description', 'yikes-inc-easy-mailchimp-extender' ); ?>
2277 2277
 												</label>
2278 2278
 											</td>
2279 2279
 											<td>
2280
-												<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>
2281
-												<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>
2280
+												<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>
2281
+												<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>
2282 2282
 											</td>
2283 2283
 										</tr>
2284 2284
 
2285 2285
 										<!-- Description Above Field -->
2286 2286
 										<tr valign="top" class="yikes-checkbox-container">
2287 2287
 											<td scope="row">
2288
-												<label for="description_above_<?php echo $field['group_id']; ?>">
2288
+												<label for="description_above_<?php echo $field[ 'group_id' ]; ?>">
2289 2289
 													<?php _e( 'Description Above Field', 'yikes-inc-easy-mailchimp-extender' ); ?>
2290 2290
 												</label>
2291 2291
 											</td>
2292 2292
 											<td>
2293
-												<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"' : ''; ?> />
2294
-												<p 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></p>
2293
+												<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"' : ''; ?> />
2294
+												<p 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></p>
2295 2295
 											</td>
2296 2296
 										</tr>
2297 2297
 
2298 2298
 										<!-- Additional Classes -->
2299 2299
 										<tr valign="top">
2300 2300
 											<td scope="row">
2301
-												<label for="classes_<?php echo esc_attr( $field['group_id'] ); ?>">
2301
+												<label for="classes_<?php echo esc_attr( $field[ 'group_id' ] ); ?>">
2302 2302
 													<?php _e( 'Additional Classes', 'yikes-inc-easy-mailchimp-extender' ); ?>
2303 2303
 												</label>
2304 2304
 											</td>
2305 2305
 											<td>
2306
-												<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'] ) ) : '' ; ?>" />
2307
-												<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>
2306
+												<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' ] ) ) : ''; ?>" />
2307
+												<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>
2308 2308
 											</td>
2309 2309
 										</tr>
2310 2310
 										<!-- Required Toggle -->
2311 2311
 										<tr valign="top" class="yikes-checkbox-container">
2312 2312
 											<td scope="row">
2313
-												<label for="field-required-<?php echo esc_attr( $field['group_id'] ); ?>">
2313
+												<label for="field-required-<?php echo esc_attr( $field[ 'group_id' ] ); ?>">
2314 2314
 													<?php _e( 'Field Required?', 'yikes-inc-easy-mailchimp-extender' ); ?>
2315 2315
 												</label>
2316 2316
 											</td>
2317 2317
 											<td>
2318
-												<?php $checked = isset( $field['require'] ) ? $field['require'] : '0'; ?>
2319
-												<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 ); ?>>
2320
-												<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
+												<?php $checked = isset( $field[ 'require' ] ) ? $field[ 'require' ] : '0'; ?>
2319
+												<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 ); ?>>
2320
+												<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>
2321 2321
 											</td>
2322 2322
 										</tr>
2323 2323
 										<!-- Visible Toggle -->
2324 2324
 										<tr valign="top" class="yikes-checkbox-container">
2325 2325
 											<td scope="row">
2326
-												<label for="hide-field-<?php echo esc_attr( $field['group_id'] ); ?>">
2326
+												<label for="hide-field-<?php echo esc_attr( $field[ 'group_id' ] ); ?>">
2327 2327
 													<?php _e( 'Hide Field', 'yikes-inc-easy-mailchimp-extender' ); ?>
2328 2328
 												</label>
2329 2329
 											</td>
2330 2330
 											<td>
2331
-												<?php $hide = isset( $field['hide'] ) ? $field['hide'] : '0'; ?>
2332
-												<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 ); ?>>
2333
-												<p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2331
+												<?php $hide = isset( $field[ 'hide' ] ) ? $field[ 'hide' ] : '0'; ?>
2332
+												<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 ); ?>>
2333
+												<p class="description"><small><?php _e( "Hide this field from being displayed on the front end.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2334 2334
 											</td>
2335 2335
 										</tr>
2336 2336
 										<!-- Toggle Field Label Visibility -->
2337 2337
 										<tr valign="top" class="yikes-checkbox-container">
2338 2338
 											<td scope="row">
2339
-												<label for="hide-label-<?php echo esc_attr( $field['group_id'] ); ?>">
2339
+												<label for="hide-label-<?php echo esc_attr( $field[ 'group_id' ] ); ?>">
2340 2340
 													<?php _e( 'Hide Label', 'yikes-inc-easy-mailchimp-extender' ); ?>
2341 2341
 												</label>
2342 2342
 											</td>
2343 2343
 											<td>
2344
-												<?php $hide = isset( $field['hide-label'] ) ? $field['hide-label'] : '0'; ?>
2345
-												<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 ); ?>/>
2346
-												<p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
2344
+												<?php $hide = isset( $field[ 'hide-label' ] ) ? $field[ 'hide-label' ] : '0'; ?>
2345
+												<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 ); ?>/>
2346
+												<p class="description"><small><?php _e( "Toggle field label visibility.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
2347 2347
 											</td>
2348 2348
 										</tr>
2349 2349
 										<!-- Toggle Buttons -->
@@ -2353,8 +2353,8 @@  discard block
 block discarded – undo
2353 2353
 											</td>
2354 2354
 											<td>
2355 2355
 												<span class="toggle-container">
2356
-													<a href="#" class="close-form-expansion"><?php _e( "Close" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
2357
-													<a href="#" class="remove-field" alt="<?php echo $field['group_id']; ?>"><?php _e( "Remove Field" , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
2356
+													<a href="#" class="close-form-expansion"><?php _e( "Close", 'yikes-inc-easy-mailchimp-extender' ); ?></a> |
2357
+													<a href="#" class="remove-field" alt="<?php echo $field[ 'group_id' ]; ?>"><?php _e( "Remove Field", 'yikes-inc-easy-mailchimp-extender' ); ?></a>
2358 2358
 												</span>
2359 2359
 											</td>
2360 2360
 										</tr>
@@ -2375,7 +2375,7 @@  discard block
 block discarded – undo
2375 2375
 				add_thickbox();
2376 2376
 				// enqueue jquery qtip for our tooltip
2377 2377
 				wp_enqueue_script( 'jquery-qtip-tooltip', YIKES_MC_URL . 'admin/js/min/jquery.qtip.min.js', array( 'jquery' ) );
2378
-				wp_enqueue_style( 'jquery-qtip-style',  YIKES_MC_URL . 'admin/css/jquery.qtip.min.css' );
2378
+				wp_enqueue_style( 'jquery-qtip-style', YIKES_MC_URL . 'admin/css/jquery.qtip.min.css' );
2379 2379
 					$available_tags = array(
2380 2380
 						array(
2381 2381
 							'tag' => '{page_title}',
@@ -2430,14 +2430,14 @@  discard block
 block discarded – undo
2430 2430
 						<h3><?php _e( 'Pre Defined Tags', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
2431 2431
 						<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>
2432 2432
 						<ul>
2433
-							<?php foreach( apply_filters( 'yikes-mailchimp-custom-default-value-tags', $available_tags ) as $tag ) { ?>
2433
+							<?php foreach ( apply_filters( 'yikes-mailchimp-custom-default-value-tags', $available_tags ) as $tag ) { ?>
2434 2434
 								<li class="tooltop-tag">
2435 2435
 									<!-- link/tag -->
2436
-									<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>
2436
+									<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>
2437 2437
 									<!-- help icon -->
2438 2438
 									<span class="dashicons dashicons-editor-help"></span>
2439 2439
 									<!-- tooltip -->
2440
-									<div class="tooltiptext qtip-bootstrap yikes-easy-mc-hidden"><?php echo $tag['description']; ?></div>
2440
+									<div class="tooltiptext qtip-bootstrap yikes-easy-mc-hidden"><?php echo $tag[ 'description' ]; ?></div>
2441 2441
 								</li>
2442 2442
 							<?php } ?>
2443 2443
 						</ul>
@@ -2456,32 +2456,32 @@  discard block
 block discarded – undo
2456 2456
 		public function build_available_merge_vars( $form_fields, $available_merge_variables ) {
2457 2457
 			$fields_assigned_to_form = array();
2458 2458
 			foreach ( $form_fields as $field ) {
2459
-				if ( isset( $field['merge'] ) ) {
2460
-					$fields_assigned_to_form[ $field['merge'] ] = true;
2459
+				if ( isset( $field[ 'merge' ] ) ) {
2460
+					$fields_assigned_to_form[ $field[ 'merge' ] ] = true;
2461 2461
 				}
2462 2462
 			}
2463 2463
 
2464
-			if ( ! empty( $available_merge_variables['merge_fields'] ) ) {
2464
+			if ( ! empty( $available_merge_variables[ 'merge_fields' ] ) ) {
2465 2465
 				?>
2466 2466
 				<ul id="available-fields"><?php
2467
-				foreach ( $available_merge_variables['merge_fields'] as $merge_var ) {
2468
-					$not_available = isset( $fields_assigned_to_form[ $merge_var['tag'] ] );
2467
+				foreach ( $available_merge_variables[ 'merge_fields' ] as $merge_var ) {
2468
+					$not_available = isset( $fields_assigned_to_form[ $merge_var[ 'tag' ] ] );
2469 2469
 					?>
2470 2470
 					<li class="available-field <?php echo $not_available ? 'not-available' : ''; ?>"
2471
-						alt="<?php echo esc_attr( $merge_var['tag'] ); ?>"
2472
-						data-attr-field-type="<?php echo esc_attr( $merge_var['type'] ); ?>"
2473
-						data-attr-field-name="<?php echo esc_attr( $merge_var['name'] ); ?>"
2474
-						data-attr-form-id="<?php echo esc_attr( $available_merge_variables['list_id'] ); ?>"
2471
+						alt="<?php echo esc_attr( $merge_var[ 'tag' ] ); ?>"
2472
+						data-attr-field-type="<?php echo esc_attr( $merge_var[ 'type' ] ); ?>"
2473
+						data-attr-field-name="<?php echo esc_attr( $merge_var[ 'name' ] ); ?>"
2474
+						data-attr-form-id="<?php echo esc_attr( $available_merge_variables[ 'list_id' ] ); ?>"
2475 2475
 						title="<?php echo $not_available ? esc_attr__( 'Already assigned to your form', 'yikes-inc-easy-mailchimp-extender' ) : ''; ?>"
2476 2476
 						<?php echo $not_available ? 'disabled="disabled"' : ''; ?>
2477 2477
 					>
2478 2478
 						<?php
2479
-							echo esc_html( stripslashes( $merge_var['name'] ) );
2480
-							if ( $merge_var['required'] ) {
2479
+							echo esc_html( stripslashes( $merge_var[ 'name' ] ) );
2480
+							if ( $merge_var[ 'required' ] ) {
2481 2481
 								echo ' <span class="field-required" title="' . __( 'required field', 'yikes-inc-easy-mailchimp-extender' ) . '">*</span>';
2482 2482
 							}
2483 2483
 						?>
2484
-						<small class="field-type-text"><?php echo esc_html( $merge_var['type'] ); ?></small>
2484
+						<small class="field-type-text"><?php echo esc_html( $merge_var[ 'type' ] ); ?></small>
2485 2485
 					</li>
2486 2486
 					<?php
2487 2487
 				}
@@ -2506,8 +2506,8 @@  discard block
 block discarded – undo
2506 2506
 			$fields_assigned_to_form = array();
2507 2507
 			if ( ! empty( $form_fields ) ) {
2508 2508
 				foreach ( $form_fields as $field ) {
2509
-					if ( isset( $field['group_id'] ) ) {
2510
-						$fields_assigned_to_form[ $field['group_id'] ] = true;
2509
+					if ( isset( $field[ 'group_id' ] ) ) {
2510
+						$fields_assigned_to_form[ $field[ 'group_id' ] ] = true;
2511 2511
 					}
2512 2512
 				}
2513 2513
 			}
@@ -2517,19 +2517,19 @@  discard block
 block discarded – undo
2517 2517
 				<ul id="available-interest-groups">
2518 2518
 				<?php
2519 2519
 					foreach ( $available_interest_groups as $interest_group ) {
2520
-						$not_available = isset( $fields_assigned_to_form[ $interest_group['id'] ] );
2520
+						$not_available = isset( $fields_assigned_to_form[ $interest_group[ 'id' ] ] );
2521 2521
 						?>
2522 2522
 						<li class="available-field <?php echo $not_available ? 'not-available' : ''; ?>" 
2523
-							alt="<?php echo esc_attr( $interest_group['id'] ); ?>" 
2524
-							data-group-id="<?php echo esc_attr( $interest_group['id'] ); ?>" 
2525
-							data-attr-field-name="<?php echo esc_attr( htmlspecialchars( $interest_group['title'] ) ); ?>" 
2526
-							data-attr-field-type="<?php echo esc_attr( $interest_group['type'] ); ?>" 
2523
+							alt="<?php echo esc_attr( $interest_group[ 'id' ] ); ?>" 
2524
+							data-group-id="<?php echo esc_attr( $interest_group[ 'id' ] ); ?>" 
2525
+							data-attr-field-name="<?php echo esc_attr( htmlspecialchars( $interest_group[ 'title' ] ) ); ?>" 
2526
+							data-attr-field-type="<?php echo esc_attr( $interest_group[ 'type' ] ); ?>" 
2527 2527
 							data-attr-form-id="<?php echo esc_attr( $list_id ); ?>"
2528 2528
 							title="<?php echo $not_available ? __( 'Already assigned to your form', 'yikes-inc-easy-mailchimp-extender' ) : ''; ?>"
2529 2529
 							<?php echo $not_available ? 'disabled="disabled"' : ''; ?>
2530 2530
 						>
2531
-							<?php echo esc_html( stripslashes( $interest_group['title'] ) ); ?>
2532
-							<small class="field-type-text"><?php echo esc_html( $interest_group['type'] ); ?></small>
2531
+							<?php echo esc_html( stripslashes( $interest_group[ 'title' ] ) ); ?>
2532
+							<small class="field-type-text"><?php echo esc_html( $interest_group[ 'type' ] ); ?></small>
2533 2533
 						</li>
2534 2534
 						<?php
2535 2535
 					}
@@ -2555,13 +2555,13 @@  discard block
 block discarded – undo
2555 2555
 				$not_available = isset( $form_tags[ $tag_id ] );
2556 2556
 				?>
2557 2557
 				<li class="available-field <?php echo $not_available ? 'not-available' : ''; ?>"
2558
-					id="tag-<?php echo esc_attr( $tag['id'] ); ?>"
2559
-					data-tag-id="<?php echo esc_attr( $tag['id'] ); ?>"
2560
-					data-tag-name="<?php echo esc_attr( $tag['name'] ); ?>"
2561
-					title="<?php echo $not_available ? __( 'Already assigned to your form', 'yikes-inc-easy-mailchimp-extender' ) : esc_attr( $tag['name'] ); ?>"
2558
+					id="tag-<?php echo esc_attr( $tag[ 'id' ] ); ?>"
2559
+					data-tag-id="<?php echo esc_attr( $tag[ 'id' ] ); ?>"
2560
+					data-tag-name="<?php echo esc_attr( $tag[ 'name' ] ); ?>"
2561
+					title="<?php echo $not_available ? __( 'Already assigned to your form', 'yikes-inc-easy-mailchimp-extender' ) : esc_attr( $tag[ 'name' ] ); ?>"
2562 2562
 					<?php echo $not_available ? 'disabled="disabled"' : ''; ?>
2563 2563
 				>
2564
-					<?php echo esc_html( $tag['name'] ); ?>
2564
+					<?php echo esc_html( $tag[ 'name' ] ); ?>
2565 2565
 				</li>
2566 2566
 				<?php
2567 2567
 			}
@@ -2582,15 +2582,15 @@  discard block
 block discarded – undo
2582 2582
 		*	- must clean up db tables , ensure what data is going in and what is needed...
2583 2583
 		*/
2584 2584
 		public function yikes_easy_mailchimp_create_form() {
2585
-			$nonce = $_REQUEST['nonce'];
2585
+			$nonce = $_REQUEST[ 'nonce' ];
2586 2586
 			if ( ! wp_verify_nonce( $nonce, 'create_mailchimp_form' ) ) {
2587
-				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) );
2587
+				wp_die( __( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ) );
2588 2588
 			}
2589 2589
 
2590 2590
 			$result = $this->form_interface->create_form( array(
2591
-				'list_id'          => sanitize_key( $_POST['associated-list'] ),
2592
-				'form_name'        => stripslashes( $_POST['form-name'] ),
2593
-				'form_description' => stripslashes( $_POST['form-description'] ),
2591
+				'list_id'          => sanitize_key( $_POST[ 'associated-list' ] ),
2592
+				'form_name'        => stripslashes( $_POST[ 'form-name' ] ),
2593
+				'form_description' => stripslashes( $_POST[ 'form-description' ] ),
2594 2594
 			) );
2595 2595
 
2596 2596
 			// if an error occurs during the form creation process
@@ -2598,11 +2598,11 @@  discard block
 block discarded – undo
2598 2598
 				// write it to the error log
2599 2599
 				// if the form was not created successfully
2600 2600
 				$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
2601
-				$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' ) );
2601
+				$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' ) );
2602 2602
 				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' ) ) ) ) );
2603 2603
 			} else {
2604 2604
 				// redirect the user to the new form edit page
2605
-				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&id=' . $result) ) );
2605
+				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&id=' . $result ) ) );
2606 2606
 			}
2607 2607
 			exit();
2608 2608
 		}
@@ -2615,11 +2615,11 @@  discard block
 block discarded – undo
2615 2615
 		*/
2616 2616
 		public function yikes_easy_mailchimp_delete_form() {
2617 2617
 			// grab & store our variables ( associated list & form name )
2618
-			$nonce = $_REQUEST['nonce'];
2619
-			$post_id_to_delete = $_REQUEST['mailchimp-form'];
2618
+			$nonce = $_REQUEST[ 'nonce' ];
2619
+			$post_id_to_delete = $_REQUEST[ 'mailchimp-form' ];
2620 2620
 			// verify our nonce
2621
-			if ( ! wp_verify_nonce( $nonce, 'delete-mailchimp-form-'.$post_id_to_delete ) ) {
2622
-				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 ) );
2621
+			if ( ! wp_verify_nonce( $nonce, 'delete-mailchimp-form-' . $post_id_to_delete ) ) {
2622
+				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 ) );
2623 2623
 			}
2624 2624
 
2625 2625
 			$this->form_interface->delete_form( $post_id_to_delete );
@@ -2635,19 +2635,19 @@  discard block
 block discarded – undo
2635 2635
 		*/
2636 2636
 		public function yikes_easy_mailchimp_duplicate_form() {
2637 2637
 			// grab & store our variables ( associated list & form name )
2638
-			$nonce = $_REQUEST['nonce'];
2639
-			$post_id_to_clone = $_REQUEST['mailchimp-form'];
2638
+			$nonce = $_REQUEST[ 'nonce' ];
2639
+			$post_id_to_clone = $_REQUEST[ 'mailchimp-form' ];
2640 2640
 			// verify our nonce
2641
-			if ( ! wp_verify_nonce( $nonce, 'duplicate-mailchimp-form-'.$post_id_to_clone ) ) {
2642
-				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 ) );
2641
+			if ( ! wp_verify_nonce( $nonce, 'duplicate-mailchimp-form-' . $post_id_to_clone ) ) {
2642
+				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 ) );
2643 2643
 			}
2644 2644
 
2645 2645
 			// Get the current form data.
2646 2646
 			$form_data = $this->form_interface->get_form( $post_id_to_clone );
2647 2647
 
2648 2648
 			// Update some of the data before duplication
2649
-			$form_data['form_name'] .= ' - Copy';
2650
-			$form_data['impressions'] = $form_data['submissions'] = 0;
2649
+			$form_data[ 'form_name' ] .= ' - Copy';
2650
+			$form_data[ 'impressions' ] = $form_data[ 'submissions' ] = 0;
2651 2651
 
2652 2652
 			// Create the new form, and handle the result.
2653 2653
 			$result = $this->form_interface->create_form( $form_data );
@@ -2678,11 +2678,11 @@  discard block
 block discarded – undo
2678 2678
 		*/
2679 2679
 		public function yikes_easy_mailchimp_reset_impression_stats() {
2680 2680
 			// grab & store our variables ( associated list & form name )
2681
-			$nonce = $_REQUEST['nonce'];
2682
-			$form_id_to_reset = $_REQUEST['mailchimp-form'];
2681
+			$nonce = $_REQUEST[ 'nonce' ];
2682
+			$form_id_to_reset = $_REQUEST[ 'mailchimp-form' ];
2683 2683
 			// verify our nonce
2684
-			if ( ! wp_verify_nonce( $nonce, 'reset-stats-mailchimp-form-'.$form_id_to_reset ) ) {
2685
-				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 ) );
2684
+			if ( ! wp_verify_nonce( $nonce, 'reset-stats-mailchimp-form-' . $form_id_to_reset ) ) {
2685
+				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 ) );
2686 2686
 			}
2687 2687
 
2688 2688
 			$result = $this->form_interface->update_form(
@@ -2710,8 +2710,8 @@  discard block
 block discarded – undo
2710 2710
 		*/
2711 2711
 		public function yikes_easy_mailchimp_update_form() {
2712 2712
 
2713
-			$nonce   = $_REQUEST['nonce'];
2714
-			$form_id = $_REQUEST['id'];
2713
+			$nonce   = $_REQUEST[ 'nonce' ];
2714
+			$form_id = $_REQUEST[ 'id' ];
2715 2715
 
2716 2716
 			// verify our nonce
2717 2717
 			if ( ! wp_verify_nonce( $nonce, 'update-mailchimp-form-' . $form_id ) ) {
@@ -2725,70 +2725,70 @@  discard block
 block discarded – undo
2725 2725
 			}
2726 2726
 
2727 2727
 			// Store our values!
2728
-			$list_id                 = $_POST['associated-list'];
2729
-			$form_name               = stripslashes( $_POST['form-name'] );
2730
-			$form_description        = sanitize_text_field( stripslashes( $_POST['form-description'] ) );
2731
-			$redirect_user_on_submit = $_POST['redirect-user-on-submission'];
2732
-			$redirect_page           = $_POST['redirect-user-to-selection'];
2728
+			$list_id                 = $_POST[ 'associated-list' ];
2729
+			$form_name               = stripslashes( $_POST[ 'form-name' ] );
2730
+			$form_description        = sanitize_text_field( stripslashes( $_POST[ 'form-description' ] ) );
2731
+			$redirect_user_on_submit = $_POST[ 'redirect-user-on-submission' ];
2732
+			$redirect_page           = $_POST[ 'redirect-user-to-selection' ];
2733 2733
 
2734 2734
 			// stripslashes_deep on save, to prevent foreign languages from added excessive backslashes
2735
-			$assigned_fields = isset( $_POST['field'] ) ? stripslashes_deep( $_POST['field'] ): array();
2735
+			$assigned_fields = isset( $_POST[ 'field' ] ) ? stripslashes_deep( $_POST[ 'field' ] ) : array();
2736 2736
 
2737 2737
 			// setup our submission settings serialized array
2738 2738
 			$submission_settings = array(
2739
-				'ajax'                   => $_POST['form-ajax-submission'],
2740
-				'redirect_on_submission' => $_POST['redirect-user-on-submission'],
2741
-				'redirect_page'          => $_POST['redirect-user-to-selection'],
2742
-				'custom_redirect_url'    => esc_url( $_POST['custom-redirect-url'] ),
2743
-				'redirect_new_window'	 => $_POST['redirect_new_window'],
2744
-				'hide_form_post_signup'  => $_POST['hide-form-post-signup'],
2745
-				'replace_interests'      => $_POST['replace-interest-groups'],
2739
+				'ajax'                   => $_POST[ 'form-ajax-submission' ],
2740
+				'redirect_on_submission' => $_POST[ 'redirect-user-on-submission' ],
2741
+				'redirect_page'          => $_POST[ 'redirect-user-to-selection' ],
2742
+				'custom_redirect_url'    => esc_url( $_POST[ 'custom-redirect-url' ] ),
2743
+				'redirect_new_window'	 => $_POST[ 'redirect_new_window' ],
2744
+				'hide_form_post_signup'  => $_POST[ 'hide-form-post-signup' ],
2745
+				'replace_interests'      => $_POST[ 'replace-interest-groups' ],
2746 2746
 			);
2747 2747
 
2748 2748
 			// setup our opt-in settings serialized array
2749 2749
 			$optin_settings = array(
2750
-				'optin'                => $_POST['single-double-optin'],
2751
-				'update_existing_user' => $_POST['update-existing-user'],
2752
-				'send_update_email'    => $_POST['update-existing-email'],
2750
+				'optin'                => $_POST[ 'single-double-optin' ],
2751
+				'update_existing_user' => $_POST[ 'update-existing-user' ],
2752
+				'send_update_email'    => $_POST[ 'update-existing-email' ],
2753 2753
 			);
2754 2754
 
2755 2755
 			// Setup our error settings serialized array
2756 2756
 			$error_settings = array(
2757
-				'success'				=> trim( $_POST['yikes-easy-mc-success-message'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-success-message'] ) ) : '',
2758
-				'success-single-optin'	=> trim( $_POST['yikes-easy-mc-success-single-optin-message'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-success-single-optin-message'] ) ) : '',
2759
-				'success-resubscribed'	=> trim( $_POST['yikes-easy-mc-user-resubscribed-success-message'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-user-resubscribed-success-message'] ) ) : '',
2760
-				'general-error'			=> trim( $_POST['yikes-easy-mc-general-error-message'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-general-error-message'] ) ) : '',
2761
-				'already-subscribed'	=> trim( $_POST['yikes-easy-mc-user-subscribed-message'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-user-subscribed-message'] ) ) : '',
2762
-				'update-link'			=> trim( $_POST['yikes-easy-mc-user-update-link'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-user-update-link'] ) ) : '',
2763
-				'email-subject'			=> trim( $_POST['yikes-easy-mc-user-email-subject'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-user-email-subject'] ) ) : '',
2764
-				'email-body'			=> trim( $_POST['yikes-easy-mc-user-email-body'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-user-email-body'] ) ) : '',
2765
-				'update-email-success'  => trim( $_POST['yikes-easy-mc-update-email-successful'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-update-email-successful'] ) ) : '',
2766
-				'update-email-failure'  => trim( $_POST['yikes-easy-mc-update-email-failure'] ) ? trim( stripslashes( $_POST['yikes-easy-mc-update-email-failure'] ) ) : '',
2757
+				'success'				=> trim( $_POST[ 'yikes-easy-mc-success-message' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-success-message' ] ) ) : '',
2758
+				'success-single-optin'	=> trim( $_POST[ 'yikes-easy-mc-success-single-optin-message' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-success-single-optin-message' ] ) ) : '',
2759
+				'success-resubscribed'	=> trim( $_POST[ 'yikes-easy-mc-user-resubscribed-success-message' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-user-resubscribed-success-message' ] ) ) : '',
2760
+				'general-error'			=> trim( $_POST[ 'yikes-easy-mc-general-error-message' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-general-error-message' ] ) ) : '',
2761
+				'already-subscribed'	=> trim( $_POST[ 'yikes-easy-mc-user-subscribed-message' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-user-subscribed-message' ] ) ) : '',
2762
+				'update-link'			=> trim( $_POST[ 'yikes-easy-mc-user-update-link' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-user-update-link' ] ) ) : '',
2763
+				'email-subject'			=> trim( $_POST[ 'yikes-easy-mc-user-email-subject' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-user-email-subject' ] ) ) : '',
2764
+				'email-body'			=> trim( $_POST[ 'yikes-easy-mc-user-email-body' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-user-email-body' ] ) ) : '',
2765
+				'update-email-success'  => trim( $_POST[ 'yikes-easy-mc-update-email-successful' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-update-email-successful' ] ) ) : '',
2766
+				'update-email-failure'  => trim( $_POST[ 'yikes-easy-mc-update-email-failure' ] ) ? trim( stripslashes( $_POST[ 'yikes-easy-mc-update-email-failure' ] ) ) : '',
2767 2767
 			);
2768 2768
 
2769 2769
 			// Setup the new form settings array
2770 2770
 			// @since 6.0.3.8
2771 2771
 			// To Do: Combine date & time so it's a single unix timestamp
2772 2772
 			$form_settings = array(
2773
-				'yikes-easy-mc-form-class-names'                 => trim( $_POST['yikes-easy-mc-form-class-names'] ),
2774
-				'yikes-easy-mc-inline-form'                      => $_POST['yikes-easy-mc-inline-form'][0],
2775
-				'yikes-easy-mc-submit-button-type'               => $_POST['yikes-easy-mc-submit-button-type'][0],
2776
-				'yikes-easy-mc-submit-button-text'               => trim( $_POST['yikes-easy-mc-submit-button-text'] ),
2777
-				'yikes-easy-mc-submit-button-image'              => esc_url( trim( $_POST['yikes-easy-mc-submit-button-image'] ) ),
2778
-				'yikes-easy-mc-submit-button-classes'            => trim( $_POST['yikes-easy-mc-submit-button-classes'] ),
2779
-				'yikes-easy-mc-form-schedule'                    => ( isset( $_POST['yikes-easy-mc-form-schedule'] ) ) ? '1' : '0',
2780
-				'yikes-easy-mc-form-restriction-start'           => strtotime( $_POST['yikes-easy-mc-form-restriction-start-date'] . ' ' . $_POST['yikes-easy-mc-form-restriction-start-time'] ),
2781
-				'yikes-easy-mc-form-restriction-end'             => strtotime( $_POST['yikes-easy-mc-form-restriction-end-date'] . ' ' . $_POST['yikes-easy-mc-form-restriction-end-time'] ),
2782
-				'yikes-easy-mc-form-restriction-pending-message' => trim( $_POST['yikes-easy-mc-form-restriction-pending-message'] ),
2783
-				'yikes-easy-mc-form-restriction-expired-message' => trim( $_POST['yikes-easy-mc-form-restriction-expired-message'] ),
2784
-				'yikes-easy-mc-form-login-required'              => ( isset( $_POST['yikes-easy-mc-form-login-required'] ) ) ? '1' : '0',
2785
-				'yikes-easy-mc-form-restriction-login-message'   => trim( $_POST['yikes-easy-mc-form-restriction-login-message'] ),
2773
+				'yikes-easy-mc-form-class-names'                 => trim( $_POST[ 'yikes-easy-mc-form-class-names' ] ),
2774
+				'yikes-easy-mc-inline-form'                      => $_POST[ 'yikes-easy-mc-inline-form' ][ 0 ],
2775
+				'yikes-easy-mc-submit-button-type'               => $_POST[ 'yikes-easy-mc-submit-button-type' ][ 0 ],
2776
+				'yikes-easy-mc-submit-button-text'               => trim( $_POST[ 'yikes-easy-mc-submit-button-text' ] ),
2777
+				'yikes-easy-mc-submit-button-image'              => esc_url( trim( $_POST[ 'yikes-easy-mc-submit-button-image' ] ) ),
2778
+				'yikes-easy-mc-submit-button-classes'            => trim( $_POST[ 'yikes-easy-mc-submit-button-classes' ] ),
2779
+				'yikes-easy-mc-form-schedule'                    => ( isset( $_POST[ 'yikes-easy-mc-form-schedule' ] ) ) ? '1' : '0',
2780
+				'yikes-easy-mc-form-restriction-start'           => strtotime( $_POST[ 'yikes-easy-mc-form-restriction-start-date' ] . ' ' . $_POST[ 'yikes-easy-mc-form-restriction-start-time' ] ),
2781
+				'yikes-easy-mc-form-restriction-end'             => strtotime( $_POST[ 'yikes-easy-mc-form-restriction-end-date' ] . ' ' . $_POST[ 'yikes-easy-mc-form-restriction-end-time' ] ),
2782
+				'yikes-easy-mc-form-restriction-pending-message' => trim( $_POST[ 'yikes-easy-mc-form-restriction-pending-message' ] ),
2783
+				'yikes-easy-mc-form-restriction-expired-message' => trim( $_POST[ 'yikes-easy-mc-form-restriction-expired-message' ] ),
2784
+				'yikes-easy-mc-form-login-required'              => ( isset( $_POST[ 'yikes-easy-mc-form-login-required' ] ) ) ? '1' : '0',
2785
+				'yikes-easy-mc-form-restriction-login-message'   => trim( $_POST[ 'yikes-easy-mc-form-restriction-login-message' ] ),
2786 2786
 			);
2787 2787
 
2788 2788
 			// additional custom fields (extensions / user defined fields)
2789 2789
 			$custom_fields = array();
2790
-			if ( isset( $_POST['custom-field'] ) ) {
2791
-				foreach ( $_POST['custom-field'] as $custom_field => $custom_value ) {
2790
+			if ( isset( $_POST[ 'custom-field' ] ) ) {
2791
+				foreach ( $_POST[ 'custom-field' ] as $custom_field => $custom_value ) {
2792 2792
 					if ( is_array( $custom_value ) ) {
2793 2793
 						$custom_fields[ $custom_field ] = array_filter( stripslashes_deep( $custom_value ) ); // array_filters to remove empty items (don't save them!)
2794 2794
 					} else {
@@ -2820,7 +2820,7 @@  discard block
 block discarded – undo
2820 2820
 			$this->form_interface->update_form( $form_id, $form_updates );
2821 2821
 
2822 2822
 			/* Custom action hook which allows users to update specific options when a form is updated - used in add ons */
2823
-			do_action( 'yikes-mailchimp-save-form', $form_id,  $custom_fields );
2823
+			do_action( 'yikes-mailchimp-save-form', $form_id, $custom_fields );
2824 2824
 
2825 2825
 			// redirect the user to the manage forms page, display confirmation
2826 2826
 			wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&id=' . $form_id . '&updated-form=true' ) ) );
@@ -2831,11 +2831,11 @@  discard block
 block discarded – undo
2831 2831
 			$email_body  = '<p>' . __( 'Greetings,', 'yikes-inc-easy-mailchimp-extender' ) . '</p>'; 
2832 2832
 
2833 2833
 			$email_body .= '<p>';
2834
-			$email_body .= 	__( 'A request has been made to update your Mailchimp account profile information.', 'yikes-inc-easy-mailchimp-extender' );
2835
-			$email_body .=	__( ' To do so please use the following link: ', 'yikes-inc-easy-mailchimp-extender' );
2836
-			$email_body .=	'[link]';
2837
-			$email_body .=		__( 'Update Mailchimp Profile Info', 'yikes-inc-easy-mailchimp-extender' );
2838
-			$email_body .= 	'[/link]';
2834
+			$email_body .= __( 'A request has been made to update your Mailchimp account profile information.', 'yikes-inc-easy-mailchimp-extender' );
2835
+			$email_body .= __( ' To do so please use the following link: ', 'yikes-inc-easy-mailchimp-extender' );
2836
+			$email_body .= '[link]';
2837
+			$email_body .= __( 'Update Mailchimp Profile Info', 'yikes-inc-easy-mailchimp-extender' );
2838
+			$email_body .= '[/link]';
2839 2839
 			$email_body .= '</p>';
2840 2840
 
2841 2841
 			$email_body .= '<p>' . __( 'If you did not request this update, please disregard this email.', 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
@@ -2851,13 +2851,13 @@  discard block
 block discarded – undo
2851 2851
 
2852 2852
 		/* Unsubscribe a given user from our list */
2853 2853
 		public function yikes_easy_mailchimp_unsubscribe_user() {
2854
-			$nonce    = $_REQUEST['nonce'];
2855
-			$list_id  = $_REQUEST['mailchimp-list'];
2856
-			$email_id = $_REQUEST['email_id'];
2854
+			$nonce    = $_REQUEST[ 'nonce' ];
2855
+			$list_id  = $_REQUEST[ 'mailchimp-list' ];
2856
+			$email_id = $_REQUEST[ 'email_id' ];
2857 2857
 
2858 2858
 			// verify our nonce
2859 2859
 			if ( ! wp_verify_nonce( $nonce, 'unsubscribe-user-' . $email_id ) ) {
2860
-				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 ) );
2860
+				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 ) );
2861 2861
 			}
2862 2862
 
2863 2863
 			$response = yikes_get_mc_api_manager()->get_list_handler()->member_unsubscribe( $list_id, $email_id );
@@ -2876,21 +2876,21 @@  discard block
 block discarded – undo
2876 2876
 
2877 2877
 		public function yikes_easy_mailchimp_create_missing_error_log() {
2878 2878
 			// grab our nonnce
2879
-			$nonce = $_REQUEST['nonce'];
2879
+			$nonce = $_REQUEST[ 'nonce' ];
2880 2880
 			// validate nonce
2881
-			if ( !wp_verify_nonce( $nonce, 'create_error_log' ) ) {
2882
-				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 ) );
2881
+			if ( ! wp_verify_nonce( $nonce, 'create_error_log' ) ) {
2882
+				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 ) );
2883 2883
 			}
2884 2884
 			// setup the path to the error log
2885 2885
 			$error_log = fopen( plugin_dir_path( __FILE__ ) . '../includes/error_log/yikes-easy-mailchimp-error-log.php', 'w' );
2886 2886
 			try {
2887 2887
 				// create the file
2888
-				fwrite( $error_log , '' );
2888
+				fwrite( $error_log, '' );
2889 2889
 				// close out
2890 2890
 				fclose( $error_log );
2891 2891
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings&error_log_created=true' ) ) );
2892 2892
 			} catch ( Exception $e ) {
2893
-				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() ) ) ) );
2893
+				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() ) ) ) );
2894 2894
 			}
2895 2895
 		}
2896 2896
 
@@ -2901,9 +2901,9 @@  discard block
 block discarded – undo
2901 2901
 		public function yikes_easy_mailchimp_clear_transient_data() {
2902 2902
 
2903 2903
 			// verify our nonce
2904
-			$nonce = $_REQUEST['nonce'];
2904
+			$nonce = $_REQUEST[ 'nonce' ];
2905 2905
 			if ( ! wp_verify_nonce( $nonce, 'clear-mc-transient-data' ) ) {
2906
-				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 ) );
2906
+				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 ) );
2907 2907
 			}
2908 2908
 
2909 2909
 			$this->delete_yikes_mailchimp_transients();
@@ -2912,10 +2912,10 @@  discard block
 block discarded – undo
2912 2912
 			$referer = wp_get_referer();
2913 2913
 			if ( $referer && ( strpos( $referer, 'yikes-inc-easy-mailchimp-settings' ) > 0 ) ) {
2914 2914
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=api-cache-settings&transient-cleared=true' ) ) );
2915
-			} elseif ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] === 'yikes-mailchimp-edit-form' && isset( $_REQUEST['id'] ) && ! empty( $_REQUEST['id'] ) ) {
2915
+			} elseif ( isset( $_REQUEST[ 'page' ] ) && $_REQUEST[ 'page' ] === 'yikes-mailchimp-edit-form' && isset( $_REQUEST[ 'id' ] ) && ! empty( $_REQUEST[ 'id' ] ) ) {
2916 2916
 
2917 2917
 				// else check if we were editing a form.
2918
-				$id = filter_var( $_REQUEST['id'], FILTER_SANITIZE_NUMBER_INT );
2918
+				$id = filter_var( $_REQUEST[ 'id' ], FILTER_SANITIZE_NUMBER_INT );
2919 2919
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&id=' . $id ) ) );
2920 2920
 			} else {
2921 2921
 				// else redirect to the manage forms page.
@@ -2959,7 +2959,7 @@  discard block
 block discarded – undo
2959 2959
 		 */
2960 2960
 		public function yikes_mailchimp_load_helper_class() {
2961 2961
 			// check to see if it's already loaded up.
2962
-			if ( !class_exists( 'Yikes_Inc_Easy_Mailchimp_Forms_Helper' ) ) {
2962
+			if ( ! class_exists( 'Yikes_Inc_Easy_Mailchimp_Forms_Helper' ) ) {
2963 2963
 				// Include our main helper class file
2964 2964
 				include_once( YIKES_MC_PATH . 'admin/partials/helpers/init.php' );
2965 2965
 			}
Please login to merge, or discard this patch.
includes/third-party-integrations/visual-composer/visual-composer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 		if ( ! empty( $all_forms ) ) {
116 116
 			// build an array to pass to our javascript
117 117
 			foreach ( $all_forms as $id => $form ) {
118
-				$lists[ $form['form_name'] ] = $id;
118
+				$lists[ $form[ 'form_name' ] ] = $id;
119 119
 			}
120 120
 		} else {
121 121
 			$lists[ __( 'Please Import Some Mailchimp Lists', 'yikes-inc-easy-mailchimp-extender' ) ] = '-';
Please login to merge, or discard this patch.
public/classes/process/class.process_form_submission_handler.php 1 patch
Spacing   +65 added lines, -65 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,12 +517,12 @@  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
-				if ( empty( $group_data['items'] ) || ! is_array( $group_data['items'] ) ) {
520
+				if ( empty( $group_data[ 'items' ] ) || ! is_array( $group_data[ 'items' ] ) ) {
521 521
 					continue;
522 522
 				}
523 523
 
524
-				foreach ( $group_data['items'] as $item ) {
525
-					$groups[ $item['id'] ] = false;
524
+				foreach ( $group_data[ 'items' ] as $item ) {
525
+					$groups[ $item[ 'id' ] ] = false;
526 526
 				}
527 527
 
528 528
 			}
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 		do_action( "yikes-mailchimp-form-submission-{$this->form_id}", $this->email, $merge_variables, $this->form_id, $notifications );
636 636
 
637 637
 		// Get the optin value
638
-		$optin = isset( $optin_settings['optin'] ) ? (int) $optin_settings['optin'] : 0;
638
+		$optin = isset( $optin_settings[ 'optin' ] ) ? (int) $optin_settings[ 'optin' ] : 0;
639 639
 
640 640
 		if ( 1 === $optin ) {
641 641
 
@@ -665,13 +665,13 @@  discard block
 block discarded – undo
665 665
 
666 666
 		// Construct our success array variables
667 667
 		$return_success_array = array(
668
-			'hide'        		=> $submission_settings['hide_form_post_signup'],
668
+			'hide'        		=> $submission_settings[ 'hide_form_post_signup' ],
669 669
 			'error'       		=> 0,
670 670
 			'response'    		=> $response_message,
671
-			'redirection' 		=> $redirect_array['redirection'],
672
-			'redirect'    		=> $redirect_array['redirect'],
673
-			'new_window' 		=> $redirect_array['new_window'],
674
-			'redirect_timer'	=> $redirect_array['redirect_timer'],
671
+			'redirection' 		=> $redirect_array[ 'redirection' ],
672
+			'redirect'    		=> $redirect_array[ 'redirect' ],
673
+			'new_window' 		=> $redirect_array[ 'new_window' ],
674
+			'redirect_timer'	=> $redirect_array[ 'redirect_timer' ],
675 675
 		);
676 676
 
677 677
 		// Return success array
@@ -693,12 +693,12 @@  discard block
 block discarded – undo
693 693
 		$details    = '';
694 694
 
695 695
 		// Loop through the error data and retrieve any fields and messages
696
-		if ( isset( $error_data['data'] ) ) {
697
-			foreach ( $error_data['data'] as $datum ) {
698
-				if ( ! isset( $datum['field'], $datum['message'] ) ) {
696
+		if ( isset( $error_data[ 'data' ] ) ) {
697
+			foreach ( $error_data[ 'data' ] as $datum ) {
698
+				if ( ! isset( $datum[ 'field' ], $datum[ 'message' ] ) ) {
699 699
 					continue;
700 700
 				}
701
-				$details .= sprintf( '<br>Error with %1$s field: <strong>%2$s</strong>', $form_fields[ $datum['field'] ]['label'], $datum['message'] );
701
+				$details .= sprintf( '<br>Error with %1$s field: <strong>%2$s</strong>', $form_fields[ $datum[ 'field' ] ][ 'label' ], $datum[ 'message' ] );
702 702
 			}
703 703
 		}
704 704
 
@@ -741,21 +741,21 @@  discard block
 block discarded – undo
741 741
 		$missing_fields = array();
742 742
 
743 743
 		// Loop through submitted form data
744
-		foreach( $data as $merge_tag => $value ) {
744
+		foreach ( $data as $merge_tag => $value ) {
745 745
 
746 746
 			// Skip interest groups
747
-			if ( isset( $form_fields[ $merge_tag ]['group_id'] ) ) {
747
+			if ( isset( $form_fields[ $merge_tag ][ 'group_id' ] ) ) {
748 748
 				continue;
749 749
 			}
750 750
 
751 751
 			// check if this field is required
752
-			if ( isset( $form_fields[ $merge_tag ] ) && isset( $form_fields[ $merge_tag ]['require'] ) && $form_fields[ $merge_tag ]['require'] === '1' ) {
752
+			if ( isset( $form_fields[ $merge_tag ] ) && isset( $form_fields[ $merge_tag ][ 'require' ] ) && $form_fields[ $merge_tag ][ 'require' ] === '1' ) {
753 753
 
754 754
 				// Check if the field(s) are empty
755 755
 				if ( is_array( $value ) ) {
756 756
 
757 757
 					// Loop through the data and check if any are empty
758
-					foreach( $value as $field => $val ) {
758
+					foreach ( $value as $field => $val ) {
759 759
 
760 760
 						/**
761 761
 						*	'yikes-mailchimp-ignore-required-array-field'
@@ -774,13 +774,13 @@  discard block
 block discarded – undo
774 774
 
775 775
 							// Set the merge label (e.g. MMERGE6) as the key so we don't get the same field multiple times
776 776
 							// (e.g. For arrays, like an address, where multiple address fields are empty)
777
-							$missing_fields[ $form_fields[ $merge_tag ]['merge'] ] = $form_fields[ $merge_tag ];
777
+							$missing_fields[ $form_fields[ $merge_tag ][ 'merge' ] ] = $form_fields[ $merge_tag ];
778 778
 						}
779 779
 					}
780 780
 
781 781
 				} else if ( empty( $value ) ) {
782 782
 					$field_is_missing = true;
783
-					$missing_fields[ $form_fields[ $merge_tag ]['merge'] ] = $form_fields[ $merge_tag ];
783
+					$missing_fields[ $form_fields[ $merge_tag ][ 'merge' ] ] = $form_fields[ $merge_tag ];
784 784
 				}
785 785
 			}
786 786
 		}
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
 		foreach ( $form_fields as $merge_tag => $field_data ) {
831 831
 
832 832
 			// If an interest group and it's required
833
-			if ( isset( $field_data['group_id'] ) && isset( $field_data['require'] ) && $field_data['require'] === '1' ) {
833
+			if ( isset( $field_data[ 'group_id' ] ) && isset( $field_data[ 'require' ] ) && $field_data[ 'require' ] === '1' ) {
834 834
 				
835 835
 				// Check if it was submitted (meaning, check if it's set in our $data array)
836 836
 				if ( ! isset( $data[ 'group-' . $merge_tag ] ) ) {
@@ -892,30 +892,30 @@  discard block
 block discarded – undo
892 892
 		}
893 893
 
894 894
 		// Construct the API URL
895
-		$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'] );
895
+		$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' ] );
896 896
 		$response      = wp_remote_get( $url );
897
-		$response_body = json_decode( $response['body'], true );
897
+		$response_body = json_decode( $response[ 'body' ], true );
898 898
 
899 899
 		// Set up errors array
900 900
 		$recaptcha_errors = array();
901 901
 
902 902
 		// if we've hit an error, lets return the error!
903
-		if ( true !== $response_body['success'] ) {
903
+		if ( true !== $response_body[ 'success' ] ) {
904 904
 
905
-			if( isset( $response_body['error-codes'] ) ) {
905
+			if ( isset( $response_body[ 'error-codes' ] ) ) {
906 906
 
907 907
 				// Loop through response error codes
908
-				foreach ( $response_body['error-codes'] as $error_code ) {
908
+				foreach ( $response_body[ 'error-codes' ] as $error_code ) {
909 909
 					if ( 'missing-input-response' === $error_code ) {
910 910
 						$error_code = $this->handle_non_filled_recaptcha_message;
911 911
 					}
912 912
 
913 913
 					// Add our error_code to the errors array
914
-					$recaptcha_errors[] = $error_code;
914
+					$recaptcha_errors[ ] = $error_code;
915 915
 				}
916 916
 
917 917
 			} else {
918
-				$recaptcha_errors[] = $this->generic_recaptcha_error_message;
918
+				$recaptcha_errors[ ] = $this->generic_recaptcha_error_message;
919 919
 			}
920 920
 
921 921
 			/**
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
 	* @param array | $fields_array | An array of fields to loop through and make sure they're not null
1024 1024
 	*/
1025 1025
 	public function handle_empty_fields_generic( $fields_array ) {
1026
-		foreach( $fields_array as $field ) {
1026
+		foreach ( $fields_array as $field ) {
1027 1027
 			if ( $field === null ) {
1028 1028
 				return $this->yikes_fail( $hide = 0, $error = 1, $this->handle_empty_fields_generic_message );
1029 1029
 			}
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
 
1090 1090
 		// Append our 'send-update-email' link and text
1091 1091
 		$response .= $link_start_tag;
1092
-		$response .= 	$this->handle_updating_existing_user_link_message;
1092
+		$response .= $this->handle_updating_existing_user_link_message;
1093 1093
 		$response .= $link_close_tag;
1094 1094
 
1095 1095
 		// Check for a user-defined message
@@ -1112,14 +1112,14 @@  discard block
 block discarded – undo
1112 1112
 	*/
1113 1113
 	protected function check_for_user_defined_response_message( $slug, $response_text, $data = false ) {
1114 1114
 
1115
-		switch( $slug ) {
1115
+		switch ( $slug ) {
1116 1116
 			case 'already-subscribed':
1117 1117
 
1118 1118
 				// Check if this error message exists
1119
-				if ( isset( $this->error_messages['already-subscribed'] ) && ! empty( $this->error_messages['already-subscribed'] ) ) {
1119
+				if ( isset( $this->error_messages[ 'already-subscribed' ] ) && ! empty( $this->error_messages[ 'already-subscribed' ] ) ) {
1120 1120
 
1121 1121
 					// Check if the substring (that we replace) '[email]' is located in the string and replace it
1122
-					$response_text = str_replace( '[email]', $this->email, $this->error_messages['already-subscribed'] );
1122
+					$response_text = str_replace( '[email]', $this->email, $this->error_messages[ 'already-subscribed' ] );
1123 1123
 				}
1124 1124
 
1125 1125
 				/**
@@ -1138,13 +1138,13 @@  discard block
 block discarded – undo
1138 1138
 			case 'update-link':
1139 1139
 
1140 1140
 				// Check if this error message exists
1141
-				if ( $data !== false && isset( $this->error_messages['update-link'] ) && ! empty( $this->error_messages['update-link'] ) ) {
1141
+				if ( $data !== false && isset( $this->error_messages[ 'update-link' ] ) && ! empty( $this->error_messages[ 'update-link' ] ) ) {
1142 1142
 
1143 1143
 					// Check if the substring (that we replace) '[link]' is located in the string and replace it
1144
-					$response_text = str_replace( '[link]', $data['link_start_tag'], $this->error_messages['update-link'] );
1144
+					$response_text = str_replace( '[link]', $data[ 'link_start_tag' ], $this->error_messages[ 'update-link' ] );
1145 1145
 
1146 1146
 					// Remove [/link]
1147
-					$response_text = str_replace( '[/link]', $data['link_close_tag'], $response_text );
1147
+					$response_text = str_replace( '[/link]', $data[ 'link_close_tag' ], $response_text );
1148 1148
 				}
1149 1149
 
1150 1150
 				/**
@@ -1163,8 +1163,8 @@  discard block
 block discarded – undo
1163 1163
 			case 'success':
1164 1164
 
1165 1165
 				// 'success' is the user-defined success message for double opt-in
1166
-				if ( isset( $this->error_messages['success'] ) && ! empty( $this->error_messages['success'] ) ) {
1167
-					$response_text = $this->error_messages['success'];
1166
+				if ( isset( $this->error_messages[ 'success' ] ) && ! empty( $this->error_messages[ 'success' ] ) ) {
1167
+					$response_text = $this->error_messages[ 'success' ];
1168 1168
 				}
1169 1169
 
1170 1170
 				/**
@@ -1183,8 +1183,8 @@  discard block
 block discarded – undo
1183 1183
 
1184 1184
 			case 'success-single-optin':
1185 1185
 
1186
-				if ( isset( $this->error_messages['success-single-optin'] ) && ! empty( $this->error_messages['success-single-optin'] ) ) {
1187
-					$response_text = $this->error_messages['success-single-optin'];
1186
+				if ( isset( $this->error_messages[ 'success-single-optin' ] ) && ! empty( $this->error_messages[ 'success-single-optin' ] ) ) {
1187
+					$response_text = $this->error_messages[ 'success-single-optin' ];
1188 1188
 				}
1189 1189
 
1190 1190
 				/**
@@ -1203,8 +1203,8 @@  discard block
 block discarded – undo
1203 1203
 
1204 1204
 			case 'success-resubscribed':
1205 1205
 
1206
-				if ( isset( $this->error_messages['success-resubscribed'] ) && ! empty( $this->error_messages['success-resubscribed'] ) ) {
1207
-					$response_text = $this->error_messages['success-resubscribed'];
1206
+				if ( isset( $this->error_messages[ 'success-resubscribed' ] ) && ! empty( $this->error_messages[ 'success-resubscribed' ] ) ) {
1207
+					$response_text = $this->error_messages[ 'success-resubscribed' ];
1208 1208
 				}
1209 1209
 
1210 1210
 				/**
@@ -1226,8 +1226,8 @@  discard block
 block discarded – undo
1226 1226
 				$original_response_text     = $response_text;
1227 1227
 				$user_defined_response_text = '';
1228 1228
 
1229
-				if ( isset( $this->error_messages['general-error'] ) && ! empty( $this->error_messages['general-error'] ) ) {
1230
-					$user_defined_response_text = $this->error_messages['general-error'];
1229
+				if ( isset( $this->error_messages[ 'general-error' ] ) && ! empty( $this->error_messages[ 'general-error' ] ) ) {
1230
+					$user_defined_response_text = $this->error_messages[ 'general-error' ];
1231 1231
 				}
1232 1232
 
1233 1233
 				/**
@@ -1289,7 +1289,7 @@  discard block
 block discarded – undo
1289 1289
 		} else {
1290 1290
 			global $process_submission_response;
1291 1291
 
1292
-			$process_submission_response = isset( $success_array['response'] ) ? $success_array['response'] : ''; // DEFAULT SUCCESS?
1292
+			$process_submission_response = isset( $success_array[ 'response' ] ) ? $success_array[ 'response' ] : ''; // DEFAULT SUCCESS?
1293 1293
 			$process_submission_response = $this->wrap_form_submission_response( $process_submission_response, $is_success = true );
1294 1294
 		}
1295 1295
 	}
@@ -1342,8 +1342,8 @@  discard block
 block discarded – undo
1342 1342
 		// Add additional fields we've been supplied
1343 1343
 		if ( ! empty( $additional_fields ) ) {
1344 1344
 
1345
-			foreach( $additional_fields as $key => $value ) {
1346
-				$response_array[$key] = $value;
1345
+			foreach ( $additional_fields as $key => $value ) {
1346
+				$response_array[ $key ] = $value;
1347 1347
 			}
1348 1348
 		}
1349 1349
 
@@ -1374,20 +1374,20 @@  discard block
 block discarded – undo
1374 1374
 		);
1375 1375
 
1376 1376
 		// Let's confirm we have a value before trying to use it
1377
-		$redirect_setting = isset( $submission_settings['redirect_on_submission'] ) ? $submission_settings['redirect_on_submission'] : false;
1377
+		$redirect_setting = isset( $submission_settings[ 'redirect_on_submission' ] ) ? $submission_settings[ 'redirect_on_submission' ] : false;
1378 1378
 
1379 1379
 		// Check the redirect flag
1380 1380
 		if ( '1' === $redirect_setting ) {
1381 1381
 
1382 1382
 			// Supply return array with default value of 1
1383
-			$redirect_array['redirection']	= apply_filters( 'yikes-mailchimp-redirection', 1, $form_id, $page_data );
1383
+			$redirect_array[ 'redirection' ] = apply_filters( 'yikes-mailchimp-redirection', 1, $form_id, $page_data );
1384 1384
 
1385 1385
 			// Let's confirm we have redirect_page/custom_redirect_url/new_window values
1386
-			$redirect_page_setting	 = isset( $submission_settings['redirect_page'] ) ? $submission_settings['redirect_page'] : false;
1387
-			$custom_redirect_setting = isset( $submission_settings['custom_redirect_url'] ) ? $submission_settings['custom_redirect_url'] : false;
1388
-			$redirect_new_window	 = isset( $submission_settings['redirect_new_window'] ) ? $submission_settings['redirect_new_window'] : false;
1386
+			$redirect_page_setting = isset( $submission_settings[ 'redirect_page' ] ) ? $submission_settings[ 'redirect_page' ] : false;
1387
+			$custom_redirect_setting = isset( $submission_settings[ 'custom_redirect_url' ] ) ? $submission_settings[ 'custom_redirect_url' ] : false;
1388
+			$redirect_new_window = isset( $submission_settings[ 'redirect_new_window' ] ) ? $submission_settings[ 'redirect_new_window' ] : false;
1389 1389
 
1390
-			$redirect_array['new_window'] = apply_filters( 'yikes-mailchimp-redirect-new-window', $redirect_new_window, $form_id, $page_data );
1390
+			$redirect_array[ 'new_window' ] = apply_filters( 'yikes-mailchimp-redirect-new-window', $redirect_new_window, $form_id, $page_data );
1391 1391
 
1392 1392
 			// Check if we're redirecting to a custom_url or just the redirect_page
1393 1393
 			$redirect_url = 'custom_url' !== $redirect_page_setting ? get_permalink( $redirect_page_setting ) : $custom_redirect_setting;
@@ -1412,9 +1412,9 @@  discard block
 block discarded – undo
1412 1412
 			*/
1413 1413
 			$redirect_timer = apply_filters( 'yikes-mailchimp-redirect-timer', $default_redirect_time_ms, $form_id, $page_data );
1414 1414
 
1415
-			$redirect_array['redirect_timer'] = $redirect_timer;
1415
+			$redirect_array[ 'redirect_timer' ] = $redirect_timer;
1416 1416
 
1417
-			$redirect_array['redirect'] = $redirect_url;
1417
+			$redirect_array[ 'redirect' ] = $redirect_url;
1418 1418
 		}
1419 1419
 
1420 1420
 		return $redirect_array;
@@ -1423,7 +1423,7 @@  discard block
 block discarded – undo
1423 1423
 	public function maybe_add_tags( $form_data, $subscriber_data ) {
1424 1424
 
1425 1425
 		// Add the form's tags
1426
-		$form_tags = isset( $form_data['tags'] ) ? $form_data['tags'] : array();
1426
+		$form_tags = isset( $form_data[ 'tags' ] ) ? $form_data[ 'tags' ] : array();
1427 1427
 		$form_tags = apply_filters( 'yikes_mailchimp_subscriber_tags', $form_tags, $form_data, $this->list_id, $subscriber_data );
1428 1428
 
1429 1429
 		if ( ! empty( $form_tags ) ) {
@@ -1432,7 +1432,7 @@  discard block
 block discarded – undo
1432 1432
 				$add_tag = apply_filters( 'yikes_mailchimp_subscriber_tag_active', true, $tag, $this->list_id, $subscriber_data );
1433 1433
 
1434 1434
 				if ( $add_tag ) {
1435
-					$list_handler->create_member_tags( $this->list_id, $tag['id'], array( 'email_address' => $this->email ) );
1435
+					$list_handler->create_member_tags( $this->list_id, $tag[ 'id' ], array( 'email_address' => $this->email ) );
1436 1436
 				}
1437 1437
 			}
1438 1438
 		}
Please login to merge, or discard this patch.