Completed
Pull Request — master (#811)
by
unknown
09:59 queued 07:34
created
admin/partials/menu/options-sections/general-settings.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 $yikes_mc_api_constant = defined( 'YIKES_MC_API_KEY' );
9 9
 ?>
10 10
 
11
-<h3><span><?php _e( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span><?php echo $api_connection; ?></h3>
11
+<h3><span><?php _e( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span><?php echo $api_connection; ?></h3>
12 12
 <div class="inside">
13 13
 
14 14
 	<!-- Settings Form -->
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 		<!-- MailChimp API Input Field -->
22 22
 		<label for="yks-mailchimp-api-key">
23 23
 
24
-			<p><?php _e( 'Enter your API key in the field below to connect your site to your Mailchimp account.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
24
+			<p><?php _e( 'Enter your API key in the field below to connect your site to your Mailchimp account.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
25 25
 
26
-			<p><strong><?php _e( 'Mailchimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
26
+			<p><strong><?php _e( 'Mailchimp API Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
27 27
 
28
-			<input autocomplete="off" <?php if ( $yikes_mc_api_constant ) { echo 'readonly="readonly"'; } if( strlen( yikes_get_mc_api_key() ) > 0 ) { ?> type="password" <?php } else { ?> type="text" <?php } ?> value="<?php echo yikes_get_mc_api_key(); ?>" placeholder="<?php _e( 'Mailchimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?>" name="yikes-mc-api-key" id="yikes-mc-api-key" class="settings-page-input" />
28
+			<input autocomplete="off" <?php if ( $yikes_mc_api_constant ) { echo 'readonly="readonly"'; } if ( strlen( yikes_get_mc_api_key() ) > 0 ) { ?> type="password" <?php } else { ?> type="text" <?php } ?> value="<?php echo yikes_get_mc_api_key(); ?>" placeholder="<?php _e( 'Mailchimp API Key', 'yikes-inc-easy-mailchimp-extender' ); ?>" name="yikes-mc-api-key" id="yikes-mc-api-key" class="settings-page-input" />
29 29
 
30 30
 			<?php if ( $yikes_mc_api_constant ) { ?>
31 31
 				<p class="description"><?php printf( __( "Your Mailchimp API key has been defined using the %s constant, in a PHP file.", "yikes-inc-easy-mailchimp-extender" ), '<code>YIKES_MC_API_KEY</code>' ); ?></p>
@@ -34,21 +34,21 @@  discard block
 block discarded – undo
34 34
 			<?php echo $api_error_response; ?>
35 35
 
36 36
 			<?php if ( ! $yikes_mc_api_constant ) { ?>
37
-				<p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
37
+				<p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here', 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
38 38
 			<?php } ?>
39 39
 
40 40
 			<p class="description">Warning: changing your API key will break your current forms.</p>
41 41
 		</label>
42 42
 
43 43
 		<!-- Use Nonce Validation Field -->		
44
-		<p><strong><?php _e( 'Enable nonce validation on this site?' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
44
+		<p><strong><?php _e( 'Enable nonce validation on this site?', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
45 45
 		<label for="yikes-mailchimp-use-nonce-yes">
46 46
 			Yes
47
-			<input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-yes" class="settings-page-input" value="1" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ) , '1' ); ?> />
47
+			<input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-yes" class="settings-page-input" value="1" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ), '1' ); ?> />
48 48
 		</label>
49 49
 		<label for="yikes-mailchimp-use-nonce-no">
50 50
 			No
51
-			<input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-no" class="settings-page-input" value="0" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ) , '0' ); ?> />
51
+			<input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-no" class="settings-page-input" value="0" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ), '0' ); ?> />
52 52
 		</label>
53 53
 
54 54
 	<?php submit_button(); ?>
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/import-export-forms.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -3,15 +3,15 @@  discard block
 block discarded – undo
3 3
 $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
4 4
 $all_forms = $form_interface->get_all_forms();
5 5
 ?>
6
-<h3><span><?php _e( 'Import/Export Forms & Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
6
+<h3><span><?php _e( 'Import/Export Forms & Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7 7
 
8 8
 <div class="inside">
9 9
 
10 10
 	<!-- Export Form -->
11
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-forms' , 'nonce' => wp_create_nonce( 'export-forms' ) ) ) ); ?>" method="post">
12
-		<p><strong><?php _e( "Export Forms" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
11
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-forms', 'nonce' => wp_create_nonce( 'export-forms' ) ) ) ); ?>" method="post">
12
+		<p><strong><?php _e( "Export Forms", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
13 13
 		<p class="description">
14
-			<?php _e( "Select the forms you would like to export. When you click the download button below, Easy Forms for Mailchimp will create a CSV file for you to save to your computer. Once you've saved the download file, you can use the Import tool to import the forms to this or any other site." , "yikes-inc-easy-mailchimp-extender" ); ?>
14
+			<?php _e( "Select the forms you would like to export. When you click the download button below, Easy Forms for Mailchimp will create a CSV file for you to save to your computer. Once you've saved the download file, you can use the Import tool to import the forms to this or any other site.", "yikes-inc-easy-mailchimp-extender" ); ?>
15 15
 		</p>
16 16
 
17 17
 		<?php if ( empty( $all_forms ) ) { ?>
@@ -20,44 +20,44 @@  discard block
 block discarded – undo
20 20
 			</p>
21 21
 		<?php } else { ?>
22 22
 			<!-- custom list so users can export specific forms -->
23
-			<a class="toggle-custom-lists button-secondary" onclick="jQuery(this).next().slideToggle();return false;"><?php _e( 'Select Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
23
+			<a class="toggle-custom-lists button-secondary" onclick="jQuery(this).next().slideToggle();return false;"><?php _e( 'Select Forms', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
24 24
 			<ul class="export-custom-forms-list">
25
-				<p class="description"><?php _e( 'Select which forms to export. Leave all checkboxes unchecked to export all of your forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
26
-				<?php foreach( $all_forms as $id => $form ) { ?>
27
-					<li><label><input type="checkbox" name="yikes_export_forms[]" value="<?php echo (int) $id; ?>"><?php echo esc_html( $form['form_name'] ); ?></label></li>
25
+				<p class="description"><?php _e( 'Select which forms to export. Leave all checkboxes unchecked to export all of your forms.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
26
+				<?php foreach ( $all_forms as $id => $form ) { ?>
27
+					<li><label><input type="checkbox" name="yikes_export_forms[]" value="<?php echo (int) $id; ?>"><?php echo esc_html( $form[ 'form_name' ] ); ?></label></li>
28 28
 				<?php } ?>
29 29
 			</ul>
30 30
 		<?php } ?>
31 31
 		<!-- check if any of our transients contain data -->
32
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Opt-in Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
32
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Opt-in Forms', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
33 33
 	</form>
34 34
 	
35 35
 	<hr />
36 36
 	
37 37
 	<!-- Export Form -->
38
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-settings' , 'nonce' => wp_create_nonce( 'export-settings' ) ) ) ); ?>" method="post">
39
-		<p><strong><?php _e( "Export Settings" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
38
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-settings', 'nonce' => wp_create_nonce( 'export-settings' ) ) ) ); ?>" method="post">
39
+		<p><strong><?php _e( "Export Settings", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
40 40
 		<p class="description">
41
-			<?php _e( "Export YIKES Easy Forms for Mailchimp plugin settings." , 'yikes-inc-easy-mailchimp-extender' ); ?>
41
+			<?php _e( "Export YIKES Easy Forms for Mailchimp plugin settings.", 'yikes-inc-easy-mailchimp-extender' ); ?>
42 42
 		</p>
43 43
 
44 44
 		<!-- check if any of our transients contain data -->
45
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Plugin Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
45
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Plugin Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
46 46
 	</form>
47 47
 	
48 48
 	<hr />
49 49
 	
50 50
 	<!-- Import Form -->
51
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-import-forms' , 'nonce' => wp_create_nonce( 'import-forms' ) ) ) ); ?>" method="post" enctype="multipart/form-data">
52
-		<p><strong><?php _e( "Import" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
51
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-import-forms', 'nonce' => wp_create_nonce( 'import-forms' ) ) ) ); ?>" method="post" enctype="multipart/form-data">
52
+		<p><strong><?php _e( "Import", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
53 53
 		<p class="description">
54
-			<?php _e( "Select the Easy Forms for Mailchimp export file you would like to import. You can use this field to import your opt-in forms or settings. " , 'yikes-inc-easy-mailchimp-extender' ); ?>
54
+			<?php _e( "Select the Easy Forms for Mailchimp export file you would like to import. You can use this field to import your opt-in forms or settings. ", 'yikes-inc-easy-mailchimp-extender' ); ?>
55 55
 		</p>
56 56
 		<label>
57 57
 			<input type="file" name="csv" id="forms_to_import">
58 58
 		</label>
59 59
 		<!-- check if any of our transients contain data -->
60
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Import' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
60
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Import', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
61 61
 	</form>
62 62
 	
63 63
 </div> <!-- .inside -->
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/debug-settings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 	- php version, wp version, plugin version and debug log
5 5
 -->
6 6
 
7
-<h3><span><?php _e( 'Debug Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7
+<h3><span><?php _e( 'Debug Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
8 8
 
9 9
 <div class="inside">
10 10
 	
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 	
14 14
 		<?php settings_fields( 'yikes_inc_easy_mc_debug_settings_page' ); ?>
15 15
 	
16
-		<label for="yikes-mailchimp-debug-status"><strong><?php _e( 'Enable Debugging' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
17
-			<input type="checkbox" name="yikes-mailchimp-debug-status" id="yikes-mailchimp-debug-status" value="1" <?php checked( get_option( 'yikes-mailchimp-debug-status' , '' ) , '1' ); ?>>
16
+		<label for="yikes-mailchimp-debug-status"><strong><?php _e( 'Enable Debugging', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
17
+			<input type="checkbox" name="yikes-mailchimp-debug-status" id="yikes-mailchimp-debug-status" value="1" <?php checked( get_option( 'yikes-mailchimp-debug-status', '' ), '1' ); ?>>
18 18
 		</label>
19
-		<p class="description"><?php _e( "If you encounter an issue with Easy Forms for Mailchimp you can toggle on debugging to display advanced error messages and start logging errors." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
19
+		<p class="description"><?php _e( "If you encounter an issue with Easy Forms for Mailchimp you can toggle on debugging to display advanced error messages and start logging errors.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20 20
 		
21 21
 		<?php submit_button(); ?>
22 22
 									
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 				)
36 36
 			);
37 37
 		?>
38
-		<h2><?php _e( "Debug Log" , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="<?php echo $url; ?>" class="button-secondary"><?php _e( 'Clear Log', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h2>
38
+		<h2><?php _e( "Debug Log", 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="<?php echo $url; ?>" class="button-secondary"><?php _e( 'Clear Log', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h2>
39 39
 		
40 40
 		<table class="widefat" id="yikes-mailchimp-error-log">
41 41
 			<!-- table header -->
Please login to merge, or discard this patch.
admin/partials/menu/support.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,21 +9,21 @@
 block discarded – undo
9 9
 <div class="wrap yikes-easy-mc-support-wrap"> 
10 10
 
11 11
 	<!-- Freddie Logo -->
12
-	<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" />
12
+	<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" />
13 13
 
14
-	<h1>Easy Forms for Mailchimp | <?php _e( 'Support' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
14
+	<h1>Easy Forms for Mailchimp | <?php _e( 'Support', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
15 15
 		<!-- Support Page Description -->
16
-	<p class="yikes-easy-mc-about-text about-text"><?php _e( 'If you have questions, we have answers!' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
16
+	<p class="yikes-easy-mc-about-text about-text"><?php _e( 'If you have questions, we have answers!', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
17 17
 
18
-	<?php if( get_option( 'yikes-easy-mc-active-addons' , array() ) == array() ) { ?>
19
-		<p><?php _e( 'Users of the free version of Easy Forms for Mailchimp can post questions to our support forum on the WordPress Plugin Directory. We aim to respond to support requests for the free version of the plugin within a week.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
-		<p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support. <a href="%s" target="_blank" title="' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!' , 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p>
18
+	<?php if ( get_option( 'yikes-easy-mc-active-addons', array() ) == array() ) { ?>
19
+		<p><?php _e( 'Users of the free version of Easy Forms for Mailchimp can post questions to our support forum on the WordPress Plugin Directory. We aim to respond to support requests for the free version of the plugin within a week.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
+		<p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support. <a href="%s" target="_blank" title="' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!', 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p>
21 21
 	<?php } else { ?>
22
-		<p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
23
-		<p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:[email protected]'>[email protected]</a> and a ticket will be created." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
22
+		<p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
23
+		<p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:[email protected]'>[email protected]</a> and a ticket will be created.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
24 24
 	<?php } ?>
25 25
 
26
-		<p><?php printf( __( 'Before submitting a support request, please visit our %s.' , 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help' ); ?></p>
26
+		<p><?php printf( __( 'Before submitting a support request, please visit our %s.', 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help' ); ?></p>
27 27
 
28 28
 	<hr />
29 29
 	
Please login to merge, or discard this patch.
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/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.