Completed
Push — staging ( 57798f...9e32c1 )
by Evan
20:30
created
admin/partials/helpers/fields/yikes-mailchimp-checkbox-field.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
 *	For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6 6
 * 	@since 6.0
7 7
 */
8
-$field_data = $form_data['custom_fields'];
8
+$field_data = $form_data[ 'custom_fields' ];
9 9
 ?>
10 10
 <label class="custom-field-section">
11
-	<strong><?php echo $field['label']; ?></strong>
12
-	<input type="checkbox" class="widefat" name="custom-field[<?php echo $field['id']; ?>]" id="custom-field" value="1" <?php checked( isset( $field_data[$field['id']] ) ? $field_data[$field['id']] : 0, 1, true ); ?>>
13
-	<?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
14
-	<p class="description"><?php echo $field['description']; ?></p>
11
+	<strong><?php echo $field[ 'label' ]; ?></strong>
12
+	<input type="checkbox" class="widefat" name="custom-field[<?php echo $field[ 'id' ]; ?>]" id="custom-field" value="1" <?php checked( isset( $field_data[ $field[ 'id' ] ] ) ? $field_data[ $field[ 'id' ] ] : 0, 1, true ); ?>>
13
+	<?php if ( isset( $field[ 'description' ] ) && $field[ 'description' ] != '' ) { ?>
14
+	<p class="description"><?php echo $field[ 'description' ]; ?></p>
15 15
 	<?php } ?>
16 16
 </label>
Please login to merge, or discard this patch.
admin/partials/edit-form.php 1 patch
Spacing   +201 added lines, -201 removed lines patch added patch discarded remove patch
@@ -2,23 +2,23 @@  discard block
 block discarded – undo
2 2
 	<?php
3 3
 
4 4
 	// if an error was returned in the most recent query
5
-	if( isset( $_GET['sql_error'] ) ) {
5
+	if ( isset( $_GET[ 'sql_error' ] ) ) {
6 6
 		// if error logging is turned on, lets display a better error to help narrow things down
7 7
 		// lets also log things to the error log
8
-		if( get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
9
-			wp_die( '<strong>' . __( 'Error Creating Form' , 'yikes-inc-easy-mailchimp-extender' ) . '</strong> <p>' . stripslashes( urldecode( $_GET['sql_error'] ) ) . '</p>' , __( 'Error Creating Form' , 'yikes-inc-easy-mailchimp-extender' ) );
8
+		if ( get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
9
+			wp_die( '<strong>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) . '</strong> <p>' . stripslashes( urldecode( $_GET[ 'sql_error' ] ) ) . '</p>', __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) );
10 10
 		} else {
11
-			wp_die( '<strong>' . __( 'Error Creating Form' , 'yikes-inc-easy-mailchimp-extender' ) . '</strong><p>' . __( "Please try again. If the error persists please get in contact with the YIKES Inc. support team." , 'yikes-inc-easy-mailchimp-extender' ) . '</p>' );
11
+			wp_die( '<strong>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) . '</strong><p>' . __( "Please try again. If the error persists please get in contact with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>' );
12 12
 		}
13 13
 	}
14 14
 
15 15
 	/* Get The Form ID we need to edit */
16
-	if ( ! isset( $_GET['id'] ) ) {
16
+	if ( ! isset( $_GET[ 'id' ] ) ) {
17 17
 		wp_die( __( 'Oh No!', 'yikes-inc-easy-mailchimp-extender' ), __( 'Error', 'yikes-inc-easy-mailchimp-extender' ) );
18 18
 	}
19 19
 
20 20
 	// grab and store the form ID
21
-	$form_id = (int) $_GET['id'];
21
+	$form_id = (int) $_GET[ 'id' ];
22 22
 
23 23
 	// Get our form interface.
24 24
 	$form_interface = yikes_easy_mailchimp_extender_get_form_interface();
@@ -31,19 +31,19 @@  discard block
 block discarded – undo
31 31
 
32 32
 	// if the form was not found return an error
33 33
 	if ( empty( $form ) ) {
34
-		wp_die( printf( __( "Whoops! It looks like this form doesn't exist. If this error persists you may want to toggle on debugging on the <a href='%s'>%s</a> " , 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings' ) ), __( 'debug settings page' , 'yikes-inc-easy-mailchimp-extender' ) ), __( 'Error' , 'yikes-inc-easy-mailchimp-extender' ) );
34
+		wp_die( printf( __( "Whoops! It looks like this form doesn't exist. If this error persists you may want to toggle on debugging on the <a href='%s'>%s</a> ", 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings' ) ), __( 'debug settings page', 'yikes-inc-easy-mailchimp-extender' ) ), __( 'Error', 'yikes-inc-easy-mailchimp-extender' ) );
35 35
 	}
36 36
 
37 37
 	// set global form data, mainly for use in custom form field declarations
38
-	$GLOBALS["form_data"] = $form;
38
+	$GLOBALS[ "form_data" ] = $form;
39 39
 
40
-	$custom_styles       = $form['custom_styles'];
41
-	$optin_settings      = $form['optin_settings'];
42
-	$submission_settings = $form['submission_settings'];
43
-	$error_messages      = $form['error_messages'];
40
+	$custom_styles       = $form[ 'custom_styles' ];
41
+	$optin_settings      = $form[ 'optin_settings' ];
42
+	$submission_settings = $form[ 'submission_settings' ];
43
+	$error_messages      = $form[ 'error_messages' ];
44 44
 
45
-	if ( isset( $form['form_settings'] ) ) {
46
-		$form_settings = $form['form_settings'];
45
+	if ( isset( $form[ 'form_settings' ] ) ) {
46
+		$form_settings = $form[ 'form_settings' ];
47 47
 	}
48 48
 
49 49
 	// get defaults if none are saved in the database yet
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
 	// Check for a transient, if not - set one up for one hour
77 77
 	if ( false === ( $list_data = get_transient( 'yikes-easy-mailchimp-list-data' ) ) ) {
78
-		if( $dash_position !== false ) {
78
+		if ( $dash_position !== false ) {
79 79
 			$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/list.json';
80 80
 		}
81 81
 		$list_data = wp_remote_post( $api_endpoint, array(
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
 			'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
88 88
 		) );
89 89
 		$list_data = json_decode( wp_remote_retrieve_body( $list_data ), true );
90
-		if( isset( $list_data['error'] ) ) {
91
-			if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
90
+		if ( isset( $list_data[ 'error' ] ) ) {
91
+			if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
92 92
 				$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
93
-				$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data['error'], __( "Get Account Lists" , 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
93
+				$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data[ 'error' ], __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
94 94
 			}
95 95
 		} else {
96 96
 			// set our transient
@@ -99,43 +99,43 @@  discard block
 block discarded – undo
99 99
 	}
100 100
 
101 101
 	// get the list data
102
-	if( $dash_position !== false ) {
102
+	if ( $dash_position !== false ) {
103 103
 		$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/merge-vars.json';
104 104
 	}
105 105
 	$available_merge_variables = wp_remote_post( $api_endpoint, array(
106 106
 		'body' => array(
107 107
 			'apikey' => $api_key,
108
-			'id' => array( $form['list_id'] ),
108
+			'id' => array( $form[ 'list_id' ] ),
109 109
 		),
110 110
 		'timeout' => 10,
111 111
 		'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
112 112
 	) );
113 113
 	$available_merge_variables = json_decode( wp_remote_retrieve_body( $available_merge_variables ), true );
114
-	if( isset( $available_merge_variables['error'] ) ) {
115
-		if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
114
+	if ( isset( $available_merge_variables[ 'error' ] ) ) {
115
+		if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
116 116
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
117
-			$error_logging->yikes_easy_mailchimp_write_to_error_log( $available_merge_variables['error'], __( "Get Merge Variables" , 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
117
+			$error_logging->yikes_easy_mailchimp_write_to_error_log( $available_merge_variables[ 'error' ], __( "Get Merge Variables", 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
118 118
 		}
119 119
 	}
120 120
 
121 121
 	// get the interest group data
122
-	if( $dash_position !== false ) {
122
+	if ( $dash_position !== false ) {
123 123
 		$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/interest-groupings.json';
124 124
 	}
125 125
 	$interest_groupings = wp_remote_post( $api_endpoint, array(
126 126
 		'body' => array(
127 127
 			'apikey' => $api_key,
128
-			'id' => $form['list_id']
128
+			'id' => $form[ 'list_id' ]
129 129
 		),
130 130
 		'timeout' => 10,
131 131
 		'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
132 132
 	) );
133 133
 	$interest_groupings = json_decode( wp_remote_retrieve_body( $interest_groupings ), true );
134
-	$no_interest_groupings = '<p class="description error-descripion">' . __( 'No Interest Groups Found' , 'yikes-inc-easy-mailchimp-extender' ) . '.</p>';
135
-	if( isset( $interest_groupings['error'] ) ) {
136
-		if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
134
+	$no_interest_groupings = '<p class="description error-descripion">' . __( 'No Interest Groups Found', 'yikes-inc-easy-mailchimp-extender' ) . '.</p>';
135
+	if ( isset( $interest_groupings[ 'error' ] ) ) {
136
+		if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
137 137
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
138
-			$error_logging->yikes_easy_mailchimp_write_to_error_log( $interest_groupings['error'], __( "Get Interest Groups" , 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
138
+			$error_logging->yikes_easy_mailchimp_write_to_error_log( $interest_groupings[ 'error' ], __( "Get Interest Groups", 'yikes-inc-easy-mailchimp-extender' ), "Edit Form Page" );
139 139
 		}
140 140
 	}
141 141
 
@@ -145,22 +145,22 @@  discard block
 block discarded – undo
145 145
 		add_query_arg(
146 146
 			array(
147 147
 				'action' => 'yikes-easy-mc-update-form',
148
-				'nonce' => wp_create_nonce( 'update-mailchimp-form'.-$form['id'] )
148
+				'nonce' => wp_create_nonce( 'update-mailchimp-form' . -$form[ 'id' ] )
149 149
 			)
150 150
 		)
151 151
 	);
152 152
 	/* Display Our Form */
153 153
 	?>
154 154
 	<!-- Freddie Logo -->
155
-	<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" />
155
+	<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" />
156 156
 
157
-	<h1>YIKES Easy Forms for MailChimp | <?php echo __( 'Edit' , 'yikes-inc-easy-mailchimp-extender' ) . ' ' . $form['form_name']; ?></h1>
157
+	<h1>YIKES Easy Forms for MailChimp | <?php echo __( 'Edit', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . $form[ 'form_name' ]; ?></h1>
158 158
 
159 159
 	<!-- Settings Page Description -->
160
-	<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>
160
+	<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>
161 161
 
162 162
 	<?php
163
-	if ( isset( $_REQUEST['updated-form'] ) && $_REQUEST['updated-form'] == 'true' ) {
163
+	if ( isset( $_REQUEST[ 'updated-form' ] ) && $_REQUEST[ 'updated-form' ] == 'true' ) {
164 164
 		?>
165 165
 		<div class="updated manage-form-admin-notice">
166 166
 			<p><?php _e( 'Opt-in form successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -184,15 +184,15 @@  discard block
 block discarded – undo
184 184
 						<div class="inside">
185 185
 
186 186
 							<label for="form-name">
187
-								<h3 class="bg-transparent"><?php _e( 'Form Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
188
-								<input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo stripslashes( esc_html( $form['form_name'] ) ); ?>" class="widefat" />
189
-								<p class="description"><?php _e( "The title of this signup form." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
187
+								<h3 class="bg-transparent"><?php _e( 'Form Name', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
188
+								<input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo stripslashes( esc_html( $form[ 'form_name' ] ) ); ?>" class="widefat" />
189
+								<p class="description"><?php _e( "The title of this signup form.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
190 190
 							</label>
191 191
 
192 192
 							<label for="form-description">
193
-								<h3 class="bg-transparent"><?php _e( 'Form Description' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
194
-								<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>
195
-								<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>
193
+								<h3 class="bg-transparent"><?php _e( 'Form Description', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
194
+								<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>
195
+								<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>
196 196
 								<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>
197 197
 							</label>
198 198
 
@@ -208,16 +208,16 @@  discard block
 block discarded – undo
208 208
 
209 209
 						<ul id="yikes_easy_mc_toolbar_links">
210 210
 							<li class="hidden_setting_list">
211
-								<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>
211
+								<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>
212 212
 								<div class="selected_setting_triangle"></div>
213 213
 							</li>
214 214
 							<li class="hidden_setting_list">
215
-								<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>
215
+								<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>
216 216
 							</li>
217 217
 							<li class="hidden_setting_list">
218
-								<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>
218
+								<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>
219 219
 							</li>
220
-							<?php do_action( 'yikes-mailchimp-edit-form-section-links' , $form ); ?>
220
+							<?php do_action( 'yikes-mailchimp-edit-form-section-links', $form ); ?>
221 221
 						</ul>
222 222
 
223 223
 					</div>
@@ -238,22 +238,22 @@  discard block
 block discarded – undo
238 238
 											<div class="meta-box-sortables ui-sortable">
239 239
 												<div class="postbox yikes-easy-mc-postbox">
240 240
 													<!-- container title -->
241
-													<h3 class="edit-form-title"><?php _e( 'Form Builder' , 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
242
-													<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>
241
+													<h3 class="edit-form-title"><?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
242
+													<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>
243 243
 													<div id="form-builder-container" class="inside">
244 244
 														<!-- #poststuff -->
245
-														<?php echo $this->generate_form_editor( $form['fields'], $form['list_id'] , $available_merge_variables , isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
245
+														<?php echo $this->generate_form_editor( $form[ 'fields' ], $form[ 'list_id' ], $available_merge_variables, isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
246 246
 													</div>
247 247
 
248 248
 													<!-- Bulk Delete Form Fields -->
249
-													<a href="#" class="clear-form-fields" <?php if( isset( $form['fields'] ) && count( $form['fields'] ) <= 0 ) { ?> style="display:none;" <?php } ?>><?php _e( 'Clear Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
249
+													<a href="#" class="clear-form-fields" <?php if ( isset( $form[ 'fields' ] ) && count( $form[ 'fields' ] ) <= 0 ) { ?> style="display:none;" <?php } ?>><?php _e( 'Clear Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
250 250
 
251 251
 													<?php
252
-														$display_none = ( isset( $form['fields'] ) && count( $form['fields'] ) <= 0 ) ? 'display:none;' : '';
252
+														$display_none = ( isset( $form[ 'fields' ] ) && count( $form[ 'fields' ] ) <= 0 ) ? 'display:none;' : '';
253 253
 													?>
254 254
 
255 255
 													<!-- Save Fields Button -->
256
-													<?php echo submit_button( __( 'Update Form' ) , 'primary' , '' , false , array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;'.$display_none ) ); ?>
256
+													<?php echo submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;' . $display_none ) ); ?>
257 257
 
258 258
 													<!-- .inside -->
259 259
 												</div>
@@ -266,15 +266,15 @@  discard block
 block discarded – undo
266 266
 										<div id="postbox-container-1" class="postbox-container">
267 267
 											<div class="meta-box-sortables">
268 268
 												<div class="postbox yikes-easy-mc-postbox">
269
-													<h3 class="edit-form-title"><span><?php _e( "Form Fields &amp; Interest Groups" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
269
+													<h3 class="edit-form-title"><span><?php _e( "Form Fields &amp; Interest Groups", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
270 270
 													<div class="inside">
271 271
 
272 272
 														<h3 class="nav-tab-wrapper mv_ig_list">
273
-															<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>
274
-															<?php if( !isset( $merge_variable_error ) ) { ?>
275
-																<a href="#" class="nav-tab"><?php _e( 'Interest Groups' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
273
+															<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>
274
+															<?php if ( ! isset( $merge_variable_error ) ) { ?>
275
+																<a href="#" class="nav-tab"><?php _e( 'Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
276 276
 															<?php } else { ?>
277
-																<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>
277
+																<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>
278 278
 															<?php } ?>
279 279
 														</h3>
280 280
 
@@ -282,11 +282,11 @@  discard block
 block discarded – undo
282 282
 
283 283
 															<div id="merge-variables-container" class="list-container">
284 284
 																<?php
285
-																	if( ! isset( $merge_variable_error ) ) {
285
+																	if ( ! isset( $merge_variable_error ) ) {
286 286
 																		// build a list of available merge variables,
287 287
 																		// but exclude the ones already assigned to the form
288
-																		echo '<p class="description">' . __( "Select the fields below to add to the form builder." , 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
289
-																		$this->build_available_merge_vars( $form['fields'] , $available_merge_variables );
288
+																		echo '<p class="description">' . __( "Select the fields below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
289
+																		$this->build_available_merge_vars( $form[ 'fields' ], $available_merge_variables );
290 290
 																	} else {
291 291
 																		echo $merge_variable_error;
292 292
 																	}
@@ -295,14 +295,14 @@  discard block
 block discarded – undo
295 295
 
296 296
 															<div id="interest-groups-container" class="list-container">
297 297
 																<?php
298
-																	if( isset( $interest_groupings ) && ! isset( $interest_groupings['error'] ) ) {
298
+																	if ( isset( $interest_groupings ) && ! isset( $interest_groupings[ 'error' ] ) ) {
299 299
 																		// build a list of available merge variables,
300 300
 																		// but exclude the ones already assigned to the form
301
-																		echo '<p class="description">' . __( "Select an interest group below to add to the form builder." , 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
301
+																		echo '<p class="description">' . __( "Select an interest group below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
302 302
 																		// $this->build_available_merge_vars( $form['fields'] , $available_merge_variables );
303
-																		$this->build_available_interest_groups( $form['fields'] , $interest_groupings , $form['list_id'] );
303
+																		$this->build_available_interest_groups( $form[ 'fields' ], $interest_groupings, $form[ 'list_id' ] );
304 304
 																	} else {
305
-																		echo '<p class="description">' . $interest_groupings['error'] . '</p>';
305
+																		echo '<p class="description">' . $interest_groupings[ 'error' ] . '</p>';
306 306
 																	}
307 307
 																?>
308 308
 															</div>
@@ -335,19 +335,19 @@  discard block
 block discarded – undo
335 335
 										<div id="post-body-content">
336 336
 											<div class="meta-box-sortables ui-sortable">
337 337
 												<div class="postbox yikes-easy-mc-postbox">
338
-													<h3 class="edit-form-title"><span><?php _e( "Additional Form Settings" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
338
+													<h3 class="edit-form-title"><span><?php _e( "Additional Form Settings", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
339 339
 
340 340
 													<div class="inside form-settings-container">
341 341
 
342
-														<p class="edit-form-description"><?php _e( "Adjust some additional form settings below." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
342
+														<p class="edit-form-description"><?php _e( "Adjust some additional form settings below.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
343 343
 
344 344
 														<!-- begin form classes section -->
345 345
 														<strong class="section-title first"><?php _e( 'Overall Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
346 346
 														<section class="section-interior">
347 347
 
348 348
 															<!-- form classes -->
349
-															<label for="yikes-easy-mc-form-class-names"><strong><?php _e( 'Form Classes' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
350
-																<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' ); ?>" >
349
+															<label for="yikes-easy-mc-form-class-names"><strong><?php _e( 'Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
350
+																<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' ); ?>" >
351 351
 																<p class="description"><?php printf( __( 'Add additional class names to the %s element.', 'yikes-inc-easy-mailchimp-extender' ), '<code>' . htmlentities( '<form>' ) . '</code>' ); ?></p>
352 352
 															</label>
353 353
 
@@ -360,12 +360,12 @@  discard block
 block discarded – undo
360 360
 
361 361
 															<!-- setup the checked state here -->
362 362
 															<!-- inline form -->
363
-															<strong><?php _e( 'Inline Form' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
363
+															<strong><?php _e( 'Inline Form', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
364 364
 															<label class="inline-form-label">
365
-																<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' ); ?>
365
+																<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' ); ?>
366 366
 															</label>
367 367
 															<label class="inline-form-label">
368
-																<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' ); ?>
368
+																<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' ); ?>
369 369
 															</label>
370 370
 															<p class="description"><?php _e( 'Programatically setup this form so that all fields are on the same line.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
371 371
 															<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>
@@ -378,30 +378,30 @@  discard block
 block discarded – undo
378 378
 														<section class="section-interior">
379 379
 
380 380
 															<!-- Submit button type -->
381
-															<strong><?php _e( 'Submit Button Type' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
381
+															<strong><?php _e( 'Submit Button Type', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
382 382
 															<label class="inline-form-label">
383
-																<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' ); ?>
383
+																<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' ); ?>
384 384
 															</label>
385 385
 															<label class="inline-form-label">
386
-																<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' ); ?>
386
+																<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' ); ?>
387 387
 															</label>
388 388
 															<p class="description"><?php _e( 'Select the submit button type for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
389 389
 															<!-- end submit button type -->
390 390
 
391 391
 																<!-- Text submit button type -->
392
-																<section class="submit-button-type-text nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'image' ) { echo ' hidden'; } ?>">
392
+																<section class="submit-button-type-text nested-child<?php if ( $form_settings[ 'yikes-easy-mc-submit-button-type' ] == 'image' ) { echo ' hidden'; } ?>">
393 393
 																	<!-- submit button text -->
394
-																	<label for="yikes-easy-mc-submit-button-text"><strong><?php _e( 'Submit Button Text' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
395
-																		<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' ); ?>">
394
+																	<label for="yikes-easy-mc-submit-button-text"><strong><?php _e( 'Submit Button Text', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
395
+																		<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' ); ?>">
396 396
 																		<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>
397 397
 																	</label>
398 398
 																</section>
399 399
 																<!-- end text submit button type -->
400 400
 
401 401
 																<!-- Image submit button type -->
402
-																<section class="submit-button-type-image nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'text' ) { echo ' hidden'; } ?>">
403
-																	<label for="yikes-easy-mc-submit-button-image"><strong><?php _e( 'Submit Button URL' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
404
-																		<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' ); ?>">
402
+																<section class="submit-button-type-image nested-child<?php if ( $form_settings[ 'yikes-easy-mc-submit-button-type' ] == 'text' ) { echo ' hidden'; } ?>">
403
+																	<label for="yikes-easy-mc-submit-button-image"><strong><?php _e( 'Submit Button URL', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
404
+																		<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' ); ?>">
405 405
 																		<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>
406 406
 																	</label>
407 407
 																</section>
@@ -409,8 +409,8 @@  discard block
 block discarded – undo
409 409
 
410 410
 
411 411
 															<!-- submit button classes -->
412
-															<label for="yikes-easy-mc-form-submit-button-classes"><strong style="float:left;"><?php _e( 'Submit Button Classes' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
413
-																<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' ); ?>" >
412
+															<label for="yikes-easy-mc-form-submit-button-classes"><strong style="float:left;"><?php _e( 'Submit Button Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
413
+																<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' ); ?>" >
414 414
 																<p class="description"><?php _e( 'Add custom classes to the submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
415 415
 															</label>
416 416
 															<!-- end submit button classes -->
@@ -423,45 +423,45 @@  discard block
 block discarded – undo
423 423
 														<section class="section-interior">
424 424
 															<!-- Schedule form -->
425 425
 															<label class="inline-form-label">
426
-																<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' ); ?>
426
+																<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' ); ?>
427 427
 															</label>
428 428
 															<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>
429 429
 															<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>
430 430
 																<!-- Start Date Limitation Nested -->
431
-																<section class="date-restirction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?>">
431
+																<section class="date-restirction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-schedule' ] == '0' ) { echo ' hidden'; } ?>">
432 432
 																	<!-- Start Date -->
433
-																	<label for="yikes-easy-mc-form-restriction-start-date"><strong><?php _e( 'Start Date' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
434
-																		<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'] ); ?>" >
433
+																	<label for="yikes-easy-mc-form-restriction-start-date"><strong><?php _e( 'Start Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
434
+																		<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' ] ); ?>" >
435 435
 																		<?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
436 436
 																	</label>
437 437
 
438 438
 																	<!-- Start Time -->
439
-																	<label for="yikes-easy-mc-form-restriction-start-time"><strong><?php _e( 'Start Time' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
440
-																		<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'] ); ?>" >
439
+																	<label for="yikes-easy-mc-form-restriction-start-time"><strong><?php _e( 'Start Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
440
+																		<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' ] ); ?>" >
441 441
 																	</label>
442 442
 																	<p class="description"><?php _e( 'Set the dates that this form should display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
443 443
 																</section>
444 444
 																<!-- end Start Date Limitation Nested -->
445 445
 
446 446
 																<!-- End Date Limitation Nested -->
447
-																<section class="date-restirction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?> last">
447
+																<section class="date-restirction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-schedule' ] == '0' ) { echo ' hidden'; } ?> last">
448 448
 																	<!-- End Date -->
449
-																	<label for="yikes-easy-mc-form-restriction-end-date"><strong><?php _e( 'End Date' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
450
-																		<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'] ); ?>" >
449
+																	<label for="yikes-easy-mc-form-restriction-end-date"><strong><?php _e( 'End Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
450
+																		<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' ] ); ?>" >
451 451
 																		<?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
452 452
 																	</label>
453 453
 
454 454
 																	<!-- End Time -->
455
-																	<label for="yikes-easy-mc-form-restriction-end-time"><strong><?php _e( 'End Time' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
456
-																		<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'] ); ?>" >
455
+																	<label for="yikes-easy-mc-form-restriction-end-time"><strong><?php _e( 'End Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
456
+																		<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' ] ); ?>" >
457 457
 																	</label>
458 458
 																	<p class="description"><?php _e( 'Set the dates that this form should no longer display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
459 459
 
460 460
 																	<!-- Form pending message -->
461
-																	<label for="yikes-easy-mc-form-restriction-pending-message"><strong><?php _e( 'Pending Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
461
+																	<label for="yikes-easy-mc-form-restriction-pending-message"><strong><?php _e( 'Pending Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
462 462
 																		<?php
463 463
 																			wp_editor(
464
-																				$form_settings['yikes-easy-mc-form-restriction-pending-message'],
464
+																				$form_settings[ 'yikes-easy-mc-form-restriction-pending-message' ],
465 465
 																				'yikes-easy-mc-form-restriction-pending-message',
466 466
 																				array(
467 467
 																					'editor_class' => 'yikes-easy-mc-form-restriction-pending-message',
@@ -473,10 +473,10 @@  discard block
 block discarded – undo
473 473
 																	<p class="description"><?php _e( 'Set the message that should display prior to the form being active.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
474 474
 
475 475
 																	<!-- form expired message -->
476
-																	<label for="yikes-easy-mc-form-restriction-expired-message"><strong><?php _e( 'Expired Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
476
+																	<label for="yikes-easy-mc-form-restriction-expired-message"><strong><?php _e( 'Expired Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
477 477
 																		<?php
478 478
 																			wp_editor(
479
-																				$form_settings['yikes-easy-mc-form-restriction-expired-message'],
479
+																				$form_settings[ 'yikes-easy-mc-form-restriction-expired-message' ],
480 480
 																				'yikes-easy-mc-form-restriction-expired-message',
481 481
 																				array(
482 482
 																					'editor_class' => 'yikes-easy-mc-form-restriction-expired-message',
@@ -491,16 +491,16 @@  discard block
 block discarded – undo
491 491
 
492 492
 																<!-- Require Users to be Logged In -->
493 493
 																<label class="inline-form-label">
494
-																	<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' ); ?>
494
+																	<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' ); ?>
495 495
 																</label>
496 496
 																<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>
497 497
 
498 498
 																<!-- Require Login Message -->
499
-																<section class="login-restirction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-login-required'] == '0' ) { echo ' hidden'; } ?>">
500
-																	<label for="yikes-easy-mc-form-restriction-login-message"><strong><?php _e( 'Required Login Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
499
+																<section class="login-restirction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-login-required' ] == '0' ) { echo ' hidden'; } ?>">
500
+																	<label for="yikes-easy-mc-form-restriction-login-message"><strong><?php _e( 'Required Login Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
501 501
 																		<?php
502 502
 																			wp_editor(
503
-																				$form_settings['yikes-easy-mc-form-restriction-login-message'],
503
+																				$form_settings[ 'yikes-easy-mc-form-restriction-login-message' ],
504 504
 																				'yikes-easy-mc-form-restriction-login-message',
505 505
 																				array(
506 506
 																					'editor_class' => 'yikes-easy-mc-form-restriction-login-message',
@@ -529,14 +529,14 @@  discard block
 block discarded – undo
529 529
 										<div id="postbox-container-1" class="postbox-container">
530 530
 											<div class="meta-box-sortables">
531 531
 												<div class="postbox yikes-easy-mc-postbox">
532
-													<h3 class="edit-form-title"><span><?php _e( "Form Settings Explained" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
532
+													<h3 class="edit-form-title"><span><?php _e( "Form Settings Explained", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
533 533
 													<div class="inside">
534 534
 
535 535
 														<ul>
536
-															<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>
537
-															<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>
538
-															<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>
539
-															<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>
536
+															<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>
537
+															<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>
538
+															<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>
539
+															<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 540
 														</ul>
541 541
 
542 542
 													</div>
@@ -564,41 +564,41 @@  discard block
 block discarded – undo
564 564
 										<div id="post-body-content">
565 565
 											<div class="meta-box-sortables ui-sortable">
566 566
 												<div class="postbox yikes-easy-mc-postbox">
567
-													<h3 class="edit-form-title"><span><?php _e( "Custom Messages" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
567
+													<h3 class="edit-form-title"><span><?php _e( "Custom Messages", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
568 568
 
569 569
 													<div class="inside error-message-container">
570 570
 														<?php
571 571
 															// build our default options
572 572
 															$error_message_array = array(
573
-																'success' => __( 'Thank You for subscribing! Check your email for the confirmation message.' , 'yikes-inc-easy-mailchimp-extender' ),
574
-																'general-error' => __( "Whoops! It looks like something went wrong. Please try again." , 'yikes-inc-easy-mailchimp-extender' ),
575
-																'invalid-email' => __( "Please provide a valid email address." , 'yikes-inc-easy-mailchimp-extender' ),
576
-																'email-exists-error' => __( "The provided email is already subscribed to this list." , 'yikes-inc-easy-mailchimp-extender' ),
577
-																'update-link' => __ ( "To update your MailChimp profile, please [link]click to send yourself an update link[/link].", 'yikes-inc-easy-mailchimp-extender' ),
573
+																'success' => __( 'Thank You for subscribing! Check your email for the confirmation message.', 'yikes-inc-easy-mailchimp-extender' ),
574
+																'general-error' => __( "Whoops! It looks like something went wrong. Please try again.", 'yikes-inc-easy-mailchimp-extender' ),
575
+																'invalid-email' => __( "Please provide a valid email address.", 'yikes-inc-easy-mailchimp-extender' ),
576
+																'email-exists-error' => __( "The provided email is already subscribed to this list.", 'yikes-inc-easy-mailchimp-extender' ),
577
+																'update-link' => __( "To update your MailChimp profile, please [link]click to send yourself an update link[/link].", 'yikes-inc-easy-mailchimp-extender' ),
578 578
 															);
579
-															$global_error_messages = get_option( 'yikes-easy-mc-global-error-messages' , $error_message_array );
579
+															$global_error_messages = get_option( 'yikes-easy-mc-global-error-messages', $error_message_array );
580 580
 														?>
581
-														<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>
581
+														<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>
582 582
 
583 583
 														<!-- Success Message -->
584
-														<label for="yikes-easy-mc-success-message"><strong><?php _e( 'Success Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
585
-															<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']; ?>" >
584
+														<label for="yikes-easy-mc-success-message"><strong><?php _e( 'Success Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
585
+															<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' ]; ?>" >
586 586
 														</label>
587 587
 														<!-- General Error Message -->
588
-														<label for="yikes-easy-mc-general-error-message"><strong><?php _e( 'General Error Message' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
589
-															<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']; ?>" >
588
+														<label for="yikes-easy-mc-general-error-message"><strong><?php _e( 'General Error Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
589
+															<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' ]; ?>" >
590 590
 														</label>
591 591
 														<!-- Invalid Email Address Message -->
592
-														<label for="yikes-easy-mc-invalid-email-message"><strong><?php _e( 'Invalid Email' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
593
-															<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']; ?>">
592
+														<label for="yikes-easy-mc-invalid-email-message"><strong><?php _e( 'Invalid Email', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
593
+															<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' ]; ?>">
594 594
 														</label>
595 595
 														<!-- Email Address is already subscribed -->
596
-														<label for="yikes-easy-mc-user-subscribed-message"><strong><?php _e( 'Email Already Subscribed' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
597
-															<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']; ?>">
596
+														<label for="yikes-easy-mc-user-subscribed-message"><strong><?php _e( 'Email Already Subscribed', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
597
+															<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' ]; ?>">
598 598
 														</label>
599 599
 														<!-- Click the link to update user profile etc. etc. -->
600
-														<label for="yikes-easy-mc-user-subscribed-update-link"><strong><?php _e( 'Update Link' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
601
-															<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']; ?>">
600
+														<label for="yikes-easy-mc-user-subscribed-update-link"><strong><?php _e( 'Update Link', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
601
+															<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' ]; ?>">
602 602
 														</label>
603 603
 													</div>
604 604
 
@@ -613,15 +613,15 @@  discard block
 block discarded – undo
613 613
 										<div id="postbox-container-1" class="postbox-container">
614 614
 											<div class="meta-box-sortables">
615 615
 												<div class="postbox yikes-easy-mc-postbox">
616
-													<h3 class="edit-form-title"><span><?php _e( "Error Message Explanation" , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
616
+													<h3 class="edit-form-title"><span><?php _e( "Error Message Explanation", 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
617 617
 													<div class="inside">
618 618
 
619 619
 														<ul>
620
-															<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>
621
-															<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>
622
-															<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>
623
-															<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>
624
-															<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>
620
+															<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>
621
+															<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>
622
+															<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>
623
+															<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>
624
+															<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>
625 625
 														</ul>
626 626
 
627 627
 													</div>
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 							</label>
641 641
 							<!-- End Error Messages -->
642 642
 
643
-							<?php do_action( 'yikes-mailchimp-edit-form-sections' , $form ); ?>
643
+							<?php do_action( 'yikes-mailchimp-edit-form-sections', $form ); ?>
644 644
 
645 645
 						</div>
646 646
 						<!-- .inside -->
@@ -655,107 +655,107 @@  discard block
 block discarded – undo
655 655
 			<div id="postbox-container-1" class="postbox-container  yikes-easy-forms-sidebar">
656 656
 				<div class="meta-box-sortables">
657 657
 					<div class="postbox yikes-easy-mc-postbox">
658
-						<h3><span><?php _e( 'Form Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
658
+						<h3><span><?php _e( 'Form Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
659 659
 
660 660
 						<div class="inside">
661 661
 								<p class="inside-section-1">
662
-									<label for="shortcode"><?php _e( 'Edit Another Form' , 'yikes-inc-easy-mailchimp-extender' ); ?><br />
662
+									<label for="shortcode"><?php _e( 'Edit Another Form', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
663 663
 										<select class="widefat" name="form_switcher" id="form_switcher" onchange="YIKES_Easy_MC_SwitchForm(jQuery(this).val());">
664
-											<?php foreach( $all_forms as $single_form ) { ?>
665
-												<option <?php selected( $form_id , $single_form['id'] ); ?>value="<?php echo $single_form['id']; ?>"><?php echo $single_form['form_name']; ?></option>
664
+											<?php foreach ( $all_forms as $single_form ) { ?>
665
+												<option <?php selected( $form_id, $single_form[ 'id' ] ); ?>value="<?php echo $single_form[ 'id' ]; ?>"><?php echo $single_form[ 'form_name' ]; ?></option>
666 666
 											<?php } ?>
667 667
 										</select>
668 668
 									</label>
669 669
 								</p>
670 670
 
671 671
 								<p class="inside-section-2">
672
-									<label for="shortcode"><?php _e( 'Shortcode' , 'yikes-inc-easy-mailchimp-extender' ); ?><br />
673
-										<input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo $form['id']; ?>"]' />
672
+									<label for="shortcode"><?php _e( 'Shortcode', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
673
+										<input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo $form[ 'id' ]; ?>"]' />
674 674
 									</label>
675 675
 								</p>
676 676
 
677 677
 
678 678
 							<a href="#" class="expansion-section-title settings-sidebar">
679
-								<span class="dashicons dashicons-plus"></span><?php _e( 'Associated List Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>
679
+								<span class="dashicons dashicons-plus"></span><?php _e( 'Associated List Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
680 680
 							</a>
681 681
 							<div class="yikes-mc-settings-expansion-section">
682 682
 								<!-- Associated List -->
683
-								<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>
684
-									<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() );">
683
+								<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>
684
+									<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() );">
685 685
 										<?php
686
-										if( !empty( $list_data['data'] ) ) {
687
-											foreach( $list_data['data'] as $mailing_list ) {
686
+										if ( ! empty( $list_data[ 'data' ] ) ) {
687
+											foreach ( $list_data[ 'data' ] as $mailing_list ) {
688 688
 												?>
689
-													<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>
689
+													<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>
690 690
 												<?php
691 691
 											}
692 692
 										} else {
693 693
 											?>
694
-												<option value="no-forms"><?php _e( 'No Lists Found' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
694
+												<option value="no-forms"><?php _e( 'No Lists Found', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
695 695
 											<?php
696 696
 										}
697 697
 										?>
698 698
 									</select>
699
-									<?php if( !empty( $list_data['data'] ) ) { ?>
699
+									<?php if ( ! empty( $list_data[ 'data' ] ) ) { ?>
700 700
 										<p class="description view-list">
701
-											<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>
701
+											<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>
702 702
 										</p>
703 703
 										<p class="description">
704
-											<?php _e( "Users who sign up via this form will be added to the list selected above." , 'yikes-inc-easy-mailchimp-extender' ); ?>
704
+											<?php _e( "Users who sign up via this form will be added to the list selected above.", 'yikes-inc-easy-mailchimp-extender' ); ?>
705 705
 										</p>
706 706
 									<?php } else { ?>
707 707
 										<p class="description">
708
-											<?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' ); ?>.
708
+											<?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' ); ?>.
709 709
 										</p>
710 710
 									<?php } ?>
711 711
 								</label></p>
712 712
 							</div>
713 713
 
714 714
 							<a href="#" class="expansion-section-title settings-sidebar">
715
-								<span class="dashicons dashicons-plus"></span><?php _e( 'Opt-in Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>
715
+								<span class="dashicons dashicons-plus"></span><?php _e( 'Opt-in Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
716 716
 							</a>
717 717
 							<div class="yikes-mc-settings-expansion-section">
718 718
 
719 719
 								<!-- Single or Double Opt-in -->
720 720
 								<?php
721
-									if( !isset( $optin_settings['optin'] ) ) {
722
-										$optin_settings['optin'] = '1';
721
+									if ( ! isset( $optin_settings[ 'optin' ] ) ) {
722
+										$optin_settings[ 'optin' ] = '1';
723 723
 									}
724 724
 								?>
725
-								<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>
725
+								<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>
726 726
 									<span class="edit-form-field-container-span">
727
-										<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>
728
-										&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>
727
+										<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>
728
+										&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>
729 729
 									</span>
730
-									<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>
730
+									<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>
731 731
 								</label></p>
732 732
 
733 733
 								<!-- Welcome Email -->
734 734
 								<?php
735
-									if( !isset( $optin_settings['send_welcome_email'] ) ) {
736
-										$optin_settings['send_welcome_email'] = '1';
735
+									if ( ! isset( $optin_settings[ 'send_welcome_email' ] ) ) {
736
+										$optin_settings[ 'send_welcome_email' ] = '1';
737 737
 									}
738 738
 								?>
739
-								<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>
739
+								<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>
740 740
 									<span class="edit-form-field-container-span">
741
-										<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>
742
-										&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>
741
+										<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>
742
+										&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>
743 743
 									</span>
744
-									<p class="description"><?php _e( "When a user signs up, should they receive the default welcome email?" , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
744
+									<p class="description"><?php _e( "When a user signs up, should they receive the default welcome email?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
745 745
 								</label></p>
746 746
 
747 747
 								<!-- Update Existing Users -->
748 748
 								<?php
749
-									if( !isset( $optin_settings['update_existing_user'] ) ) {
750
-										$optin_settings['update_existing_user'] = '1';
749
+									if ( ! isset( $optin_settings[ 'update_existing_user' ] ) ) {
750
+										$optin_settings[ 'update_existing_user' ] = '1';
751 751
 									}
752 752
 								?>
753
-								<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>
753
+								<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>
754 754
 									<span class="form-field-container-span">
755
-										<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>
756
-										&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>
755
+										<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>
756
+										&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>
757 757
 									</span>
758
-									<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>
758
+									<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>
759 759
 								</label></p>
760 760
 
761 761
 								<!--
@@ -764,82 +764,82 @@  discard block
 block discarded – undo
764 764
 									- No = Just update the user profile without an email
765 765
 								-->
766 766
 								<?php
767
-									$send_update_email = ( isset( $optin_settings['send_update_email'] ) && '' !== $optin_settings['send_update_email'] ) ? $optin_settings['send_update_email'] : 0;
767
+									$send_update_email = ( isset( $optin_settings[ 'send_update_email' ] ) && '' !== $optin_settings[ 'send_update_email' ] ) ? $optin_settings[ 'send_update_email' ] : 0;
768 768
 								?>
769
-								<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>
769
+								<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>
770 770
 									<span class="form-field-container-span">
771
-										<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>
772
-										&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>
771
+										<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>
772
+										&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>
773 773
 									</span>
774
-									<em><?php printf( __( "Send an email to the user granting their permission to update their profile information. Otherwise, an existing subscriber filling out this form, will have their profile information updated without any further interaction." , "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></em>
774
+									<em><?php printf( __( "Send an email to the user granting their permission to update their profile information. Otherwise, an existing subscriber filling out this form, will have their profile information updated without any further interaction.", "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></em>
775 775
 								</label></p>
776 776
 
777 777
 							</div>
778 778
 
779 779
 							<a href="#" class="expansion-section-title settings-sidebar">
780
-								<span class="dashicons dashicons-plus"></span><?php _e( 'Submission Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>
780
+								<span class="dashicons dashicons-plus"></span><?php _e( 'Submission Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>
781 781
 							</a>
782 782
 							<div class="yikes-mc-settings-expansion-section">
783 783
 								<!-- AJAX form Submission -->
784 784
 								<?php
785
-									if( !isset( $submission_settings['ajax'] ) ) {
786
-										$submission_settings['ajax'] = '1';
785
+									if ( ! isset( $submission_settings[ 'ajax' ] ) ) {
786
+										$submission_settings[ 'ajax' ] = '1';
787 787
 									}
788 788
 								?>
789
-								<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>
789
+								<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>
790 790
 									<span class="form-field-container-span">
791
-										<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>
792
-										&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>
791
+										<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>
792
+										&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>
793 793
 									</span>
794
-									<p class="description"><?php _e( "AJAX form submissions transmit data without requiring the page to refresh." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
794
+									<p class="description"><?php _e( "AJAX form submissions transmit data without requiring the page to refresh.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
795 795
 								</label></p>
796 796
 
797 797
 								<!-- Redirect User On Submission -->
798 798
 								<?php
799
-									if( !isset( $submission_settings['redirect_on_submission'] ) ) {
800
-										$submission_settings['redirect_on_submission'] = '0';
801
-										$submission_settings['redirect_page'] = '';
799
+									if ( ! isset( $submission_settings[ 'redirect_on_submission' ] ) ) {
800
+										$submission_settings[ 'redirect_on_submission' ] = '0';
801
+										$submission_settings[ 'redirect_page' ] = '';
802 802
 									}
803 803
 								?>
804
-								<p><label for="redirect-user-on-submission"><strong><?php _e( 'Redirect On Submission' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
804
+								<p><label for="redirect-user-on-submission"><strong><?php _e( 'Redirect On Submission', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
805 805
 									<span class="form-field-container-span">
806
-										<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>
807
-										&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>
806
+										<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>
807
+										&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>
808 808
 									</span>
809
-									<?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'] ) : '' ); ?>
810
-									<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>
809
+									<?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' ] ) : '' ); ?>
810
+									<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>
811 811
 								</label></p>
812 812
 
813 813
 								<!-- Hide Form On Submission -->
814 814
 								<?php
815
-									if( !isset( $submission_settings['hide_form_post_signup'] ) ) {
816
-										$submission_settings['hide_form_post_signup'] = '0';
815
+									if ( ! isset( $submission_settings[ 'hide_form_post_signup' ] ) ) {
816
+										$submission_settings[ 'hide_form_post_signup' ] = '0';
817 817
 									}
818 818
 								?>
819
-								<p><label for="hide-form-post-signup"><strong><?php _e( 'Hide Form After Sign Up' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
819
+								<p><label for="hide-form-post-signup"><strong><?php _e( 'Hide Form After Sign Up', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
820 820
 									<span class="form-field-container-span">
821
-										<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>
822
-										&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>
821
+										<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>
822
+										&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>
823 823
 									</span>
824
-									<p class="description"><?php _e( "Should the form be hidden after the user successfully signs up?" , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
824
+									<p class="description"><?php _e( "Should the form be hidden after the user successfully signs up?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
825 825
 								</label></p>
826 826
 
827 827
 								<!-- Append or Replace Interest Groups -->
828 828
 								<?php
829
-									if( !isset( $submission_settings['replace_interests'] ) ) {
830
-										$submission_settings['replace_interests'] = '1'; // defaults to true
829
+									if ( ! isset( $submission_settings[ 'replace_interests' ] ) ) {
830
+										$submission_settings[ 'replace_interests' ] = '1'; // defaults to true
831 831
 									}
832 832
 								?>
833
-								<p><label for="replace-interest-groups"><strong><?php _e( 'Existing Interest Groups' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
833
+								<p><label for="replace-interest-groups"><strong><?php _e( 'Existing Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
834 834
 									<span class="form-field-container-span">
835
-										<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>
836
-										&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>
835
+										<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>
836
+										&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>
837 837
 									</span>
838 838
 
839
-										<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>
839
+										<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>
840 840
 
841 841
 
842
-										<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>
842
+										<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>
843 843
 
844 844
 								</label></p>
845 845
 
@@ -852,9 +852,9 @@  discard block
 block discarded – undo
852 852
 
853 853
 							<span class="form-buttons-container" id="major-publishing-actions">
854 854
 								<?php
855
-									echo submit_button( __( 'Update Form' ) , 'primary' , '' , false , array( 'onclick' => 'jQuery(this).parent().prev().css({"display":"block","visibility":"inherit"});' ) );
856
-									$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' ) ) );
857
-									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>';
855
+									echo submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => 'jQuery(this).parent().prev().css({"display":"block","visibility":"inherit"});' ) );
856
+									$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' ) ) );
857
+									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>';
858 858
 								?>
859 859
 							</span>
860 860
 
Please login to merge, or discard this patch.
admin/partials/view-user.php 1 patch
Spacing   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -3,14 +3,14 @@  discard block
 block discarded – undo
3 3
 	*	Get and store our variables
4 4
 	*	@since 6.0
5 5
 	*/
6
-	$list_id = $_GET['mailchimp-list'];
7
-	$email_id = (int) esc_attr( $_GET['email-id'] );
6
+	$list_id = $_GET[ 'mailchimp-list' ];
7
+	$email_id = (int) esc_attr( $_GET[ 'email-id' ] );
8 8
 
9 9
 	/*
10 10
 	*	Confirm that our data is set
11 11
 	*	or abort...
12 12
 	*/
13
-	if( ! isset( $list_id ) || ! isset( $email_id ) ) {
13
+	if ( ! isset( $list_id ) || ! isset( $email_id ) ) {
14 14
 		wp_die( "We've encountered an error. Please go back and try again", "yikes-inc-easy-mailchimp-extender" );
15 15
 		exit;
16 16
 	}
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	$dash_position = strpos( $api_key, '-' );
21 21
 
22 22
 	// get this lists data
23
-	if( $dash_position !== false ) {
23
+	if ( $dash_position !== false ) {
24 24
 		$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/member-info.json';
25 25
 	}
26 26
 	$user_data = wp_remote_post( $api_endpoint, array(
@@ -36,29 +36,29 @@  discard block
 block discarded – undo
36 36
 	) );
37 37
 	$user_data = json_decode( wp_remote_retrieve_body( $user_data ), true );
38 38
 
39
-	if( isset( $user_data['error'] ) ) {
40
-		if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
39
+	if ( isset( $user_data[ 'error' ] ) ) {
40
+		if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
41 41
 			require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
42 42
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
43
-			$error_logging->yikes_easy_mailchimp_write_to_error_log( $user_data['error'], __( "Get Member Info" , 'yikes-inc-easy-mailchimp-extender' ), "View User Page" );
43
+			$error_logging->yikes_easy_mailchimp_write_to_error_log( $user_data[ 'error' ], __( "Get Member Info", 'yikes-inc-easy-mailchimp-extender' ), "View User Page" );
44 44
 		}
45 45
 	}
46 46
 
47 47
 	/*
48 48
 	*	Check for MailChimp returned errors
49 49
 	*/
50
-	if( isset( $user_data['error'] ) ) {
50
+	if ( isset( $user_data[ 'error' ] ) ) {
51 51
 		echo '<h4>Error</h4>';
52
-		echo $user_data['error'] . '.';
52
+		echo $user_data[ 'error' ] . '.';
53 53
 		return;
54 54
 	}
55 55
 
56
-	if( isset( $user_data['data'][0] ) ) {
56
+	if ( isset( $user_data[ 'data' ][ 0 ] ) ) {
57 57
 		// reset our data so we can easily use it
58
-		$user_data = $user_data['data'][0];
58
+		$user_data = $user_data[ 'data' ][ 0 ];
59 59
 
60
-		$other_lists = ( isset( $user_data['lists'] ) && ! empty( $user_data['lists'] ) ) ? $user_data['lists'] : array();
61
-		$merge_data_array = ( $user_data['merges'] && ! empty( $user_data['merges'] ) ) ? $user_data['merges'] : array();
60
+		$other_lists = ( isset( $user_data[ 'lists' ] ) && ! empty( $user_data[ 'lists' ] ) ) ? $user_data[ 'lists' ] : array();
61
+		$merge_data_array = ( $user_data[ 'merges' ] && ! empty( $user_data[ 'merges' ] ) ) ? $user_data[ 'merges' ] : array();
62 62
 
63 63
 		// print_r( $user_data );
64 64
 
@@ -68,40 +68,40 @@  discard block
 block discarded – undo
68 68
 		$merge_variable_fields = array();
69 69
 
70 70
 		/* Build the array of mailing lists the user is subscribed to */
71
-		if( isset( $other_lists ) && count( $other_lists ) >= 1 ) {
72
-			foreach( $other_lists as $list ) {
73
-				if( $list['status'] == 'subscribed' ) {
74
-					if( $dash_position !== false ) {
71
+		if ( isset( $other_lists ) && count( $other_lists ) >= 1 ) {
72
+			foreach ( $other_lists as $list ) {
73
+				if ( $list[ 'status' ] == 'subscribed' ) {
74
+					if ( $dash_position !== false ) {
75 75
 						$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/list.json';
76 76
 					}
77 77
 					$list_data = wp_remote_post( $api_endpoint, array(
78 78
 						'body' => array(
79 79
 							'apikey' => $api_key,
80 80
 							'filters' => array(
81
-								'list_id' => $list['id']
81
+								'list_id' => $list[ 'id' ]
82 82
 							)
83 83
 						),
84 84
 						'timeout' => 10,
85 85
 						'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
86 86
 					) );
87 87
 					$list_data = json_decode( wp_remote_retrieve_body( $list_data ), true );
88
-					if( isset( $list_data['error'] ) ) {
89
-						if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
88
+					if ( isset( $list_data[ 'error' ] ) ) {
89
+						if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
90 90
 							require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
91 91
 							$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
92
-							$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data['error'], __( "Get Account Lists" , 'yikes-inc-easy-mailchimp-extender' ), "View User Page" );
92
+							$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data[ 'error' ], __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ), "View User Page" );
93 93
 						}
94 94
 					}
95
-					if( $list_data && isset( $list_data['data'][0] ) ) {
96
-						$additional_lists[$list_data['data'][0]['id']] = $list_data['data'][0]['name'];
95
+					if ( $list_data && isset( $list_data[ 'data' ][ 0 ] ) ) {
96
+						$additional_lists[ $list_data[ 'data' ][ 0 ][ 'id' ] ] = $list_data[ 'data' ][ 0 ][ 'name' ];
97 97
 					}
98 98
 				}
99 99
 			}
100 100
 		}
101 101
 
102 102
 		/* Build the array of merge variables => value */
103
-		if( isset( $merge_data_array ) && count( $merge_data_array ) >= 1 ) {
104
-			if( $dash_position !== false ) {
103
+		if ( isset( $merge_data_array ) && count( $merge_data_array ) >= 1 ) {
104
+			if ( $dash_position !== false ) {
105 105
 				$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/merge-vars.json';
106 106
 			}
107 107
 			$merge_variables = wp_remote_post( $api_endpoint, array(
@@ -113,18 +113,18 @@  discard block
 block discarded – undo
113 113
 				'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
114 114
 			) );
115 115
 			$merge_variables = json_decode( wp_remote_retrieve_body( $merge_variables ), true );
116
-			if( isset( $merge_variables['error'] ) ) {
117
-				if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
116
+			if ( isset( $merge_variables[ 'error' ] ) ) {
117
+				if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
118 118
 					require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
119 119
 					$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
120
-					$error_logging->yikes_easy_mailchimp_write_to_error_log( $merge_variables['error'], __( "Get Merge Variables" , 'yikes-inc-easy-mailchimp-extender' ), "View User Page" );
120
+					$error_logging->yikes_easy_mailchimp_write_to_error_log( $merge_variables[ 'error' ], __( "Get Merge Variables", 'yikes-inc-easy-mailchimp-extender' ), "View User Page" );
121 121
 				}
122 122
 			}
123 123
 			// loop and display
124
-			if( $merge_variables ) {
125
-				foreach( $merge_variables['data'][0]['merge_vars'] as $merge_variable ) {
126
-					if( $merge_variable['tag'] != 'EMAIL' ) {
127
-						$merge_variable_fields[$merge_variable['name']] = ( isset( $merge_data_array[$merge_variable['tag']] ) ) ? $merge_data_array[$merge_variable['tag']] : '';
124
+			if ( $merge_variables ) {
125
+				foreach ( $merge_variables[ 'data' ][ 0 ][ 'merge_vars' ] as $merge_variable ) {
126
+					if ( $merge_variable[ 'tag' ] != 'EMAIL' ) {
127
+						$merge_variable_fields[ $merge_variable[ 'name' ] ] = ( isset( $merge_data_array[ $merge_variable[ 'tag' ] ] ) ) ? $merge_data_array[ $merge_variable[ 'tag' ] ] : '';
128 128
 					}
129 129
 				}
130 130
 			}
@@ -132,17 +132,17 @@  discard block
 block discarded – undo
132 132
 
133 133
 
134 134
 		// store usable data
135
-		$user_email = sanitize_email( $user_data['email'] );
135
+		$user_email = sanitize_email( $user_data[ 'email' ] );
136 136
 		// prepend our email address to the beginning
137 137
 		$merge_variable_fields = array( 'Email Address' => $user_email ) + $merge_variable_fields;
138 138
 		$gravatar_image = get_avatar( $user_email, 120 );
139
-		$email_type = $user_data['email_type'];
140
-		$member_rating = ( ! empty( $user_data['member_rating'] ) ) ? (int) $user_data['member_rating'] : 0;
139
+		$email_type = $user_data[ 'email_type' ];
140
+		$member_rating = ( ! empty( $user_data[ 'member_rating' ] ) ) ? (int) $user_data[ 'member_rating' ] : 0;
141 141
 		$member_rating_stars = '';
142
-		if( $member_rating > 0 ) {
142
+		if ( $member_rating > 0 ) {
143 143
 			$x = 1;
144
-			while( $x <= 5 ) {
145
-				if( $x <= $member_rating ) {
144
+			while ( $x <= 5 ) {
145
+				if ( $x <= $member_rating ) {
146 146
 					$member_rating_stars .= '<span class="yikes-mc-member-rating-star dashicons dashicons-star-filled"></span>';
147 147
 				} else {
148 148
 					$member_rating_stars .= '<span class="yikes-mc-member-rating-star dashicons dashicons-star-empty"></span>';
@@ -151,25 +151,25 @@  discard block
 block discarded – undo
151 151
 			}
152 152
 		} else {
153 153
 			$y = 1;
154
-			while( $y <= 5 ) {
154
+			while ( $y <= 5 ) {
155 155
 				$member_rating_stars .= '<span class="yikes-mc-member-rating-star dashicons dashicons-star-empty"></span>';
156 156
 				$y++;
157 157
 			}
158 158
 		}
159
-		$last_changed = strtotime( $user_data['info_changed'] );
160
-		$user_language = ( $user_data['language'] && $user_data['language'] != '' ) ? $user_data['language'] : '';
161
-		$list_name = $user_data['list_name'];
159
+		$last_changed = strtotime( $user_data[ 'info_changed' ] );
160
+		$user_language = ( $user_data[ 'language' ] && $user_data[ 'language' ] != '' ) ? $user_data[ 'language' ] : '';
161
+		$list_name = $user_data[ 'list_name' ];
162 162
 
163 163
 		// Generate our display page
164 164
 		?>
165 165
 			<div class="wrap view-user-data-wrap">
166 166
 				<!-- Freddie Logo -->
167
-				<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" />
167
+				<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" />
168 168
 
169
-				<h1>YIKES Easy Forms for MailChimp | <?php _e( 'Subscriber Details' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
169
+				<h1>YIKES Easy Forms for MailChimp | <?php _e( 'Subscriber Details', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
170 170
 
171 171
 				<!-- Settings Page Description -->
172
-				<p class="yikes-easy-mc-about-text about-text"><?php printf( __( 'View %s subscriber details below.' , 'yikes-inc-easy-mailchimp-extender' ), $user_email ); ?></p>
172
+				<p class="yikes-easy-mc-about-text about-text"><?php printf( __( 'View %s subscriber details below.', 'yikes-inc-easy-mailchimp-extender' ), $user_email ); ?></p>
173 173
 
174 174
 				<section class="yikes-mc-view-list-breadcrumbs">
175 175
 					<a href="<?php echo esc_url( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-lists' ) ); ?>" title="<?php _e( 'View List', 'yikes-inc-easy-mailchimp-extender' ); ?>">
@@ -192,16 +192,16 @@  discard block
 block discarded – undo
192 192
 						<h2><?php echo $user_email; ?></h2>
193 193
 						<?php echo '<span class="member-star-rating-container" title="' . sprintf( _n( 'Member Rating: %s star', 'Member Rating: %s stars', $member_rating, 'yikes-inc-easy-mailchimp-extender' ), $member_rating ) . '">' . $member_rating_stars . '</span>'; ?>
194 194
 						<span class="member-subscription-date">
195
-							<?php echo __( 'Subscribed:', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . get_date_from_gmt( $user_data['info_changed'], 'F jS, Y h:i a' ); ?>
195
+							<?php echo __( 'Subscribed:', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . get_date_from_gmt( $user_data[ 'info_changed' ], 'F jS, Y h:i a' ); ?>
196 196
 						</span>
197
-						<?php if( isset( $user_data['geo'] ) && ! empty( $user_data['geo'] ) ) { ?>
198
-							<?php if( isset( $user_data['geo']['latitude'] ) && isset( $user_data['geo']['longitude'] ) ) { ?>
197
+						<?php if ( isset( $user_data[ 'geo' ] ) && ! empty( $user_data[ 'geo' ] ) ) { ?>
198
+							<?php if ( isset( $user_data[ 'geo' ][ 'latitude' ] ) && isset( $user_data[ 'geo' ][ 'longitude' ] ) ) { ?>
199 199
 								<span class="member-location-data">
200
-									<?php echo __( 'Location:', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . yikes_mc_geocode_subscriber_data( $user_data['geo']['latitude'], $user_data['geo']['longitude'] ); ?>
200
+									<?php echo __( 'Location:', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . yikes_mc_geocode_subscriber_data( $user_data[ 'geo' ][ 'latitude' ], $user_data[ 'geo' ][ 'longitude' ] ); ?>
201 201
 								</span>
202 202
 							<?php } else { ?>
203 203
 							<span class="member-location-data">
204
-								<?php echo __( 'Location:', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . $user_data['geo']['region'] . ', ' . $user_data['geo']['cc']; ?>
204
+								<?php echo __( 'Location:', 'yikes-inc-easy-mailchimp-extender' ) . ' ' . $user_data[ 'geo' ][ 'region' ] . ', ' . $user_data[ 'geo' ][ 'cc' ]; ?>
205 205
 							</span>
206 206
 						<?php
207 207
 								}
@@ -212,14 +212,14 @@  discard block
 block discarded – undo
212 212
 					<hr class="yikes-mc-subscriber-hr" />
213 213
 
214 214
 					<?php
215
-						if( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] == 'subscriber-data' ) ) {
215
+						if ( ! isset( $_GET[ 'section' ] ) || ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'subscriber-data' ) ) {
216 216
 							?>
217 217
 								<section class="yikes-mc-card-body merge-variable-section">
218 218
 								<h3><?php _e( 'Fields:', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
219 219
 								<?php
220
-									if( ! empty( $merge_variable_fields ) ) {
220
+									if ( ! empty( $merge_variable_fields ) ) {
221 221
 									?>
222
-										<?php foreach( $merge_variable_fields as $field_name => $value ) { ?>
222
+										<?php foreach ( $merge_variable_fields as $field_name => $value ) { ?>
223 223
 											<li>
224 224
 												<label>
225 225
 													<strong class="section-label"><?php echo $field_name; ?></strong>
@@ -232,11 +232,11 @@  discard block
 block discarded – undo
232 232
 											<strong><?php _e( 'No Subscriber Data Found', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
233 233
 										<?php
234 234
 									}
235
-									if( isset( $user_data['ip_signup'] ) && $user_data['ip_signup'] != '' ) {
235
+									if ( isset( $user_data[ 'ip_signup' ] ) && $user_data[ 'ip_signup' ] != '' ) {
236 236
 										?>
237 237
 											<li>
238 238
 												<label>
239
-													<strong class="section-label"><?php echo __( 'Signup IP', 'yikes-inc-easy-mailchimp-extender' ) . '</strong><p class="section-value"><em>' . $user_data['ip_signup']; ?></strong></p>
239
+													<strong class="section-label"><?php echo __( 'Signup IP', 'yikes-inc-easy-mailchimp-extender' ) . '</strong><p class="section-value"><em>' . $user_data[ 'ip_signup' ]; ?></strong></p>
240 240
 												</label>
241 241
 											</li>
242 242
 										<?php
@@ -247,17 +247,17 @@  discard block
 block discarded – undo
247 247
 							<?php
248 248
 
249 249
 
250
-						if( isset( $_GET['section'] ) && $_GET['section'] == 'additional-subscriptions' ) {
250
+						if ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'additional-subscriptions' ) {
251 251
 							?>
252 252
 								<section class="yikes-mc-card-body">
253 253
 								<?php
254
-								if( ! empty( $additional_lists ) ) {
254
+								if ( ! empty( $additional_lists ) ) {
255 255
 									// remove this list from the additional lists list
256
-									unset( $additional_lists[$list_id] );
257
-									if( ! empty( $additional_lists ) ) {
256
+									unset( $additional_lists[ $list_id ] );
257
+									if ( ! empty( $additional_lists ) ) {
258 258
 										?>
259 259
 										<h3><?php _e( 'Additional Subscriptions:', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
260
-										<?php foreach( $additional_lists as $listid => $name ) { ?>
260
+										<?php foreach ( $additional_lists as $listid => $name ) { ?>
261 261
 											<?php
262 262
 												$user_redirect_url = esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $listid ) );
263 263
 											?>
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
 					?>
277 277
 
278 278
 					<?php
279
-						if( isset( $_GET['section'] ) && $_GET['section'] == 'delete-subscriber' ) {
280
-							$unsubscribe_subscriber_url = esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-unsubscribe-user', 'mailchimp-list' => $list_id , 'nonce' => wp_create_nonce( 'unsubscribe-user-'.$email_id ), 'email_id' => $email_id ) ) );
279
+						if ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'delete-subscriber' ) {
280
+							$unsubscribe_subscriber_url = esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-unsubscribe-user', 'mailchimp-list' => $list_id, 'nonce' => wp_create_nonce( 'unsubscribe-user-' . $email_id ), 'email_id' => $email_id ) ) );
281 281
 							?>
282 282
 								<form id="delete_subscriber" method="POST" action="<?php echo $unsubscribe_subscriber_url; ?>">
283 283
 									<p class="description">
@@ -326,33 +326,33 @@  discard block
 block discarded – undo
326 326
 				<div id="customer-tab-wrapper">
327 327
 						<ul id="customer-tab-wrapper-list">
328 328
 
329
-							<?php if( isset( $_GET['section'] ) && $_GET['section'] != 'subscriber-data' ) { ?>
329
+							<?php if ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] != 'subscriber-data' ) { ?>
330 330
 								<a title="<?php _e( 'Subscriber Details', 'yikes-inc-easy-mailchimp-extender' ); ?>" aria-label="<?php _e( 'Subscriber Details', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="<?php echo $subscriber_details; ?>">
331 331
 							<?php } ?>
332 332
 
333
-								<li <?php if( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] == 'subscriber-data' ) ) { ?>class="active"<?php } else { ?>class="inactive"<?php } ?>><span class="dashicons  dashicons-id"></span></li>
333
+								<li <?php if ( ! isset( $_GET[ 'section' ] ) || ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'subscriber-data' ) ) { ?>class="active"<?php } else { ?>class="inactive"<?php } ?>><span class="dashicons  dashicons-id"></span></li>
334 334
 
335
-							<?php if( isset( $_GET['section'] ) && $_GET['section'] != 'subscriber-data' ) { ?>
335
+							<?php if ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] != 'subscriber-data' ) { ?>
336 336
 								</a>
337 337
 							<?php } ?>
338 338
 
339
-							<?php if( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] != 'additional-subscriptions' ) ) { ?>
339
+							<?php if ( ! isset( $_GET[ 'section' ] ) || ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] != 'additional-subscriptions' ) ) { ?>
340 340
 								<a title="<?php _e( 'Additional Subscriptions', 'yikes-inc-easy-mailchimp-extender' ); ?>" aria-label="<?php _e( 'Additional Subscriptions', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="<?php echo $additional_subscription_url; ?>">
341 341
 							<?php } ?>
342 342
 
343
-								<li <?php if( isset( $_GET['section'] ) && $_GET['section'] == 'additional-subscriptions' ) { ?>class="active"<?php } else { ?>class="inactive"<?php } ?>><span class="dashicons dashicons-portfolio"></span></li>
343
+								<li <?php if ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'additional-subscriptions' ) { ?>class="active"<?php } else { ?>class="inactive"<?php } ?>><span class="dashicons dashicons-portfolio"></span></li>
344 344
 
345
-							<?php if( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] == 'additional-subscriptions' ) ) { ?>
345
+							<?php if ( ! isset( $_GET[ 'section' ] ) || ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'additional-subscriptions' ) ) { ?>
346 346
 								</a>
347 347
 							<?php } ?>
348 348
 
349
-							<?php if( ! isset( $_GET['section'] ) || isset( $_GET['section'] ) && $_GET['section'] != 'delete-subscriber' ) { ?>
349
+							<?php if ( ! isset( $_GET[ 'section' ] ) || isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] != 'delete-subscriber' ) { ?>
350 350
 								<a title="<?php _e( 'Delete Subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?>" aria-label="<?php _e( 'Delete Subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?>" href="<?php echo $delete_subscriber_url; ?>">
351 351
 							<?php } ?>
352 352
 
353
-								<li <?php if( isset( $_GET['section'] ) && $_GET['section'] == 'delete-subscriber' ) { ?>class="active"<?php } else { ?>class="inactive"<?php } ?>><span class="dashicons dashicons-trash"></span></li>
353
+								<li <?php if ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'delete-subscriber' ) { ?>class="active"<?php } else { ?>class="inactive"<?php } ?>><span class="dashicons dashicons-trash"></span></li>
354 354
 
355
-							<?php if( ! isset( $_GET['section'] ) || ( isset( $_GET['section'] ) && $_GET['section'] == 'delete-subscriber' ) ) { ?>
355
+							<?php if ( ! isset( $_GET[ 'section' ] ) || ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'delete-subscriber' ) ) { ?>
356 356
 								</a>
357 357
 							<?php } ?>
358 358
 
@@ -367,15 +367,15 @@  discard block
 block discarded – undo
367 367
 	function yikes_mc_geocode_subscriber_data( $latitude, $longitude ) {
368 368
 		$geocode_url = 'https://maps.googleapis.com/maps/api/geocode/json?latlng=' . $latitude . ',' . $longitude;
369 369
 		$geocode_response = wp_remote_get( $geocode_url );
370
-		if( is_wp_error( $geocode_response ) ) {
370
+		if ( is_wp_error( $geocode_response ) ) {
371 371
 			return;
372 372
 		}
373 373
 		$geocode_response_body = json_decode( wp_remote_retrieve_body( $geocode_response ), true );
374
-		if( is_wp_error( $geocode_response_body ) ) {
374
+		if ( is_wp_error( $geocode_response_body ) ) {
375 375
 			return;
376 376
 		}
377
-		$city = $geocode_response_body['results'][0]['address_components'][2]['short_name'];
378
-		$state = $geocode_response_body['results'][0]['address_components'][5]['short_name'];
379
-		$country = $geocode_response_body['results'][0]['address_components'][6]['short_name'];
377
+		$city = $geocode_response_body[ 'results' ][ 0 ][ 'address_components' ][ 2 ][ 'short_name' ];
378
+		$state = $geocode_response_body[ 'results' ][ 0 ][ 'address_components' ][ 5 ][ 'short_name' ];
379
+		$country = $geocode_response_body[ 'results' ][ 0 ][ 'address_components' ][ 6 ][ 'short_name' ];
380 380
 		return $link = '<a href="http://maps.google.com/maps?q=' . $latitude . ',' . $longitude . '" target="_blank" title="' . __( 'View Google Map', 'yikes-inc-easy-mailchimp-extender' ) . '">' . $city . ', ' . $state . ', ' . $country . '</a>&nbsp;<span class="flag-icon flag-icon-' . strtolower( $country ) . '"></span>';
381 381
 	}
Please login to merge, or discard this patch.
admin/partials/dashboard-widgets/class.list-activity-widget.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
 		if ( current_user_can( apply_filters( 'yikes-mailchimp-admin-widget-capability', apply_filters( 'yikes-mailchimp-user-role-access', 'manage_options' ) ) ) ) {
49 49
 			/* List Stats Dashboard Widget */
50 50
 			wp_add_dashboard_widget(
51
-				'yikes_easy_mc_list_stats_widget',         // Widget slug.
52
-				__( 'MailChimp List Stats', 'yikes-inc-easy-mailchimp-extender' ),         // Title.
51
+				'yikes_easy_mc_list_stats_widget', // Widget slug.
52
+				__( 'MailChimp List Stats', 'yikes-inc-easy-mailchimp-extender' ), // Title.
53 53
 				array( $this, 'list_stats_dashboard_widget' ) // Display function.
54 54
 			);
55 55
 			/* Chimp Chatter Dashboard Widget */
56 56
 			wp_add_dashboard_widget(
57
-				'yikes_easy_mc_account_activity_widget',         // Widget slug.
58
-				__( 'MailChimp Account Activity', 'yikes-inc-easy-mailchimp-extender' ),         // Title.
57
+				'yikes_easy_mc_account_activity_widget', // Widget slug.
58
+				__( 'MailChimp Account Activity', 'yikes-inc-easy-mailchimp-extender' ), // Title.
59 59
 				array( $this, 'account_activity_dashboard_widget' ) // Display function.
60 60
 			);
61 61
 		}
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
 				'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true ),
83 83
 			) );
84 84
 			$list_data = json_decode( wp_remote_retrieve_body( $list_data ), true );
85
-			if ( isset( $list_data['error'] ) ) {
85
+			if ( isset( $list_data[ 'error' ] ) ) {
86 86
 				if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
87 87
 					require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
88 88
 					$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
89
-					$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data['error'], __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ), "Dashboard Activity Widget" );
89
+					$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data[ 'error' ], __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ), "Dashboard Activity Widget" );
90 90
 				}
91 91
 			} else {
92 92
 				// set our transient
@@ -95,15 +95,15 @@  discard block
 block discarded – undo
95 95
 		}
96 96
 		?>
97 97
 		<!-- Dropdown to Change the list -->
98
-		<?php if ( ! empty( $list_data['data'] ) ) {
98
+		<?php if ( ! empty( $list_data[ 'data' ] ) ) {
99 99
 			?>
100 100
 			<section class="inside-widget yikes-dashboard-widget-section">
101 101
 			<strong class="select-list-title"><?php _e( 'Select a list', 'yikes-inc-easy-mailchimp-extender' ) ?>:</strong>
102 102
 			<select id="yikes-easy-mc-dashboard-change-list" class="widefat">
103 103
 				<?php
104
-				foreach ( $list_data['data'] as $list ) {
104
+				foreach ( $list_data[ 'data' ] as $list ) {
105 105
 					?>
106
-					<option val="<?php echo $list['id']; ?>"><?php echo $list['name']; ?></option><?php
106
+					<option val="<?php echo $list[ 'id' ]; ?>"><?php echo $list[ 'name' ]; ?></option><?php
107 107
 				}
108 108
 				?>
109 109
 			</select>
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			<!-- display stats here! -->
113 113
 			<section id="yikes-easy-mc-dashboard-widget-stats">
114 114
 				<?php
115
-				if ( ! empty( $list_data['data'] ) ) {
115
+				if ( ! empty( $list_data[ 'data' ] ) ) {
116 116
 					include_once( YIKES_MC_PATH . 'admin/partials/dashboard-widgets/templates/stats-list-template.php' );
117 117
 				}
118 118
 				?>
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 				'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true ),
145 145
 			) );
146 146
 			$account_activity = json_decode( wp_remote_retrieve_body( $account_activity ), true );
147
-			if ( isset( $account_activity['error'] ) ) {
147
+			if ( isset( $account_activity[ 'error' ] ) ) {
148 148
 				if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
149 149
 					require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
150 150
 					$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
151
-					$error_logging->yikes_easy_mailchimp_write_to_error_log( $account_activity['error'], __( "Get Account Activity", 'yikes-inc-easy-mailchimp-extender' ), "Dashboard Activity Widget" );
151
+					$error_logging->yikes_easy_mailchimp_write_to_error_log( $account_activity[ 'error' ], __( "Get Account Activity", 'yikes-inc-easy-mailchimp-extender' ), "Dashboard Activity Widget" );
152 152
 				}
153 153
 			} else {
154 154
 				// set our transient for one hour
Please login to merge, or discard this patch.
includes/class-yikes-inc-easy-mailchimp-extender-option-forms.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 	 *
20 20
 	 * @param int $form_id The ID of the form to retrieve.
21 21
 	 *
22
-	 * @return array The array of form data.
22
+	 * @return string The array of form data.
23 23
 	 */
24 24
 	public function get_form( $form_id ) {
25 25
 		$all_forms = $this->get_all_forms();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @return bool Whether the form was successfully updated.
49 49
 	 */
50 50
 	public function update_form( $form_id, $data ) {
51
-		$data['id'] = $form_id;
51
+		$data[ 'id' ] = $form_id;
52 52
 		$all_forms  = $this->get_all_forms();
53 53
 
54 54
 		if ( ! isset( $all_forms[ $form_id ] ) ) {
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 		$all_ids         = $this->get_form_ids();
80 80
 		$last_id         = end( $all_ids );
81 81
 		$new_id          = false === $last_id ? 1 : $last_id + 1;
82
-		$form_data['id'] = $new_id;
82
+		$form_data[ 'id' ] = $new_id;
83 83
 
84 84
 		// Ensure our data is consistently sorted
85 85
 		ksort( $form_data );
Please login to merge, or discard this patch.
includes/import-export/yikes-easy-mailchimp-export.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 		$titles  = array();
81 81
 		$content = array();
82 82
 		foreach ( $plugin_settings as $option_name => $option_value ) {
83
-			$titles[] = $option_name;
83
+			$titles[ ] = $option_name;
84 84
 		}
85 85
 
86 86
 		// Generate the output file.
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 				fputcsv( $output_handle, $titles );
104 104
 				$first = false;
105 105
 			}
106
-			$content[] = $option_value;
106
+			$content[ ] = $option_value;
107 107
 
108 108
 		}
109 109
 		fputcsv( $output_handle, $content );
Please login to merge, or discard this patch.
includes/class-yikes-inc-easy-mailchimp-extender-forms.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 */
94 94
 	public function update_form( $form_id, $data ) {
95 95
 		// Prepare the data for the database.
96
-		$data['id'] = $form_id;
96
+		$data[ 'id' ] = $form_id;
97 97
 		$save_data  = $this->prepare_data_for_db( $data );
98 98
 		$formats    = $this->get_format_array( $save_data );
99 99
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		$form_data = yikes_deep_parse_args( $form_data, $this->get_form_defaults() );
123 123
 
124 124
 		// If there is an ID set, remove it
125
-		unset( $form_data['id'] );
125
+		unset( $form_data[ 'id' ] );
126 126
 
127 127
 		// Prepare the data for the database
128 128
 		$save_data = $this->prepare_data_for_db( $form_data );
@@ -302,11 +302,11 @@  discard block
 block discarded – undo
302 302
 				case 'redirect_user_on_submit':
303 303
 				case 'redirect_page':
304 304
 				case 'id':
305
-					$formats[] = '%d';
305
+					$formats[ ] = '%d';
306 306
 					break;
307 307
 
308 308
 				default:
309
-					$formats[] = '%s';
309
+					$formats[ ] = '%s';
310 310
 			}
311 311
 		}
312 312
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 				continue;
347 347
 			}
348 348
 
349
-			$data['id'] = $id;
349
+			$data[ 'id' ] = $id;
350 350
 			$_form_data = $this->prepare_data_for_db( $data );
351 351
 			$formats    = $this->get_format_array( $_form_data );
352 352
 
Please login to merge, or discard this patch.
admin/partials/front-end-widgets/front-end-widget-form.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 			// Widget name will appear in UI
26 26
 			__( 'Easy MailChimp Forms', 'yikes-inc-easy-mailchimp-extender' ),
27 27
 			// Widget description
28
-			array( 'description' => __( 'MailChimp opt-in widget for your sidebar.', 'yikes-inc-easy-mailchimp-extender' ), )
28
+			array( 'description' => __( 'MailChimp opt-in widget for your sidebar.', 'yikes-inc-easy-mailchimp-extender' ),)
29 29
 		);
30 30
 	}
31 31
 
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 		// Get all form IDs so we can use the first one as a default.
40 40
 		$form_ids = $this->form_interface->get_form_ids();
41 41
 
42
-		$title              = isset( $instance['title'] ) ? apply_filters( 'widget_title', $instance['title'] ) : __( 'MailChimp Signup Form', 'yikes-inc-easy-mailchimp-extender' );
43
-		$form_id            = isset( $instance['form_id'] ) ? $instance['form_id'] : $form_ids[0];
44
-		$form_description   = isset( $instance['form_description'] ) ? $instance['form_description'] : '';
45
-		$submit_button_text = isset( $instance['submit_text'] ) ? $instance['submit_text'] : __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
42
+		$title              = isset( $instance[ 'title' ] ) ? apply_filters( 'widget_title', $instance[ 'title' ] ) : __( 'MailChimp Signup Form', 'yikes-inc-easy-mailchimp-extender' );
43
+		$form_id            = isset( $instance[ 'form_id' ] ) ? $instance[ 'form_id' ] : $form_ids[ 0 ];
44
+		$form_description   = isset( $instance[ 'form_description' ] ) ? $instance[ 'form_description' ] : '';
45
+		$submit_button_text = isset( $instance[ 'submit_text' ] ) ? $instance[ 'submit_text' ] : __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
46 46
 
47 47
 		// Build our array based on settings chosen
48 48
 		$shortcode_attributes = array(
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 		);
53 53
 
54 54
 		// before and after widget arguments are defined by themes
55
-		echo $args['before_widget'];
55
+		echo $args[ 'before_widget' ];
56 56
 
57 57
 		if ( ! empty( $title ) ) {
58
-			echo $args['before_title'] . $title . $args['after_title'];
58
+			echo $args[ 'before_title' ] . $title . $args[ 'after_title' ];
59 59
 		}
60 60
 
61 61
 		// Custom action hooks to place content in the widget before the form
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		do_action( 'yikes-mailchimp-after-form-' . $form_id );
72 72
 		do_action( 'yikes-mailchimp-after-form' );
73 73
 
74
-		echo $args['after_widget'];
74
+		echo $args[ 'after_widget' ];
75 75
 	}
76 76
 
77 77
 	// Widget Backend 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		if ( empty( $all_forms ) ) {
82 82
 			?>
83 83
 				<section class="no-forms-widget">
84
-				<strong><span class="dashicons dashicons-no-alt no-forms-found-icon"></span><?php echo sprintf( __( 'No forms found. It looks like you need to <a href="%s" title="%s">%s</a>.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ), __( 'Create a form' , 'yikes-inc-easy-mailchimp-extender' ), __( 'create a form' , 'yikes-inc-easy-mailchimp-extender' ) ); ?></strong>
84
+				<strong><span class="dashicons dashicons-no-alt no-forms-found-icon"></span><?php echo sprintf( __( 'No forms found. It looks like you need to <a href="%s" title="%s">%s</a>.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ), __( 'Create a form', 'yikes-inc-easy-mailchimp-extender' ), __( 'create a form', 'yikes-inc-easy-mailchimp-extender' ) ); ?></strong>
85 85
 				</section>
86 86
 			<?php
87 87
 			return;
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 			$submit_text = __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
109 109
 		}
110 110
 
111
-		 if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) == 'invalid_api_key' ) {
111
+		 if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
112 112
 			?>
113
-				<p class="enter-valid-api-error-widget"><strong><?php _e( 'Please enter a valid MailChimp API key to connect your site to MailChimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
113
+				<p class="enter-valid-api-error-widget"><strong><?php _e( 'Please enter a valid MailChimp API key to connect your site to MailChimp.', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
114 114
 			<?php
115 115
 			return;
116 116
 		}
@@ -127,9 +127,9 @@  discard block
 block discarded – undo
127 127
 			<select id="<?php echo $this->get_field_id( 'form_id' ); ?>" name="<?php echo $this->get_field_name( 'form_id' ); ?>" class="widefat">
128 128
 				<?php
129 129
 				// build our array
130
-				foreach( $all_forms as $id => $form ) {
130
+				foreach ( $all_forms as $id => $form ) {
131 131
 					?>
132
-						<option <?php selected( $selected_form , $id ); ?> name="<?php echo $this->get_field_name( 'form_id' ); ?>" value="<?php echo $id; ?>"><?php echo stripslashes( $form['form_name'] ); ?></option>
132
+						<option <?php selected( $selected_form, $id ); ?> name="<?php echo $this->get_field_name( 'form_id' ); ?>" value="<?php echo $id; ?>"><?php echo stripslashes( $form[ 'form_name' ] ); ?></option>
133 133
 					<?php
134 134
 				}
135 135
 				?>
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
 		<p>
140 140
 			<label for="<?php echo $this->get_field_id( 'form_description' ); ?>"><?php _e( 'Display Form Description:' ); ?></label>
141
-			<input class="widefat" id="<?php echo $this->get_field_id( 'form_description' ); ?>" name="<?php echo $this->get_field_name( 'form_description' ); ?>" type="checkbox" value="1" <?php if( isset( $instance['form_description'] ) ) { checked( $instance['form_description'] , 1 ); } ?> />
141
+			<input class="widefat" id="<?php echo $this->get_field_id( 'form_description' ); ?>" name="<?php echo $this->get_field_name( 'form_description' ); ?>" type="checkbox" value="1" <?php if ( isset( $instance[ 'form_description' ] ) ) { checked( $instance[ 'form_description' ], 1 ); } ?> />
142 142
 		</p>
143 143
 
144 144
 		<p>
@@ -151,10 +151,10 @@  discard block
 block discarded – undo
151 151
 	// Updating widget replacing old instances with new
152 152
 	public function update( $new_instance, $old_instance ) {
153 153
 		$instance = array();
154
-		$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
155
-		$instance['form_id'] = $new_instance['form_id'];
156
-		$instance['form_description'] = isset( $new_instance['form_description'] ) ? '1' : '';
157
-		$instance['submit_text'] = ( ! empty( $new_instance['submit_text'] ) ) ? strip_tags( $new_instance['submit_text'] ) : 'Submit';
154
+		$instance[ 'title' ] = ( ! empty( $new_instance[ 'title' ] ) ) ? strip_tags( $new_instance[ 'title' ] ) : '';
155
+		$instance[ 'form_id' ] = $new_instance[ 'form_id' ];
156
+		$instance[ 'form_description' ] = isset( $new_instance[ 'form_description' ] ) ? '1' : '';
157
+		$instance[ 'submit_text' ] = ( ! empty( $new_instance[ 'submit_text' ] ) ) ? strip_tags( $new_instance[ 'submit_text' ] ) : 'Submit';
158 158
 		return $instance;
159 159
 	}
160 160
 	
Please login to merge, or discard this patch.
admin/partials/menu/options.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@  discard block
 block discarded – undo
5 5
 */
6 6
 
7 7
 	/* Get and Store Option Values */
8
-	if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) === 'valid_api_key' ) {
9
-		$api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the MailChimp API" , "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
8
+	if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) === 'valid_api_key' ) {
9
+		$api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the MailChimp API", "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected", 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
10 10
 		$api_error_response = '';
11 11
 	} else {
12
-		$api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span>  ' . __( "Not Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
-		if( get_option( 'yikes-mc-api-invalid-key-response' , '' ) != '' ) {
14
-			$api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response' , '' ) . '</small></p>';
12
+		$api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span>  ' . __( "Not Connected", 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
+		if ( get_option( 'yikes-mc-api-invalid-key-response', '' ) != '' ) {
14
+			$api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response', '' ) . '</small></p>';
15 15
 		} else {
16 16
 			$api_error_response = '';
17 17
 		}
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 	* @since 6.2.2
24 24
 	*
25 25
 	*/
26
-	if ( isset( $_REQUEST['section'] ) ) {
27
-		$_REQUEST['section'] = preg_replace('/[^\w-]/', '', strip_tags ( $_REQUEST['section'] ) );
26
+	if ( isset( $_REQUEST[ 'section' ] ) ) {
27
+		$_REQUEST[ 'section' ] = preg_replace( '/[^\w-]/', '', strip_tags( $_REQUEST[ 'section' ] ) );
28 28
 	}
29 29
 ?>
30 30
 	<!-- Actual Settings Form
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
 	<div class="wrap">
33 33
 
34 34
 		<!-- Freddie Logo -->
35
-		<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - MailChimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
35
+		<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - MailChimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
36 36
 
37
-		<h1>YIKES Easy Forms for MailChimp | <?php if ( isset( $_REQUEST['section'] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST['section'] ) ); } else { echo __( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
37
+		<h1>YIKES Easy Forms for MailChimp | <?php if ( isset( $_REQUEST[ 'section' ] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST[ 'section' ] ) ); } else { echo __( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
38 38
 
39 39
 		<!-- Settings Page Description -->
40
-		<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Easy Forms for MailChimp allows you to painlessly add MailChimp sign up forms to your WordPress site and track user activity with interactive reports.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
40
+		<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Easy Forms for MailChimp allows you to painlessly add MailChimp sign up forms to your WordPress site and track user activity with interactive reports.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
41 41
 		<?php
42 42
 			/* Success Messages on Options Updated */
43
-			if( isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ) {
43
+			if ( isset( $_REQUEST[ 'settings-updated' ] ) && $_REQUEST[ 'settings-updated' ] == 'true' ) {
44 44
 				?>
45 45
 				<div class="updated manage-form-admin-notice">
46 46
 					<p><?php _e( 'Settings successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 				<?php
49 49
 			}
50 50
 			/* MailChimp API Cleared Successfully message */
51
-			if( isset( $_REQUEST['transient-cleared'] ) && $_REQUEST['transient-cleared'] == 'true' ) {
51
+			if ( isset( $_REQUEST[ 'transient-cleared' ] ) && $_REQUEST[ 'transient-cleared' ] == 'true' ) {
52 52
 				?>
53 53
 				<div class="updated manage-form-admin-notice">
54 54
 					<p><?php _e( 'MailChimp API Cache successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 			}
58 58
 			/* Error Log Clear Messages */
59 59
 				/* Success Messages on Options Updated */
60
-				if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'true' ) {
60
+				if ( isset( $_REQUEST[ 'error-log-cleared' ] ) && $_REQUEST[ 'error-log-cleared' ] == 'true' ) {
61 61
 					?>
62 62
 					<div class="updated manage-form-admin-notice">
63 63
 						<p><?php _e( 'Error log successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 					<?php
66 66
 				}
67 67
 				/* MailChimp API Cleared Successfully message */
68
-				if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'false' ) {
68
+				if ( isset( $_REQUEST[ 'error-log-cleared' ] ) && $_REQUEST[ 'error-log-cleared' ] == 'false' ) {
69 69
 					?>
70 70
 					<div class="error manage-form-admin-notice">
71 71
 						<p><?php _e( "Whoops! We've encountered an error while trying to clear the error log. Please refresh the page and try again. If the error persists please get in touch with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -74,28 +74,28 @@  discard block
 block discarded – undo
74 74
 				}
75 75
 
76 76
 				/* Display a success message if our error log was sucessfully created, or display an error if not */
77
-				if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'true' ) {
77
+				if ( isset( $_GET[ 'error_log_created' ] ) && $_GET[ 'error_log_created' ] == 'true' ) {
78 78
 					?>
79 79
 					<div class="updated">
80 80
 						<p><?php _e( 'Error log successfully created. You may now start logging errors.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
81 81
 					</div>
82 82
 					<?php
83
-				} else if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'false' ) {
83
+				} else if ( isset( $_GET[ 'error_log_created' ] ) && $_GET[ 'error_log_created' ] == 'false' ) {
84 84
 					?>
85 85
 					<div class="error">
86
-						<p><?php echo esc_attr( urldecode( $_GET['error_message'] ) , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
86
+						<p><?php echo esc_attr( urldecode( $_GET[ 'error_message' ] ), 'yikes-inc-easy-mailchimp-extender' ); ?></p>
87 87
 					</div>
88 88
 					<?php
89 89
 				}
90 90
 
91 91
 				/* Display a success message if the user successfully imported some forms */
92
-				if( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-forms'] ) && $_GET['import-forms'] == 'true' ) {
92
+				if ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'import-export-forms' && isset( $_GET[ 'import-forms' ] ) && $_GET[ 'import-forms' ] == 'true' ) {
93 93
 					?>
94 94
 					<div class="updated">
95 95
 						<p><?php printf( __( 'Opt-in forms successfully imported. <a href="%s" title="View Forms">View Forms</a>', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
96 96
 					</div>
97 97
 					<?php
98
-				} elseif( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-settings'] ) && $_GET['import-settings'] == 'true' ) {
98
+				} elseif ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'import-export-forms' && isset( $_GET[ 'import-settings' ] ) && $_GET[ 'import-settings' ] == 'true' ) {
99 99
 					?>
100 100
 					<div class="updated">
101 101
 						<p><?php printf( __( 'YIKES Easy Forms for MailChimp settings successfully imported.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
 
117 117
 						<div class="postbox yikes-easy-mc-postbox">
118 118
 
119
-							<?php if( !isset( $_REQUEST['section'] ) || $_REQUEST['section'] == '' ) {
119
+							<?php if ( ! isset( $_REQUEST[ 'section' ] ) || $_REQUEST[ 'section' ] == '' ) {
120 120
 								include YIKES_MC_PATH . 'admin/partials/menu/options-sections/general-settings.php';
121 121
 							} else {
122
-								if( isset( $_REQUEST['addon'] ) && $_REQUEST['addon'] == 'true' ) {
123
-									include apply_filters( 'yikes-mailchimp-'.$_REQUEST['section'].'-options-path' , '' );
122
+								if ( isset( $_REQUEST[ 'addon' ] ) && $_REQUEST[ 'addon' ] == 'true' ) {
123
+									include apply_filters( 'yikes-mailchimp-' . $_REQUEST[ 'section' ] . '-options-path', '' );
124 124
 								} else {
125 125
 									// White list a set of files that are allowed to be included here
126 126
 									$file_base = 'admin/partials/menu/options-sections/';
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
 										$file_base . 'recaptcha-settings.php',
134 134
 									);
135 135
 									// Ensure the included file is allowed and whitelisted above, before including it
136
-									if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php', $acceptable_files ) ) {
137
-										include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php';
136
+									if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST[ 'section' ] . '.php', $acceptable_files ) ) {
137
+										include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST[ 'section' ] . '.php';
138 138
 									} else {
139 139
 										wp_die( esc_attr__( 'Invalid file. If this error persists, please contact support.', 'yikes-inc-easy-mailchimp' ) );
140 140
 									}
Please login to merge, or discard this patch.