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