Completed
Pull Request — master (#811)
by
unknown
09:59 queued 07:34
created
admin/partials/menu/options-sections/integration-settings.php 1 patch
Braces   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -53,23 +53,23 @@  discard block
 block discarded – undo
53 53
 	);
54 54
 
55 55
 	// Easy Digital Downloads.
56
-	if ( class_exists( 'Easy_Digital_Downloads' ) ) {
56
+	if ( class_exists( 'Easy_Digital_Downloads' ) ) {
57 57
 		$active_plugins['easy_digital_downloads_checkout_form'] = __( 'Easy Digital Downloads Checkout', 'yikes-inc-easy-mailchimp-extender' );
58 58
 	}
59 59
 	// WooCommerce.
60
-	if ( class_exists( 'WooCommerce' ) ) {
60
+	if ( class_exists( 'WooCommerce' ) ) {
61 61
 		$active_plugins['woocommerce_checkout_form'] = __( 'WooCommerce Checkout', 'yikes-inc-easy-mailchimp-extender' );
62 62
 	}
63 63
 	// BuddyPress.
64
-	if ( class_exists( 'BuddyPress' ) ) {
64
+	if ( class_exists( 'BuddyPress' ) ) {
65 65
 		$active_plugins['buddypress_form'] = __( 'BuddyPress Registration', 'yikes-inc-easy-mailchimp-extender' );
66 66
 	}
67 67
 	// bbPress.
68
-	if ( class_exists( 'bbPress' ) ) {
68
+	if ( class_exists( 'bbPress' ) ) {
69 69
 		$active_plugins['bbpress_forms'] = __( 'bbPress', 'yikes-inc-easy-mailchimp-extender' );
70 70
 	}
71 71
 	// Contact Form 7.
72
-	if ( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) {
72
+	if ( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) {
73 73
 		$active_plugins['contact_form_7'] = __( 'Contact Form 7', 'yikes-inc-easy-mailchimp-extender' );
74 74
 	}
75 75
 
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 
82 82
 	<?php
83 83
 	// lets confirm the user has a valid API key stored.
84
-	if ( $this->is_user_mc_api_valid_form( false ) == 'valid' ) {
84
+	if ( $this->is_user_mc_api_valid_form( false ) == 'valid' ) {
85 85
 		$list_data = yikes_get_mc_api_manager()->get_list_handler()->get_lists();
86
-		if ( is_wp_error( $list_data ) ) {
86
+		if ( is_wp_error( $list_data ) ) {
87 87
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
88 88
 			$error_logging->maybe_write_to_log(
89 89
 				$list_data->get_error_code(),
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 				"Integration Settings Page"
92 92
 			);
93 93
 		}
94
-	} else {
94
+	} else {
95 95
 		?>
96 96
 		<div class="inside">
97 97
 			<?php
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 
117 117
 	<ul>
118 118
 		<?php
119
-			if ( ! empty( $active_plugins ) ) {
119
+			if ( ! empty( $active_plugins ) ) {
120 120
 
121
-				foreach( $active_plugins as $class => $value ) {
121
+				foreach( $active_plugins as $class => $value ) {
122 122
 
123 123
 					$checked              = isset( $options[$class]['value'] ) ? 'checked="checked"' : '';
124 124
 					$hidden               = ! isset( $options[$class]['value'] ) ? 'yikes-easy-mc-hidden' : '';
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 								<!-- Associated Lists -->
146 146
 								<div class="checkbox-lists"><strong><?php _e( 'Choose Lists: ', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
147 147
 									<?php
148
-									if ( count( $list_data ) > 0 ) {
148
+									if ( count( $list_data ) > 0 ) {
149 149
 									?>
150 150
 										<?php foreach( $list_data as $list ) { ?>
151 151
 
@@ -163,14 +163,14 @@  discard block
 block discarded – undo
163 163
 
164 164
 											<!-- If interest groups have been selected already, load them here -->
165 165
 											<?php
166
-											if ( in_array( $list['id'], $selected_list ) && $list_interest_groups ) {
166
+											if ( in_array( $list['id'], $selected_list ) && $list_interest_groups ) {
167 167
 												YIKES_Inc_Easy_MailChimp_Process_Ajax::check_list_for_interest_groups( $list['id'], $class, true );
168 168
 											}
169 169
 											?>
170 170
 
171 171
 										<?php } ?>
172 172
 									<?php
173
-								} else {
173
+								} else {
174 174
 									echo '<p class="description no-lists-setup-notice"><strong>' . __( 'You have not setup any lists. Head over to Mailchimp and setup your first list.', 'yikes-inc-easy-mailchimp-extender' ) . '</strong></p>';
175 175
 								}
176 176
 								?>
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 						</li>
194 194
 					<?php
195 195
 			}
196
-		} else {
196
+		} else {
197 197
 			?>
198 198
 				<li>
199 199
 					<?php _e( 'Nothing is active.', 'yikes-inc-easy-mailchimp-extender' ); ?>
Please login to merge, or discard this patch.
admin/class-yikes-inc-easy-mailchimp-extender-admin.php 1 patch
Braces   +240 added lines, -240 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @subpackage Yikes_Inc_Easy_Mailchimp_Forms/admin
10 10
  * @author     YIKES, Inc. <[email protected]>
11 11
  */
12
-class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
12
+class Yikes_Inc_Easy_Mailchimp_Forms_Admin {
13 13
 
14 14
 	/**
15 15
 	 * The ID of this plugin.
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		$yikes_inc_easy_mailchimp_extender,
50 50
 		$version,
51 51
 		Yikes_Inc_Easy_MailChimp_Extender_Form_Interface $form_interface
52
-	) {
52
+	) {
53 53
 		$this->yikes_inc_easy_mailchimp_extender = $yikes_inc_easy_mailchimp_extender;
54 54
 		$this->version                           = $version;
55 55
 		$this->form_interface                    = $form_interface;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 *
61 61
 	 * @author Jeremy Pry
62 62
 	 */
63
-	public function hooks() {
63
+	public function hooks() {
64 64
 
65 65
 		// check for old plugin options and migrate if exist.
66 66
 		add_action( 'admin_menu', array( $this, 'register_admin_pages' ), 11 );
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		/***********************/
102 102
 		/** Create A Form **/
103 103
 		/**********************/
104
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-create-form' ) {
104
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-create-form' ) {
105 105
 
106 106
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_create_form' ) );
107 107
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		/***********************/
111 111
 		/** Delete A Form **/
112 112
 		/**********************/
113
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-delete-form' ) {
113
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-delete-form' ) {
114 114
 
115 115
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_delete_form' ) );
116 116
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		/**********************************/
120 120
 		/** Duplicate/Clone A Form    **/
121 121
 		/********************************/
122
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-duplicate-form' ) {
122
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-duplicate-form' ) {
123 123
 
124 124
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_duplicate_form' ) );
125 125
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 		/*************************************/
129 129
 		/**  Reset Form Impression Stats **/
130 130
 		/***********************************/
131
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-reset-stats' ) {
131
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-reset-stats' ) {
132 132
 
133 133
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_reset_impression_stats' ) );
134 134
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 		/**********************************/
138 138
 		/**         Update A Form        **/
139 139
 		/********************************/
140
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-update-form' ) {
140
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-update-form' ) {
141 141
 
142 142
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_update_form' ) );
143 143
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		/**************************************************/
147 147
 		/**     Clear Store MailChimp Transient Data   **/
148 148
 		/*************************************************/
149
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-clear-transient-data' ) {
149
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-clear-transient-data' ) {
150 150
 
151 151
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_clear_transient_data' ) );
152 152
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		/*******************************************/
156 156
 		/** Remove a user from a mailing list     **/
157 157
 		/*****************************************/
158
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-unsubscribe-user' ) {
158
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-unsubscribe-user' ) {
159 159
 
160 160
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_unsubscribe_user' ) );
161 161
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 		/*******************************************/
165 165
 		/**    Create misisng error log file  **/
166 166
 		/*****************************************/
167
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-create-error-log' ) {
167
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-create-error-log' ) {
168 168
 
169 169
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_create_missing_error_log' ) );
170 170
 
@@ -176,14 +176,14 @@  discard block
 block discarded – undo
176 176
 		add_action( 'admin_head', array( $this, 'add_tinyMCE_buttons' ) );
177 177
 
178 178
 		// pass our lists data to tinyMCE button for use.
179
-		foreach ( array( 'post.php', 'post-new.php' ) as $hook ) {
179
+		foreach ( array( 'post.php', 'post-new.php' ) as $hook ) {
180 180
 
181 181
 			add_action( 'admin_enqueue_scripts', array( $this, 'tinymce_yikes_easy_mc' ) );
182 182
 
183 183
 		}
184 184
 
185 185
 		// display an admin notice for users on PHP < 5.3.
186
-		if ( phpversion() < '5.3' ) {
186
+		if ( phpversion() < '5.3' ) {
187 187
 			add_action( "admin_notices", array( $this, 'display_php_warning' ), 999 );
188 188
 		}
189 189
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		/**************************************************/
197 197
 		/**        Clear MailChimp Error Log Data        **/
198 198
 		/*************************************************/
199
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-clear-error-log' ) {
199
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-clear-error-log' ) {
200 200
 
201 201
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_clear_error_log' ) );
202 202
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 		/*********************************************/
206 206
 		/**        Export MailChimp Opt-in Forms   **/
207 207
 		/*******************************************/
208
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-export-forms' ) {
208
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-export-forms' ) {
209 209
 
210 210
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_export_forms' ) );
211 211
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		/*********************************************/
215 215
 		/**                Export Plugin Settings           **/
216 216
 		/*******************************************/
217
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-export-settings' ) {
217
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-export-settings' ) {
218 218
 
219 219
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_export_plugin_settings' ) );
220 220
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 		/*******************************************/
224 224
 		/**        Import Class Inclusion       **/
225 225
 		/*****************************************/
226
-		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-import-forms' ) {
226
+		if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'yikes-easy-mc-import-forms' ) {
227 227
 
228 228
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_import_forms' ) );
229 229
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 		/*******************************************/
233 233
 		/**    Premium Support Request     **/
234 234
 		/*****************************************/
235
-		if ( isset( $_POST['submit-premium-support-request'] ) ) {
235
+		if ( isset( $_POST['submit-premium-support-request'] ) ) {
236 236
 
237 237
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_premium_support_request' ) );
238 238
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 		/****************************************/
242 242
 		/**    Dismiss Options Migrations        **/
243 243
 		/****************************************/
244
-		if ( isset( $_REQUEST['dismiss_migration_nonce'] ) ) {
244
+		if ( isset( $_REQUEST['dismiss_migration_nonce'] ) ) {
245 245
 
246 246
 			add_action( 'init', array( $this, 'yikes_easy_mailchimp_dismiss_option_migrate' ) );
247 247
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 		 * @ param  array  $links  Pre-existing plugin action links
277 277
 		 * @ return array  $links  New array of plugin actions
278 278
 		 */
279
-		public function easy_forms_plugin_action_links( $links ) {
279
+		public function easy_forms_plugin_action_links( $links ) {
280 280
 			$links[] = '<a href="'. esc_url( get_admin_url(null, 'admin.php?page=yikes-inc-easy-mailchimp-settings') ) .'">' . __( 'Settings', 'yikes-inc-easy-mailchimp-extender' ) . '</a>';
281 281
 			$links[] = '<a href="' . esc_url( 'http://www.yikesplugins.com?utm_source=plugins-page&utm_medium=plugin-row&utm_campaign=admin' ) . '" target="_blank">' . __( 'More plugins by YIKES, Inc.', 'yikes-inc-easy-mailchimp-extender' ) . '</a>';
282 282
 			return $links;
@@ -292,13 +292,13 @@  discard block
 block discarded – undo
292 292
 		 *
293 293
 		 * @return string
294 294
 		 */
295
-		public function yikes_easy_forms_admin_disclaimer( $footer_text ) {
295
+		public function yikes_easy_forms_admin_disclaimer( $footer_text ) {
296 296
 			$page = get_current_screen();
297 297
 			$base = $page->base;
298
-			if ( strpos( $base, 'yikes-inc-easy-mailchimp' ) !== false || strpos( $base, 'yikes-mailchimp' ) !== false ) {
298
+			if ( strpos( $base, 'yikes-inc-easy-mailchimp' ) !== false || strpos( $base, 'yikes-mailchimp' ) !== false ) {
299 299
 				$disclaimer_text = sprintf( '<em>' . __( 'Disclaimer: <strong>Easy Forms for Mailchimp</strong> is in no way endorsed, affiliated or backed by Mailchimp, or its parent company Rocket Science Group.', 'yikes-inc-easy-mailchimp-extender' ), '<a href="https://wordpress.org/support/view/plugin-reviews/give?filter=5#postform" target="_blank" class="give-rating-link" data-rated="' . __( 'Thanks :)', 'yikes-inc-easy-mailchimp-extender' ) . '">', '</a></em>' );
300 300
 				return $disclaimer_text;
301
-			} else {
301
+			} else {
302 302
 				return $footer_text;
303 303
 			}
304 304
 		}
@@ -310,32 +310,32 @@  discard block
 block discarded – undo
310 310
 		*	@since 6.0.0
311 311
 		*	@return	parsed tag content
312 312
 		*/
313
-		public function parse_mailchimp_default_tag( $default_tag ) {
314
-			if ( ! $default_tag || $default_tag == '' ) {
313
+		public function parse_mailchimp_default_tag( $default_tag ) {
314
+			if ( ! $default_tag || $default_tag == '' ) {
315 315
 				return $default_tag;
316 316
 			}
317 317
 			global $post;
318 318
 			// page title.
319
-			if ( $default_tag == '{page_title}' ) {
319
+			if ( $default_tag == '{page_title}' ) {
320 320
 				$default_tag = get_the_title( $post->ID );
321 321
 			}
322 322
 			// page id.
323
-			if ( $default_tag == '{page_id}' ) {
323
+			if ( $default_tag == '{page_id}' ) {
324 324
 				$default_tag = $post->ID;
325 325
 			}
326 326
 			// page url.
327
-			if ( $default_tag == '{page_url}' ) {
327
+			if ( $default_tag == '{page_url}' ) {
328 328
 				$default_tag = get_permalink( $post->ID );
329 329
 			}
330 330
 			// blog name.
331
-			if ( $default_tag == '{blog_name}' ) {
331
+			if ( $default_tag == '{blog_name}' ) {
332 332
 				$default_tag = get_bloginfo( 'name' );
333 333
 			}
334 334
 			// is user logged in.
335
-			if ( $default_tag == '{user_logged_in}' ) {
336
-				if ( is_user_logged_in() ) {
335
+			if ( $default_tag == '{user_logged_in}' ) {
336
+				if ( is_user_logged_in() ) {
337 337
 					$default_tag = 'Registered User';
338
-				} else {
338
+				} else {
339 339
 					$default_tag = 'Guest User';
340 340
 				}
341 341
 			}
@@ -349,21 +349,21 @@  discard block
 block discarded – undo
349 349
 		*	When a user clicks 'Clear Log' on the debug settings page, this funciton
350 350
 		*	is used to clear the data out of our php file.
351 351
 		*/
352
-		public function yikes_easy_mailchimp_clear_error_log() {
352
+		public function yikes_easy_mailchimp_clear_error_log() {
353 353
 
354 354
 			// Get our error log class.
355 355
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
356 356
 
357 357
 			// file put contents $returned error + other data.
358
-			if ( file_exists( $error_logging->error_log_file_path ) ) {
358
+			if ( file_exists( $error_logging->error_log_file_path ) ) {
359 359
 
360 360
 				$clear_log = file_put_contents( $error_logging->error_log_file_path, '' );
361 361
 
362
-				if ( $clear_log === false ) {
362
+				if ( $clear_log === false ) {
363 363
 
364 364
 					// redirect the user to the manage forms page, display error message.
365 365
 					wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings&error-log-cleared=false' ) ) );
366
-				} else {
366
+				} else {
367 367
 
368 368
 					// redirect the user to the manage forms page, display confirmation.
369 369
 					wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings&error-log-cleared=true' ) ) );
@@ -377,13 +377,13 @@  discard block
 block discarded – undo
377 377
 		*	@since 		6.0.0
378 378
 		*	@return 	CSV export file
379 379
 		*/
380
-		public function yikes_easy_mailchimp_export_forms() {
380
+		public function yikes_easy_mailchimp_export_forms() {
381 381
 			// grab our nonce.
382 382
 			$nonce = $_REQUEST['nonce'];
383 383
 			// grab the forms.
384 384
 			$forms = isset( $_REQUEST['yikes_export_forms'] ) ? $_REQUEST['yikes_export_forms'] : array();
385 385
 			// validate nonce.
386
-			if ( ! wp_verify_nonce( $nonce, 'export-forms' ) ) {
386
+			if ( ! wp_verify_nonce( $nonce, 'export-forms' ) ) {
387 387
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
388 388
 			}
389 389
 
@@ -401,11 +401,11 @@  discard block
 block discarded – undo
401 401
 		*	@since 		6.0.0
402 402
 		*	@return 	CSV export file
403 403
 		*/
404
-		public function yikes_easy_mailchimp_export_plugin_settings() {
404
+		public function yikes_easy_mailchimp_export_plugin_settings() {
405 405
 			// grab our nonce
406 406
 			$nonce = $_REQUEST['nonce'];
407 407
 			// validate nonce.
408
-			if ( ! wp_verify_nonce( $nonce, 'export-settings' ) ) {
408
+			if ( ! wp_verify_nonce( $nonce, 'export-settings' ) ) {
409 409
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
410 410
 			}
411 411
 
@@ -421,15 +421,15 @@  discard block
 block discarded – undo
421 421
 		*	Custom import function to import all or specific forms
422 422
 		*	@since 6.0.0
423 423
 		*/
424
-		public function yikes_easy_mailchimp_import_forms() {
424
+		public function yikes_easy_mailchimp_import_forms() {
425 425
 			// grab our nonce.
426 426
 			$nonce = $_REQUEST['nonce'];
427 427
 			// validate nonce.
428
-			if ( ! wp_verify_nonce( $nonce, 'import-forms' ) ) {
428
+			if ( ! wp_verify_nonce( $nonce, 'import-forms' ) ) {
429 429
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
430 430
 			}
431 431
 			// include the export class.
432
-			if ( ! class_exists( 'Yikes_Inc_Easy_MailChimp_Import_Class' ) ) {
432
+			if ( ! class_exists( 'Yikes_Inc_Easy_MailChimp_Import_Class' ) ) {
433 433
 				include_once( YIKES_MC_PATH . 'includes/import-export/yikes-easy-mailchimp-import.class.php' );
434 434
 			}
435 435
 			// run the import function.
@@ -445,9 +445,9 @@  discard block
 block discarded – undo
445 445
 		*	Premium Support Request
446 446
 		*	@since 6.0.0
447 447
 		*/
448
-		public function yikes_easy_mailchimp_premium_support_request() {
448
+		public function yikes_easy_mailchimp_premium_support_request() {
449 449
 
450
-			if ( isset( $_POST['action'] ) && $_POST['action'] != 'yikes-support-request' ) {
450
+			if ( isset( $_POST['action'] ) && $_POST['action'] != 'yikes-support-request' ) {
451 451
 				return __( 'We encountered an error. Please contact the YIKES Inc. support team.', 'yikes-inc-easy-mailchimp-extender' );
452 452
 			}
453 453
 
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 			) );
484 484
 
485 485
 			// Catch the error.
486
-			if ( is_wp_error( $response ) ) {
486
+			if ( is_wp_error( $response ) ) {
487 487
 				wp_send_json_error( $response->getMessage() );
488 488
 			}
489 489
 
@@ -491,9 +491,9 @@  discard block
 block discarded – undo
491 491
 			$response_body = json_decode( wp_remote_retrieve_body( $response ) );
492 492
 		}
493 493
 
494
-		public function get_premium_license( $plugin_slug ) {
494
+		public function get_premium_license( $plugin_slug ) {
495 495
 
496
-			switch( $plugin_slug ) {
496
+			switch( $plugin_slug ) {
497 497
 
498 498
 				case 'form-customizer':
499 499
 					return defined( 'YIKES_CUSTOMIZER_EDD_ITEM_ID' ) ? YIKES_CUSTOMIZER_EDD_ITEM_ID : '';
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 		*
515 515
 		*	@since 6.0.0
516 516
 		**/
517
-		public function yikes_easy_mailchimp_dismiss_option_migrate() {
517
+		public function yikes_easy_mailchimp_dismiss_option_migrate() {
518 518
 			// delete the options and allow the user to manually update things.
519 519
 
520 520
 			// Verify the NONCE is valid.
@@ -532,8 +532,8 @@  discard block
 block discarded – undo
532 532
 		 *
533 533
 		 * @since 6.0.0
534 534
 		 */
535
-		public function load_error_logging_class() {
536
-			if ( get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
535
+		public function load_error_logging_class() {
536
+			if ( get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
537 537
 				// if error logging is enabled we should include our error logging class
538 538
 				/* Generate oure error logging table */
539 539
 				require_once YIKES_MC_PATH . '/includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
@@ -548,21 +548,21 @@  discard block
 block discarded – undo
548 548
 		 *
549 549
 		 * @since v6.0.0
550 550
 		 */
551
-		public function yikes_easy_mailchimp_check_installation_date() {
551
+		public function yikes_easy_mailchimp_check_installation_date() {
552 552
 
553 553
 			// add a new option to store the plugin activation date/time.
554 554
 			// @since v6.0.0.
555 555
 			// this is used to notify the user that they should review after 2 weeks.
556
-			if ( !get_option( 'yikes_easy_mailchimp_activation_date' ) ) {
556
+			if ( !get_option( 'yikes_easy_mailchimp_activation_date' ) ) {
557 557
 				add_option( 'yikes_easy_mailchimp_activation_date', strtotime( "now" ) );
558 558
 			}
559 559
 
560 560
 			$stop_bugging_me = get_option( 'yikes_easy_mailchimp_review_stop_bugging_me' );
561 561
 
562
-			if ( ! $stop_bugging_me ) {
562
+			if ( ! $stop_bugging_me ) {
563 563
 				$install_date = get_option( 'yikes_easy_mailchimp_activation_date' );
564 564
 				$past_date = strtotime( '-14 days' );
565
-				if ( $past_date >= $install_date && current_user_can( 'install_plugins' ) ) {
565
+				if ( $past_date >= $install_date && current_user_can( 'install_plugins' ) ) {
566 566
 					add_action( 'admin_notices', array( $this , 'yikes_easy_mailchimp_display_review_us_notice' ) );
567 567
 				}
568 568
 			}
@@ -574,9 +574,9 @@  discard block
 block discarded – undo
574 574
 			asking for a review, and for user feedback
575 575
 			@since v6.0.0
576 576
 		*/
577
-		public function yikes_easy_mailchimp_display_review_us_notice() {
577
+		public function yikes_easy_mailchimp_display_review_us_notice() {
578 578
 			/* Lets only display our admin notice on YT4WP pages to not annoy the hell out of people :) */
579
-			if ( in_array( get_current_screen()->base , array( 'dashboard', 'post', 'edit' ) ) || strpos( get_current_screen()->base ,'yikes-inc-easy-mailchimp') !== false ) {
579
+			if ( in_array( get_current_screen()->base , array( 'dashboard', 'post', 'edit' ) ) || strpos( get_current_screen()->base ,'yikes-inc-easy-mailchimp') !== false ) {
580 580
 
581 581
 				// The URL of the page the user is currently on 
582 582
 				$current_uri  	  = isset( $_SERVER['REQUEST_URI'] ) && ! empty( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : false;
@@ -619,8 +619,8 @@  discard block
 block discarded – undo
619 619
 			Remove the Review us notification when user clicks 'Dismiss'
620 620
 			@since v3.1.1
621 621
 		*/
622
-		public function yikes_easy_mailchimp_stop_bugging_me() {
623
-			if ( isset( $_GET['yikes_easy_mc_icons_nobug'] ) && (int) filter_var( $_GET['yikes_easy_mc_icons_nobug'], FILTER_SANITIZE_NUMBER_INT ) === 1 ) {
622
+		public function yikes_easy_mailchimp_stop_bugging_me() {
623
+			if ( isset( $_GET['yikes_easy_mc_icons_nobug'] ) && (int) filter_var( $_GET['yikes_easy_mc_icons_nobug'], FILTER_SANITIZE_NUMBER_INT ) === 1 ) {
624 624
 				add_option( 'yikes_easy_mailchimp_review_stop_bugging_me', true );
625 625
 			}
626 626
 		}
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 	/* End Two Week Notification */
629 629
 
630 630
 		/* Display a warning users who are using PHP < 5.3 */
631
-		public function display_php_warning() {
631
+		public function display_php_warning() {
632 632
 			$message = __( 'Easy Forms for Mailchimp requires a minimum of PHP 5.3. The plugin will not function properly until you update. Please reach out to your host provider for assistance.', 'yikes-inc-easy-mailchimp-extender' );
633 633
 			echo "<div class='error'> <p><span class='dashicons dashicons-no-alt' style='color:rgb(231, 98, 98)'></span> $message</p></div>";
634 634
 		}
@@ -638,10 +638,10 @@  discard block
 block discarded – undo
638 638
 	 * TinyMCE Functions
639 639
 	 */
640 640
 	// load our button and pass in the JS form data variable.
641
-	public function add_tinyMCE_buttons() {
641
+	public function add_tinyMCE_buttons() {
642 642
 		global $typenow;
643 643
 		// only on Post Type: post and page.
644
-		if ( ! in_array( $typenow, array( 'post', 'page' ) ) ) {
644
+		if ( ! in_array( $typenow, array( 'post', 'page' ) ) ) {
645 645
 			return;
646 646
 		}
647 647
 		add_filter( 'mce_buttons', array( $this, 'yks_mc_add_tinymce_button' ) );
@@ -649,14 +649,14 @@  discard block
 block discarded – undo
649 649
 	}
650 650
 
651 651
 	// Add the button key for address via JS.
652
-	public function yks_mc_add_tinymce_button( $buttons ) {
652
+	public function yks_mc_add_tinymce_button( $buttons ) {
653 653
 		array_push( $buttons, 'yks_mc_tinymce_button_key' );
654 654
 		// Print all buttons.
655 655
 		return $buttons;
656 656
 	}
657 657
 
658 658
 	// inlcude the js for tinymce.
659
-	public function yks_mc_add_tinymce_plugin( $plugin_array ) {
659
+	public function yks_mc_add_tinymce_plugin( $plugin_array ) {
660 660
 
661 661
 		$plugin_array['yks_mc_tinymce_button'] = plugins_url( '/js/min/yikes-inc-easy-mailchimp-tinymce-button.min.js', __FILE__ );
662 662
 
@@ -668,23 +668,23 @@  discard block
 block discarded – undo
668 668
 		 * Pass our imported list data, to the JS file
669 669
 		 * to build the drop down list in the modal
670 670
 		 */
671
-	public function tinymce_yikes_easy_mc() {
671
+	public function tinymce_yikes_easy_mc() {
672 672
 		// check capabilities.
673
-		if ( ! current_user_can( apply_filters( 'yikes-mailchimp-user-role-access', 'manage_options' ) ) ) {
673
+		if ( ! current_user_can( apply_filters( 'yikes-mailchimp-user-role-access', 'manage_options' ) ) ) {
674 674
 			return;
675 675
 		}
676 676
 
677 677
 		$list_data = $this->form_interface->get_all_forms();
678 678
 		$lists     = array();
679
-		if ( ! empty( $list_data ) ) {
679
+		if ( ! empty( $list_data ) ) {
680 680
 			// build an array to pass to our javascript.
681
-			foreach ( $list_data as $id => $form ) {
681
+			foreach ( $list_data as $id => $form ) {
682 682
 				$lists[] = array(
683 683
 					'text'  => urlencode( $form['form_name'] ),
684 684
 					'value' => $id,
685 685
 				);
686 686
 			}
687
-		} else {
687
+		} else {
688 688
 			$lists[0] = array(
689 689
 				'text'  => __( 'Please Import Some Mailchimp Lists', 'yikes-inc-easy-mailchimp-extender' ),
690 690
 				'value' => '-',
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 	/**
710 710
 	 *  Fix the MailChimp icon spacing in the admin menu.
711 711
 	 */
712
-	public function fix_menu_icon_spacing() {
712
+	public function fix_menu_icon_spacing() {
713 713
 		?>
714 714
 			<style>
715 715
 			a[href="admin.php?page=yikes-inc-easy-mailchimp"] .wp-menu-image img {
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
 	 *
725 725
 	 * @since    6.0.0
726 726
 	 */
727
-	public function enqueue_styles() {
727
+	public function enqueue_styles() {
728 728
 		/**
729 729
 		 *	Enqueue our global dashboard styles.
730 730
 		 */
@@ -733,14 +733,14 @@  discard block
 block discarded – undo
733 733
 		/*
734 734
 		*	Enqueue Add-ons styles.
735 735
 		*/
736
-		if ( get_current_screen()->base == 'easy-forms_page_yikes-inc-easy-mailchimp-addons' ) {
736
+		if ( get_current_screen()->base == 'easy-forms_page_yikes-inc-easy-mailchimp-addons' ) {
737 737
 			wp_enqueue_style( 'yikes-inc-easy-mailchimp-extender-addons-styles', plugin_dir_url( __FILE__ ) . 'css/yikes-inc-easy-mailchimp-extender-addons.min.css', array(), $this->version, 'all' );
738 738
 		}
739 739
 
740 740
 		/*
741 741
 		*	Enqueue Subscriber Profile Flags.
742 742
 		*/
743
-		if ( get_current_screen()->base == 'admin_page_yikes-mailchimp-view-user' ) {
743
+		if ( get_current_screen()->base == 'admin_page_yikes-mailchimp-view-user' ) {
744 744
 			wp_enqueue_style( 'yikes-inc-easy-mailchimp-extender-subscriber-flags', plugin_dir_url( __FILE__ ) . 'css/flag-icon.min.css', array(), $this->version, 'all' );
745 745
 		}
746 746
 	}
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 	 *
750 750
 	 * @since    6.0.0
751 751
 	 */
752
-	public function enqueue_scripts() {
752
+	public function enqueue_scripts() {
753 753
 		wp_enqueue_script( 'yikes-inc-easy-mailchimp-extender-admin-js', plugin_dir_url( __FILE__ ) . 'js/min/yikes-inc-easy-mailchimp-extender-admin.min.js', array( 'jquery', 'jquery-ui-sortable' ), $this->version, false );
754 754
 
755 755
 		$localized_data = array(
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
 
765 765
 		// Enqueue required scripts for the form editor
766 766
 		$screen = get_current_screen();
767
-		if ( ! isset( $screen->base ) || 'admin_page_yikes-mailchimp-edit-form' !== $screen->base ) {
767
+		if ( ! isset( $screen->base ) || 'admin_page_yikes-mailchimp-edit-form' !== $screen->base ) {
768 768
 			return;
769 769
 		}
770 770
 
@@ -812,12 +812,12 @@  discard block
 block discarded – undo
812 812
 	/**
813 813
 	 * Convert the php date format string to a js date format
814 814
 	 */
815
-	public function yikes_jQuery_datepicker_date_format_php_to_js( $sFormat, $type ) {
816
-		switch ( $type ) {
815
+	public function yikes_jQuery_datepicker_date_format_php_to_js( $sFormat, $type ) {
816
+		switch ( $type ) {
817 817
 			default:
818 818
 			case 'date':
819 819
 				// Standard Date Fields
820
-				switch ( $sFormat ) {
820
+				switch ( $sFormat ) {
821 821
 					//Predefined WP date formats
822 822
 					case 'F j, Y':
823 823
 					case 'j F Y':
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
 				break;
841 841
 			// Birthday Fields
842 842
 			case 'birthday':
843
-				switch ( $sFormat ) {
843
+				switch ( $sFormat ) {
844 844
 					//Predefined WP date formats
845 845
 					case 'F j, Y':
846 846
 					case 'j F Y':
@@ -869,8 +869,8 @@  discard block
 block discarded – undo
869 869
 	/**
870 870
 	 * Convert the php date format string to a js date format
871 871
 	 */
872
-	public function yikes_jQuery_datepicker_date_format( $site_option ) {
873
-		switch( $site_option ) {
872
+	public function yikes_jQuery_datepicker_date_format( $site_option ) {
873
+		switch( $site_option ) {
874 874
 			//Predefined WP date formats
875 875
 			default:
876 876
 			case 'F j, Y':
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
 	*	Register our admin pages
891 891
 	*	used to display data back to the user
892 892
 	**/
893
-	public function register_admin_pages() {
893
+	public function register_admin_pages() {
894 894
 
895 895
 		/* Top Level Menu 'Easy MailChimp' */
896 896
 		add_menu_page(
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
 	*	when they click 'Go Pro' in the admin menu
1014 1014
 	*	to do: populate with sales URL
1015 1015
 	*/
1016
-	public function generateAddOnsPage() {
1016
+	public function generateAddOnsPage() {
1017 1017
 		require_once YIKES_MC_PATH . 'admin/partials/menu/add-ons.php'; // include our add-ons page
1018 1018
 	}
1019 1019
 
@@ -1022,7 +1022,7 @@  discard block
 block discarded – undo
1022 1022
 	*
1023 1023
 	* @since    1.0.0
1024 1024
 	*/
1025
-	function generateManageFormsPage() {
1025
+	function generateManageFormsPage() {
1026 1026
 		require_once YIKES_MC_PATH . 'admin/partials/menu/manage-forms.php'; // include our manage forms page
1027 1027
 	}
1028 1028
 
@@ -1031,7 +1031,7 @@  discard block
 block discarded – undo
1031 1031
 	*
1032 1032
 	* @since    1.0.0
1033 1033
 	*/
1034
-	function generateManageListsPage() {
1034
+	function generateManageListsPage() {
1035 1035
 		require_once YIKES_MC_PATH . 'admin/partials/menu/manage-lists.php'; // include our lists page
1036 1036
 	}
1037 1037
 
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 	*
1041 1041
 	* @since    1.0.0
1042 1042
 	*/
1043
-	function generateSupportPage() {
1043
+	function generateSupportPage() {
1044 1044
 
1045 1045
 		wp_enqueue_script( 'yikes-inc-easy-mailchimp-extender-support-scripts', plugin_dir_url( __FILE__ ) . 'js/support.js', array( 'jquery' ), $this->version, false );	
1046 1046
 		require_once YIKES_MC_PATH . 'admin/partials/menu/support.php';
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
 	*
1052 1052
 	* @since    1.0.0
1053 1053
 	*/
1054
-	function generateEditFormPage() {
1054
+	function generateEditFormPage() {
1055 1055
 		require_once YIKES_MC_PATH . 'admin/partials/edit-form.php'; // include our options page
1056 1056
 	}
1057 1057
 
@@ -1060,7 +1060,7 @@  discard block
 block discarded – undo
1060 1060
 	*
1061 1061
 	* @since    1.0.0
1062 1062
 	*/
1063
-	function generateViewListPage() {
1063
+	function generateViewListPage() {
1064 1064
 		require_once YIKES_MC_PATH . 'admin/partials/view-list.php'; // include our options page
1065 1065
 	}
1066 1066
 
@@ -1069,7 +1069,7 @@  discard block
 block discarded – undo
1069 1069
 	*
1070 1070
 	* @since    1.0.0
1071 1071
 	*/
1072
-	function generateViewUserPage() {
1072
+	function generateViewUserPage() {
1073 1073
 		require_once YIKES_MC_PATH . 'admin/partials/view-user.php'; // include our options page
1074 1074
 	}
1075 1075
 
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
 	*
1079 1079
 	* @since v.5.4
1080 1080
 	**/
1081
-	function yikes_easy_mc_settings_init() {
1081
+	function yikes_easy_mc_settings_init() {
1082 1082
 
1083 1083
 		/* Register General Settings Section */
1084 1084
 
@@ -1198,27 +1198,27 @@  discard block
 block discarded – undo
1198 1198
 	*	Options Sanitization & Validation
1199 1199
 	*	@since complete re-write
1200 1200
 	**/
1201
-	function yikes_mc_validate_api_key( $input ) {
1202
-		if ( $input === '' ) {
1201
+	function yikes_mc_validate_api_key( $input ) {
1202
+		if ( $input === '' ) {
1203 1203
 			update_option( 'yikes-mc-api-validation', 'invalid_api_key' );
1204 1204
 			return '';
1205 1205
 		}
1206 1206
 		$api_key = strip_tags ( trim( $input ) );
1207 1207
 		$dash_position = strpos( trim( $input ), '-' );
1208
-		if ( $dash_position !== false ) {
1208
+		if ( $dash_position !== false ) {
1209 1209
 			$manager = new Yikes_Inc_Easy_MailChimp_API_Manager( $api_key );
1210
-		} else {
1210
+		} else {
1211 1211
 			update_option( 'yikes-mc-api-invalid-key-response', __( 'Your API key appears to be invalid.', 'yikes-inc-easy-mailchimp-extender' ) );
1212 1212
 			update_option( 'yikes-mc-api-validation', 'invalid_api_key' );
1213 1213
 			return $api_key;
1214 1214
 		}
1215 1215
 
1216 1216
 		$response = $manager->get_account_handler()->get_account( false );
1217
-		if ( ! is_wp_error( $response ) ) {
1217
+		if ( ! is_wp_error( $response ) ) {
1218 1218
 			update_option( 'yikes-mc-api-validation', 'valid_api_key' );
1219 1219
 				// Clear the API key transient data
1220 1220
 			$this->delete_yikes_mailchimp_transients();
1221
-		}  else {
1221
+		} else {
1222 1222
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
1223 1223
 			$error_logging->yikes_easy_mailchimp_write_to_error_log( $response->get_error_message() , __( "Connecting to Mailchimp" , 'yikes-inc-easy-mailchimp-extender' ) , __( "Settings Page/General Settings" , 'yikes-inc-easy-mailchimp-extender' ) );
1224 1224
 			update_option( 'yikes-mc-api-invalid-key-response', $response->get_error_message() );
@@ -1233,7 +1233,7 @@  discard block
 block discarded – undo
1233 1233
 	*
1234 1234
 	* @since    1.0.0
1235 1235
 	*/
1236
-	function generatePageOptions() {
1236
+	function generatePageOptions() {
1237 1237
 		require_once YIKES_MC_PATH . 'admin/partials/menu/options.php'; // include our options page
1238 1238
 	}
1239 1239
 
@@ -1243,15 +1243,15 @@  discard block
 block discarded – undo
1243 1243
 	*	to form fields. (input, dropdowns, buttons etc.)
1244 1244
 	* 	@since v5.5 re-write
1245 1245
 	**/
1246
-	public function is_user_mc_api_valid_form( $echo = true ) {
1247
-		if ( $echo == true ) {
1248
-			if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
1246
+	public function is_user_mc_api_valid_form( $echo = true ) {
1247
+		if ( $echo == true ) {
1248
+			if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
1249 1249
 				echo 'disabled="disabled"';
1250 1250
 			}
1251
-		} else {
1252
-			if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
1251
+		} else {
1252
+			if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
1253 1253
 				return false;
1254
-			} else {
1254
+			} else {
1255 1255
 				return true;
1256 1256
 			}
1257 1257
 		}
@@ -1266,11 +1266,11 @@  discard block
 block discarded – undo
1266 1266
 	 * @param      string    $yikes_inc_easy_mailchimp_extender       The name of this plugin.
1267 1267
 	 * @param      string    $version    The version of this plugin.
1268 1268
 	 */
1269
-	public function check_for_old_yks_mc_options() {
1269
+	public function check_for_old_yks_mc_options() {
1270 1270
 		$old_plugin_options = get_option( 'ykseme_storage' );
1271 1271
 		// only perform options migrations if the site is not a multi-site setup
1272
-		if ( !is_multisite() ) {
1273
-			if ( apply_filters( 'yikes_mc_old_options_filter', $old_plugin_options ) ) {
1272
+		if ( !is_multisite() ) {
1273
+			if ( apply_filters( 'yikes_mc_old_options_filter', $old_plugin_options ) ) {
1274 1274
 				// display a notice to the user that they should 'migrate'
1275 1275
 				// from the old plugin settings to the new ones
1276 1276
 				add_action( 'admin_notices', array( $this , 'display_options_migrate_notice' ) , 11 );
@@ -1283,7 +1283,7 @@  discard block
 block discarded – undo
1283 1283
 	 * moving from 5.5 and beyond..
1284 1284
 	 * @since
1285 1285
 	*/
1286
-	public function migrate_old_yks_mc_options() {
1286
+	public function migrate_old_yks_mc_options() {
1287 1287
 		// include our migrate options helper file
1288 1288
 		include_once YIKES_MC_PATH . 'admin/partials/upgrade-helpers/upgrade-migrate-options.php';
1289 1289
 	}
@@ -1302,15 +1302,15 @@  discard block
 block discarded – undo
1302 1302
 		 * @param      string    $yikes_inc_easy_mailchimp_extender       The name of this plugin.
1303 1303
 		 * @param      string    $version    The version of this plugin.
1304 1304
 		 */
1305
-		public function display_options_migrate_notice() {
1305
+		public function display_options_migrate_notice() {
1306 1306
 
1307 1307
 			// Confirm that the necessary forms table in the database exists, else bail
1308 1308
 			global $wpdb;
1309
-			if ( $wpdb->get_var("show tables like '" . $wpdb->prefix . "yikes_easy_mc_forms'") != $wpdb->prefix . "yikes_easy_mc_forms" ) {
1309
+			if ( $wpdb->get_var("show tables like '" . $wpdb->prefix . "yikes_easy_mc_forms'") != $wpdb->prefix . "yikes_easy_mc_forms" ) {
1310 1310
 				return;
1311 1311
 			}
1312 1312
 
1313
-			if ( isset( $_GET['yikes-mc-options-migration-dismissed'] ) && $_GET['yikes-mc-options-migration-dismissed'] == 'true' ) {
1313
+			if ( isset( $_GET['yikes-mc-options-migration-dismissed'] ) && $_GET['yikes-mc-options-migration-dismissed'] == 'true' ) {
1314 1314
 					// Delete the options, start a-new! (this will disable the migration notice altogether)
1315 1315
 					delete_option( 'widget_yikes_mc_widget' );
1316 1316
 					delete_option( 'api_validation' );
@@ -1321,7 +1321,7 @@  discard block
 block discarded – undo
1321 1321
 						<p><?php printf( __( "The previously stored options for %s have been cleared from the database. You should update the plugin options on the <a href='%s' title='Settings Page'>settings page</a> before continuing. You should also update the shortcodes used to generate your forms, and any widgets you may have previously set-up.", 'yikes-inc-easy-mailchimp-extender' ), '<strong>Us Easy Forms for Mailchimp</strong>', admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings' ) ); ?></p>
1322 1322
 					</div>
1323 1323
 				<?php
1324
-			} else {
1324
+			} else {
1325 1325
 			?>
1326 1326
 				<div class="yikes-easy-mc-updated migrate-options-notice">
1327 1327
 					<p><?php printf( __( "It looks like you're upgrading from a previous version of %s.", 'yikes-inc-easy-mailchimp-extender' ), '<strong>Us Easy Forms for Mailchimp</strong>' ); ?> <?php printf( __( "In the newest version of %s, the options data structure has changed. We've also moved the mailing lists into its own database table to allow for some higher level customization. Now you can easily create multiple forms and assign them to the same mailing list." , 'yikes-inc-easy-mailchimp-extender' ), '<strong>Us Easy Forms for Mailchimp</strong>' ); ?></p>
@@ -1349,9 +1349,9 @@  discard block
 block discarded – undo
1349 1349
 		*	and return the index ( used to find the list name assigned to a form )
1350 1350
 		*	- http://stackoverflow.com/questions/6661530/php-multi-dimensional-array-search
1351 1351
 		*/
1352
-		function findMCListID($id, $array) {
1353
-		   foreach ($array as $key => $val) {
1354
-			   if ($val['id'] === $id) {
1352
+		function findMCListID($id, $array) {
1353
+		   foreach ($array as $key => $val) {
1354
+			   if ($val['id'] === $id) {
1355 1355
 				   return $key;
1356 1356
 			   }
1357 1357
 		   }
@@ -1359,14 +1359,14 @@  discard block
 block discarded – undo
1359 1359
 		} // end
1360 1360
 
1361 1361
 		/* Ajax Migrate Options */
1362
-		function migrate_archived_options() {
1362
+		function migrate_archived_options() {
1363 1363
 			// all options prefixed with 'yikes-mc-'
1364 1364
 			$option_name = 'yikes-mc-'.$_POST['option_name'];
1365 1365
 			$option_value = $_POST['option_value'];
1366
-			if ( json_decode( $option_value ) ) {
1366
+			if ( json_decode( $option_value ) ) {
1367 1367
 				// decode our lists() array, and store it
1368 1368
 				$opt_value = json_decode( $option_value, true );
1369
-			} else {
1369
+			} else {
1370 1370
 				$opt_value = $option_value;
1371 1371
 			}
1372 1372
 			update_option( $option_name, $opt_value );
@@ -1375,12 +1375,12 @@  discard block
 block discarded – undo
1375 1375
 		}
1376 1376
 
1377 1377
 		/* Ajax Migrate Forms */
1378
-		function migrate_previously_setup_forms() {
1378
+		function migrate_previously_setup_forms() {
1379 1379
 			$option_name = $_POST['option_name'];
1380 1380
 			$done = $_POST['done_import'];
1381 1381
 			// Create some starter forms for the user
1382 1382
 			// based on previously imported lists (to our old version)
1383
-			if ( $option_name == 'yikes-mc-lists' ) {
1383
+			if ( $option_name == 'yikes-mc-lists' ) {
1384 1384
 				$option_value = $_POST['option_value'];
1385 1385
 				$new_options = json_decode( stripslashes_deep( $option_value ) , true );
1386 1386
 
@@ -1412,9 +1412,9 @@  discard block
 block discarded – undo
1412 1412
 					'custom_fields'           => '',
1413 1413
 				) );
1414 1414
 			}
1415
-			if ( $done == 'done' ) {
1415
+			if ( $done == 'done' ) {
1416 1416
 				wp_send_json( array( 'form_name' => $form_name, 'completed_import' => true ) );
1417
-			} else {
1417
+			} else {
1418 1418
 				wp_send_json( array( 'form_name' => $form_name, 'completed_import' => false ) );
1419 1419
 			}
1420 1420
 			wp_die();
@@ -1426,8 +1426,8 @@  discard block
 block discarded – undo
1426 1426
 		*	Render our sidebar menu on all of the setings pages (general, form, checkbox, recaptcha, popup, debug etc. )
1427 1427
 		*	@since v5.6 - complete re-write
1428 1428
 		*/
1429
-		public function generate_options_pages_sidebar_menu() {
1430
-			if ( isset( $_REQUEST['section'] ) ) {
1429
+		public function generate_options_pages_sidebar_menu() {
1430
+			if ( isset( $_REQUEST['section'] ) ) {
1431 1431
 				$selected = $_REQUEST['section'];
1432 1432
 			}
1433 1433
 			$installed_addons = get_option( 'yikes-easy-mc-active-addons', array() );
@@ -1454,13 +1454,13 @@  discard block
 block discarded – undo
1454 1454
 					</ul>
1455 1455
 					<?php
1456 1456
 						// create our add-on settings pages
1457
-						if ( !empty( $installed_addons ) ) {
1457
+						if ( !empty( $installed_addons ) ) {
1458 1458
 							?>
1459 1459
 							<hr class="add-on-settings-divider" />
1460 1460
 							<strong><?php _e( 'Addon Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
1461 1461
 							<ul id="addon-settings-nav">
1462 1462
 							<?php
1463
-							foreach( $installed_addons as $addon_name ) {
1463
+							foreach( $installed_addons as $addon_name ) {
1464 1464
 								?>
1465 1465
 									<li>
1466 1466
 										<?php if ( isset( $_REQUEST['section'] ) && $_REQUEST['section'] ==  $addon_name ) { ?><div class="option-menu-selected-arrow"></div><?php } ?><a href="<?php echo esc_url_raw( add_query_arg( array( 'section' => $addon_name, 'addon' => 'true' ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section='.$addon_name ) ) ); ?>"><?php echo ucwords( str_replace( '-', ' ', $addon_name ) ); ?></a></li>
@@ -1480,7 +1480,7 @@  discard block
 block discarded – undo
1480 1480
 		*	Render our sidebar menu on all of the setings pages (general, form, checkbox, recaptcha, popup, debug etc. )
1481 1481
 		*	@since v5.6 - complete re-write
1482 1482
 		*/
1483
-		public function generate_manage_forms_sidebar( $lists ) {
1483
+		public function generate_manage_forms_sidebar( $lists ) {
1484 1484
 			// create a custom URL to allow for creating fields
1485 1485
 			$url = esc_url_raw(
1486 1486
 				add_query_arg(
@@ -1511,18 +1511,18 @@  discard block
 block discarded – undo
1511 1511
 					<label for="associated-list"><strong><?php _e( 'Associated List', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
1512 1512
 						<select name="associated-list" id="associated-list" class=" input-field" <?php $this->is_user_mc_api_valid_form( true ); disabled( true, empty( $lists ) ); ?>>
1513 1513
 							<?php
1514
-							if ( ! empty( $lists ) ) {
1515
-								foreach( $lists as $mailing_list ) {
1514
+							if ( ! empty( $lists ) ) {
1515
+								foreach( $lists as $mailing_list ) {
1516 1516
 									?>
1517 1517
 									<option value="<?php echo $mailing_list['id']; ?>"><?php echo stripslashes( $mailing_list['name'] ) . ' (' . $mailing_list['stats']['member_count'] . ') '; ?></option>
1518 1518
 									<?php
1519 1519
 								}
1520
-							} else {
1521
-								if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
1520
+							} else {
1521
+								if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
1522 1522
 									?>
1523 1523
 									<option><?php echo __( "Please enter a valid API key." , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
1524 1524
 									<?php
1525
-								} else {
1525
+								} else {
1526 1526
 									?>
1527 1527
 									<option><?php echo __( "No lists were found on the account." , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
1528 1528
 									<?php
@@ -1533,8 +1533,8 @@  discard block
 block discarded – undo
1533 1533
 						</select>
1534 1534
 
1535 1535
 						<?php
1536
-						if ( isset( $_GET['transient-cleared'] ) ) {
1537
-							if ( 'true' === $_GET['transient-cleared'] ) {
1536
+						if ( isset( $_GET['transient-cleared'] ) ) {
1537
+							if ( 'true' === $_GET['transient-cleared'] ) {
1538 1538
 								?>
1539 1539
 								<div class="yikes-list-refreshed-notice">
1540 1540
 									<p><?php esc_attr_e( 'Mailchimp list data has been succesfully refreshed.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -1543,8 +1543,8 @@  discard block
 block discarded – undo
1543 1543
 							}
1544 1544
 						}
1545 1545
 
1546
-						if ( isset( $lists ) && empty( $lists ) ) {
1547
-							if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) != 'invalid_api_key' ) {
1546
+						if ( isset( $lists ) && empty( $lists ) ) {
1547
+							if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) != 'invalid_api_key' ) {
1548 1548
 								?>
1549 1549
 									<p class="description">
1550 1550
 										<?php printf( __( 'Head over to <a href="http://www.Mailchimp.com" title="%s">Mailchimp</a> to create a new list.', 'yikes-inc-easy-mailchimp-extender' ) , __( 'Create a list', 'yikes-inc-easy-mailchimp-extender' ) ); ?>
@@ -1555,9 +1555,9 @@  discard block
 block discarded – undo
1555 1555
 						?>
1556 1556
 					</label>
1557 1557
 					<?php
1558
-						if ( $this->is_user_mc_api_valid_form( false ) ) {
1558
+						if ( $this->is_user_mc_api_valid_form( false ) ) {
1559 1559
 							echo submit_button( __( 'Create', 'yikes-inc-easy-mailchimp-extender' ) , 'primary', '', false , array( 'style' => 'margin:.75em 0 .5em 0;' ) );
1560
-						} else {
1560
+						} else {
1561 1561
 							echo '<p class="description">' . __( "Please enter a valid Mailchimp API key to get started." , 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
1562 1562
 							?>
1563 1563
 								<a href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&settings-updated=true' ) ); ?>"><?php _e( 'general settings', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
@@ -1568,7 +1568,7 @@  discard block
 block discarded – undo
1568 1568
 
1569 1569
 				<!-- Clear API CACHE -->
1570 1570
 				<?php
1571
-				if ( isset( $lists ) && ! empty( $lists ) ) {
1571
+				if ( isset( $lists ) && ! empty( $lists ) ) {
1572 1572
 					if ( false !== get_transient( 'yikes-easy-mailchimp-list-data' ) ) { ?>
1573 1573
 						<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data', 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" method="post">
1574 1574
 							<input type="submit" class="button-secondary clear-mailchimp-api-cache" value="<?php _e( 'Refresh Lists', 'yikes-inc-easy-mailchimp-extender' ); ?>" />
@@ -1584,7 +1584,7 @@  discard block
 block discarded – undo
1584 1584
 		*	Generate a dropdown of post and pages
1585 1585
 		*	so the user can send the user to on form submission
1586 1586
 		*/
1587
-		public function generate_page_redirect_dropdown( $redirect, $redirect_page, $custom_redirect_url ) {
1587
+		public function generate_page_redirect_dropdown( $redirect, $redirect_page, $custom_redirect_url ) {
1588 1588
 				$post_types = get_post_types();
1589 1589
 				?>
1590 1590
 				<label id="redirect-user-to-selection-label" for="redirect-user-to-selection" class="<?php if ( $redirect == '0' ) { echo 'yikes-easy-mc-hidden'; } ?>">
@@ -1604,10 +1604,10 @@  discard block
 block discarded – undo
1604 1604
 					$excluded_post_types = apply_filters( 'yikes-mailchimp-excluded-redirect-post-types', $excluded_post_types );
1605 1605
 
1606 1606
 						// loop over registered post types, and query!
1607
-						foreach( $post_types as $registered_post_type ) {
1607
+						foreach( $post_types as $registered_post_type ) {
1608 1608
 
1609 1609
 							// exclude a few built in custom post types and any defined by the filter
1610
-							if ( ! in_array( $registered_post_type, $excluded_post_types ) ) {
1610
+							if ( ! in_array( $registered_post_type, $excluded_post_types ) ) {
1611 1611
 
1612 1612
 								// Grab only the post IDs - in the past we've created timeout issues on some servers with lots of posts
1613 1613
 								$wp_query_args = array(
@@ -1622,11 +1622,11 @@  discard block
 block discarded – undo
1622 1622
 
1623 1623
 								$post_ids = ! empty( $wp_query_result->posts ) ? $wp_query_result->posts : array();
1624 1624
 
1625
-								if ( ! empty ( $post_ids ) ) {
1625
+								if ( ! empty ( $post_ids ) ) {
1626 1626
 									?>
1627 1627
 										<optgroup label="<?php echo ucwords( str_replace( '_', ' ', $registered_post_type ) ); ?>">
1628 1628
 									<?php
1629
-											foreach( $post_ids as $post_id ) {
1629
+											foreach( $post_ids as $post_id ) {
1630 1630
 												?><option <?php selected( $redirect_page , $post_id ); ?> value="<?php echo $post_id; ?>"><?php echo get_the_title( $post_id ) ?></option><?php
1631 1631
 											}
1632 1632
 									?>
@@ -1657,15 +1657,15 @@  discard block
 block discarded – undo
1657 1657
 		*
1658 1658
 		* 	Displayed in sidebars
1659 1659
 		*/
1660
-		public function generate_show_some_love_container() {
1660
+		public function generate_show_some_love_container() {
1661 1661
 			// if no active add-ons are installed,
1662 1662
 			// lets display our branding and add-on sidebar
1663 1663
 			$options = get_option( 'yikes-easy-mc-active-addons', array() );
1664
-			if ( empty( $options ) ) {
1664
+			if ( empty( $options ) ) {
1665 1665
 
1666 1666
 				/* On Edit Forms Page Display Upsell to Customizer */
1667 1667
 				$screen = get_current_screen();
1668
-				if ( isset( $screen ) && $screen->base == 'admin_page_yikes-mailchimp-edit-form' ) {
1668
+				if ( isset( $screen ) && $screen->base == 'admin_page_yikes-mailchimp-edit-form' ) {
1669 1669
 				?>
1670 1670
 
1671 1671
 					<div class="postbox yikes-easy-mc-postbox show-some-love-container">
@@ -1743,18 +1743,18 @@  discard block
 block discarded – undo
1743 1743
 		*	-
1744 1744
 		* @parameters - $list_id - pass in the list ID to retreive merge variables from
1745 1745
 		*/
1746
-		public function generate_form_editor( $form_fields, $list_id, $merge_variables, $interest_groups ) {
1746
+		public function generate_form_editor( $form_fields, $list_id, $merge_variables, $interest_groups ) {
1747 1747
 
1748 1748
 			// if no list id, die!
1749
-			if ( ! $list_id ) {
1749
+			if ( ! $list_id ) {
1750 1750
 				wp_die( __( "We've encountered an error. No list ID was sent." , 'yikes-inc-easy-mailchimp-extender' ) );
1751 1751
 			}
1752 1752
 
1753
-			if ( ! $merge_variables ) {
1753
+			if ( ! $merge_variables ) {
1754 1754
 				wp_die( __( "We've encountered an error. Reload the page and try again. If the error persists, please reach out to support." , 'yikes-inc-easy-mailchimp-extender' ) );
1755 1755
 			}
1756 1756
 
1757
-			if ( ! empty( $form_fields ) ) {
1757
+			if ( ! empty( $form_fields ) ) {
1758 1758
 
1759 1759
 				// find any fields that are assigned to this form, that don't exist in MailChimp
1760 1760
 				// or else were going to run into issues when we submit the form
@@ -1766,18 +1766,18 @@  discard block
 block discarded – undo
1766 1766
 				$mailchimp_merge_field_ids	= array();
1767 1767
 
1768 1768
 				// loop over merge variables
1769
-				if ( ! empty( $merge_variables['merge_fields'] ) ) {
1769
+				if ( ! empty( $merge_variables['merge_fields'] ) ) {
1770 1770
 					$available_merge_variables = wp_list_pluck( $merge_variables['merge_fields'], 'tag' );
1771 1771
 					$mailchimp_merge_field_ids = wp_list_pluck( $merge_variables['merge_fields'], 'merge_id' );
1772 1772
 					
1773 1773
 					// Array will look like $merge_tag => $merge_id
1774
-					foreach( $available_merge_variables as $index => $merge_tag ) { 
1774
+					foreach( $available_merge_variables as $index => $merge_tag ) {
1775 1775
 						$merge_field_ids[$merge_tag] = $mailchimp_merge_field_ids[$index];
1776 1776
 					}
1777 1777
 				}
1778 1778
 
1779 1779
 				// loop over interest groups
1780
-				if ( ! empty( $interest_groups ) ) {
1780
+				if ( ! empty( $interest_groups ) ) {
1781 1781
 					$available_interest_groups = array_keys( $interest_groups );
1782 1782
 				}
1783 1783
 
@@ -1787,9 +1787,9 @@  discard block
 block discarded – undo
1787 1787
 				$excluded_fields = array_diff( $assigned_fields, $merged_fields );
1788 1788
 
1789 1789
 				$i = 1;
1790
-				foreach( $form_fields as $field ) {
1790
+				foreach( $form_fields as $field ) {
1791 1791
 
1792
-					if ( isset( $field['merge'] ) ) {
1792
+					if ( isset( $field['merge'] ) ) {
1793 1793
 						// @todo: don't use in_array()
1794 1794
 						$excluded_field = in_array( $field['merge'], $excluded_fields, true );
1795 1795
 						?>
@@ -1823,7 +1823,7 @@  discard block
 block discarded – undo
1823 1823
 									<input type="hidden" class="yikes-mc-merge-field-id" name="field[<?php echo $field['merge']; ?>][id]" value="<?php echo $merge_field_ids[ $field['merge'] ] ?>" />  
1824 1824
 								<?php } ?>
1825 1825
 
1826
-								<?php if ( $field['type'] == 'radio' || $field['type'] == 'dropdown' || $field['type'] == 'select' ) {
1826
+								<?php if ( $field['type'] == 'radio' || $field['type'] == 'dropdown' || $field['type'] == 'select' ) {
1827 1827
 									$choices = json_decode( $field['choices'], true );
1828 1828
 								?>
1829 1829
 									<input type="hidden" name="field[<?php echo $field['merge']; ?>][choices]" value='<?php echo esc_attr( json_encode( $choices ) ); ?>' />
@@ -1847,7 +1847,7 @@  discard block
 block discarded – undo
1847 1847
 										</tr>
1848 1848
 
1849 1849
 										<!-- Placeholder Value -->
1850
-										<?php switch( $field['type'] ) {
1850
+										<?php switch( $field['type'] ) {
1851 1851
 
1852 1852
 											case 'text':
1853 1853
 											case 'email':
@@ -1894,7 +1894,7 @@  discard block
 block discarded – undo
1894 1894
 										?>
1895 1895
 
1896 1896
 										<!-- Default Value -->
1897
-										<?php switch( $field['type'] ) {
1897
+										<?php switch( $field['type'] ) {
1898 1898
 											default:
1899 1899
 											case 'text':
1900 1900
 											case 'number':
@@ -1910,7 +1910,7 @@  discard block
 block discarded – undo
1910 1910
 													<input id="default_value_<?php echo esc_attr( $field['merge'] ); ?>" <?php if ( $field['type'] != 'number' ) { ?> type="text" <?php } else { ?> type="number" <?php } ?> class="widefat" name="field[<?php echo $field['merge']; ?>][default]" <?php if ( $field['type'] != 'url' ) { ?> value="<?php echo isset( $field['default'] ) ? stripslashes( wp_strip_all_tags( $field['default'] ) ) : ''; ?>" <?php } else { ?> value="<?php echo isset( $field['default'] ) ? stripslashes( wp_strip_all_tags( esc_url_raw( $field['default'] ) ) ) : ''; ?>" <?php } ?> />
1911 1911
 													<p class="description"><small><?php _e( "Assign a default value to populate this field with on initial page load.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
1912 1912
 													<?php
1913
-													switch( $field['type'] ) {
1913
+													switch( $field['type'] ) {
1914 1914
 														case 'text':
1915 1915
 															?>
1916 1916
 																<p><small class="pre-defined-tag-link"><a href="#TB_inline?width=600&height=550&inlineId=pre-defined-tag-container" onclick="storeGlobalClicked( jQuery( this ) );" class="thickbox"><?php _e( 'View Pre-Defined Tags', 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
@@ -2067,7 +2067,7 @@  discard block
 block discarded – undo
2067 2067
 										<!-- Display Phone/Date Formats back to the user -->
2068 2068
 										<!-- Phone Format Initial Load -->
2069 2069
 										<?php
2070
-											switch( $field['type'] ) {
2070
+											switch( $field['type'] ) {
2071 2071
 												/* Store the phone format, for properly regex pattern */
2072 2072
 												case 'phone':
2073 2073
 												case 'birthday':
@@ -2077,7 +2077,7 @@  discard block
 block discarded – undo
2077 2077
 															<td scope="row">
2078 2078
 																<label for="placeholder">
2079 2079
 																	<?php
2080
-																		switch( $field['type'] ) {
2080
+																		switch( $field['type'] ) {
2081 2081
 																			default:
2082 2082
 																			case 'birthday':
2083 2083
 																				$type = __( 'Date Format', 'yikes-inc-easy-mailchimp-extender' );
@@ -2138,7 +2138,7 @@  discard block
 block discarded – undo
2138 2138
 
2139 2139
 
2140 2140
 
2141
-					} else {
2141
+					} else {
2142 2142
 
2143 2143
 						/**** Interest Group ****/
2144 2144
 
@@ -2171,7 +2171,7 @@  discard block
 block discarded – undo
2171 2171
 
2172 2172
 									<table class="form-table form-field-container">
2173 2173
 										<!-- Default Value -->
2174
-										<?php switch( $field['type'] ) {
2174
+										<?php switch( $field['type'] ) {
2175 2175
 											default:
2176 2176
 											case 'radio':
2177 2177
 											case 'checkboxes':
@@ -2188,7 +2188,7 @@  discard block
 block discarded – undo
2188 2188
 
2189 2189
 														$default_shown = false;
2190 2190
 
2191
-														foreach ( json_decode( $field['groups'], true ) as $id => $group ) {
2191
+														foreach ( json_decode( $field['groups'], true ) as $id => $group ) {
2192 2192
 															$field_id   = "{$field['group_id']}-{$id}";
2193 2193
 															$field_type = 'hidden' == $field['type'] ? 'checkbox' : $field['type'];
2194 2194
 															$field_type = 'checkboxes' == $field_type ? 'checkbox' : $field_type;
@@ -2197,7 +2197,7 @@  discard block
 block discarded – undo
2197 2197
 
2198 2198
 															// Determine if the current group is checked.
2199 2199
 															$checked = '';
2200
-															switch ( $field_type ) {
2200
+															switch ( $field_type ) {
2201 2201
 																case 'radio':
2202 2202
 																default:
2203 2203
 																	$default = is_array( $field['default_choice'] ) ? current( $field['default_choice'] ) : $field['default_choice'];
@@ -2206,14 +2206,14 @@  discard block
 block discarded – undo
2206 2206
 
2207 2207
 																case 'checkbox':
2208 2208
 																case 'hidden':
2209
-																	if ( is_array( $field['default_choice'] ) && in_array( $id, $field['default_choice'] ) ) {
2209
+																	if ( is_array( $field['default_choice'] ) && in_array( $id, $field['default_choice'] ) ) {
2210 2210
 																		$checked = checked( true, true, false );
2211 2211
 																	}
2212 2212
 																break;
2213 2213
 															}
2214 2214
 
2215 2215
 															// Allow users to not set a default choice for radio buttons.
2216
-															if ( $field_type === 'radio' && $default_shown === false ) {
2216
+															if ( $field_type === 'radio' && $default_shown === false ) {
2217 2217
 																$default_shown = true;
2218 2218
 																?>
2219 2219
 																<label for="<?php echo $field_id . 'no-default'; ?>">
@@ -2366,7 +2366,7 @@  discard block
 block discarded – undo
2366 2366
 						<?php
2367 2367
 					}
2368 2368
 				}
2369
-			} else {
2369
+			} else {
2370 2370
 				?>
2371 2371
 					<h4 class="no-fields-assigned-notice non-draggable-yikes"><em><?php _e( 'No fields are assigned to this form. Select fields from the right hand column to add to this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></em></h4>
2372 2372
 				<?php
@@ -2453,18 +2453,18 @@  discard block
 block discarded – undo
2453 2453
 		 *	-
2454 2454
 		 * @parameters - $list_id - pass in the list ID to retreive merge variables from
2455 2455
 		 */
2456
-		public function build_available_merge_vars( $form_fields, $available_merge_variables ) {
2456
+		public function build_available_merge_vars( $form_fields, $available_merge_variables ) {
2457 2457
 			$fields_assigned_to_form = array();
2458
-			foreach ( $form_fields as $field ) {
2459
-				if ( isset( $field['merge'] ) ) {
2458
+			foreach ( $form_fields as $field ) {
2459
+				if ( isset( $field['merge'] ) ) {
2460 2460
 					$fields_assigned_to_form[ $field['merge'] ] = true;
2461 2461
 				}
2462 2462
 			}
2463 2463
 
2464
-			if ( ! empty( $available_merge_variables['merge_fields'] ) ) {
2464
+			if ( ! empty( $available_merge_variables['merge_fields'] ) ) {
2465 2465
 				?>
2466 2466
 				<ul id="available-fields"><?php
2467
-				foreach ( $available_merge_variables['merge_fields'] as $merge_var ) {
2467
+				foreach ( $available_merge_variables['merge_fields'] as $merge_var ) {
2468 2468
 					$not_available = isset( $fields_assigned_to_form[ $merge_var['tag'] ] );
2469 2469
 					?>
2470 2470
 					<li class="available-field <?php echo $not_available ? 'not-available' : ''; ?>"
@@ -2477,7 +2477,7 @@  discard block
 block discarded – undo
2477 2477
 					>
2478 2478
 						<?php
2479 2479
 							echo esc_html( stripslashes( $merge_var['name'] ) );
2480
-							if ( $merge_var['required'] ) {
2480
+							if ( $merge_var['required'] ) {
2481 2481
 								echo ' <span class="field-required" title="' . __( 'required field', 'yikes-inc-easy-mailchimp-extender' ) . '">*</span>';
2482 2482
 							}
2483 2483
 						?>
@@ -2502,21 +2502,21 @@  discard block
 block discarded – undo
2502 2502
 		 *	-
2503 2503
 		 * @parameters - $list_id - pass in the list ID to retreive merge variables from
2504 2504
 		 */
2505
-		public function build_available_interest_groups( $form_fields, $available_interest_groups, $list_id ) {
2505
+		public function build_available_interest_groups( $form_fields, $available_interest_groups, $list_id ) {
2506 2506
 			$fields_assigned_to_form = array();
2507
-			if ( ! empty( $form_fields ) ) {
2508
-				foreach ( $form_fields as $field ) {
2509
-					if ( isset( $field['group_id'] ) ) {
2507
+			if ( ! empty( $form_fields ) ) {
2508
+				foreach ( $form_fields as $field ) {
2509
+					if ( isset( $field['group_id'] ) ) {
2510 2510
 						$fields_assigned_to_form[ $field['group_id'] ] = true;
2511 2511
 					}
2512 2512
 				}
2513 2513
 			}
2514 2514
 
2515
-			if ( ! empty( $available_interest_groups ) ) {
2515
+			if ( ! empty( $available_interest_groups ) ) {
2516 2516
 			?>
2517 2517
 				<ul id="available-interest-groups">
2518 2518
 				<?php
2519
-					foreach ( $available_interest_groups as $interest_group ) {
2519
+					foreach ( $available_interest_groups as $interest_group ) {
2520 2520
 						$not_available = isset( $fields_assigned_to_form[ $interest_group['id'] ] );
2521 2521
 						?>
2522 2522
 						<li class="available-field <?php echo $not_available ? 'not-available' : ''; ?>" 
@@ -2547,11 +2547,11 @@  discard block
 block discarded – undo
2547 2547
 		/**
2548 2548
 		 * Smt.
2549 2549
 		 */
2550
-		public function build_available_tags( $form_tags, $tags, $list_id ) {
2550
+		public function build_available_tags( $form_tags, $tags, $list_id ) {
2551 2551
 			?>
2552 2552
 			<ul id="available-tags">
2553 2553
 			<?php
2554
-			foreach ( $tags as $tag_id => $tag ) {
2554
+			foreach ( $tags as $tag_id => $tag ) {
2555 2555
 				$not_available = isset( $form_tags[ $tag_id ] );
2556 2556
 				?>
2557 2557
 				<li class="available-field <?php echo $not_available ? 'not-available' : ''; ?>"
@@ -2581,9 +2581,9 @@  discard block
 block discarded – undo
2581 2581
 		*	and include it here for easy maintenance
2582 2582
 		*	- must clean up db tables , ensure what data is going in and what is needed...
2583 2583
 		*/
2584
-		public function yikes_easy_mailchimp_create_form() {
2584
+		public function yikes_easy_mailchimp_create_form() {
2585 2585
 			$nonce = $_REQUEST['nonce'];
2586
-			if ( ! wp_verify_nonce( $nonce, 'create_mailchimp_form' ) ) {
2586
+			if ( ! wp_verify_nonce( $nonce, 'create_mailchimp_form' ) ) {
2587 2587
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) );
2588 2588
 			}
2589 2589
 
@@ -2594,13 +2594,13 @@  discard block
 block discarded – undo
2594 2594
 			) );
2595 2595
 
2596 2596
 			// if an error occurs during the form creation process
2597
-			if ( false == $result ) {
2597
+			if ( false == $result ) {
2598 2598
 				// write it to the error log
2599 2599
 				// if the form was not created successfully
2600 2600
 				$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
2601 2601
 				$error_logging->maybe_write_to_log( __( 'Error creating a new form', 'yikes-inc-easy-mailchimp-extender') , __( "Creating a new form" , 'yikes-inc-easy-mailchimp-extender' ) , __( "Forms" , 'yikes-inc-easy-mailchimp-extender' ) );
2602 2602
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&sql_error=' . urlencode( __( 'Error creating a new form', 'yikes-inc-easy-mailchimp-extender' ) ) ) ) );
2603
-			} else {
2603
+			} else {
2604 2604
 				// redirect the user to the new form edit page
2605 2605
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&id=' . $result) ) );
2606 2606
 			}
@@ -2613,12 +2613,12 @@  discard block
 block discarded – undo
2613 2613
 		*	and include it here for easy maintenance
2614 2614
 		*	- must clean up db tables , ensure what data is going in and what is needed...
2615 2615
 		*/
2616
-		public function yikes_easy_mailchimp_delete_form() {
2616
+		public function yikes_easy_mailchimp_delete_form() {
2617 2617
 			// grab & store our variables ( associated list & form name )
2618 2618
 			$nonce = $_REQUEST['nonce'];
2619 2619
 			$post_id_to_delete = $_REQUEST['mailchimp-form'];
2620 2620
 			// verify our nonce
2621
-			if ( ! wp_verify_nonce( $nonce, 'delete-mailchimp-form-'.$post_id_to_delete ) ) {
2621
+			if ( ! wp_verify_nonce( $nonce, 'delete-mailchimp-form-'.$post_id_to_delete ) ) {
2622 2622
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2623 2623
 			}
2624 2624
 
@@ -2633,12 +2633,12 @@  discard block
 block discarded – undo
2633 2633
 		*	Duplicate an entire form !
2634 2634
 		*	Probably Move these to its own file,
2635 2635
 		*/
2636
-		public function yikes_easy_mailchimp_duplicate_form() {
2636
+		public function yikes_easy_mailchimp_duplicate_form() {
2637 2637
 			// grab & store our variables ( associated list & form name )
2638 2638
 			$nonce = $_REQUEST['nonce'];
2639 2639
 			$post_id_to_clone = $_REQUEST['mailchimp-form'];
2640 2640
 			// verify our nonce
2641
-			if ( ! wp_verify_nonce( $nonce, 'duplicate-mailchimp-form-'.$post_id_to_clone ) ) {
2641
+			if ( ! wp_verify_nonce( $nonce, 'duplicate-mailchimp-form-'.$post_id_to_clone ) ) {
2642 2642
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2643 2643
 			}
2644 2644
 
@@ -2662,10 +2662,10 @@  discard block
 block discarded – undo
2662 2662
 			*/
2663 2663
 			do_action( 'yikes-mailchimp-after-duplicating-form', $post_id_to_clone, $result, $form_data );
2664 2664
 
2665
-			if ( false === $result ) {
2665
+			if ( false === $result ) {
2666 2666
 				// redirect the user to the manage forms page, display error
2667 2667
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp&duplicated-form=false' ) ) );
2668
-			} else {
2668
+			} else {
2669 2669
 				// redirect the user to the manage forms page, display confirmation
2670 2670
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp&duplicated-form=true' ) ) );
2671 2671
 			}
@@ -2676,12 +2676,12 @@  discard block
 block discarded – undo
2676 2676
 		/*
2677 2677
 		*	Reset a forms impression stats
2678 2678
 		*/
2679
-		public function yikes_easy_mailchimp_reset_impression_stats() {
2679
+		public function yikes_easy_mailchimp_reset_impression_stats() {
2680 2680
 			// grab & store our variables ( associated list & form name )
2681 2681
 			$nonce = $_REQUEST['nonce'];
2682 2682
 			$form_id_to_reset = $_REQUEST['mailchimp-form'];
2683 2683
 			// verify our nonce
2684
-			if ( ! wp_verify_nonce( $nonce, 'reset-stats-mailchimp-form-'.$form_id_to_reset ) ) {
2684
+			if ( ! wp_verify_nonce( $nonce, 'reset-stats-mailchimp-form-'.$form_id_to_reset ) ) {
2685 2685
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2686 2686
 			}
2687 2687
 
@@ -2693,10 +2693,10 @@  discard block
 block discarded – undo
2693 2693
 				)
2694 2694
 			);
2695 2695
 
2696
-			if ( false === $result ) {
2696
+			if ( false === $result ) {
2697 2697
 				// redirect the user to the manage forms page, display error
2698 2698
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp&reset-stats=false' ) ) );
2699
-			} else {
2699
+			} else {
2700 2700
 				// redirect the user to the manage forms page, display confirmation
2701 2701
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp&reset-stats=true' ) ) );
2702 2702
 			}
@@ -2708,13 +2708,13 @@  discard block
 block discarded – undo
2708 2708
 		*	Update an entire form !
2709 2709
 		*	Probably Move these to its own file,
2710 2710
 		*/
2711
-		public function yikes_easy_mailchimp_update_form() {
2711
+		public function yikes_easy_mailchimp_update_form() {
2712 2712
 
2713 2713
 			$nonce   = $_REQUEST['nonce'];
2714 2714
 			$form_id = $_REQUEST['id'];
2715 2715
 
2716 2716
 			// verify our nonce
2717
-			if ( ! wp_verify_nonce( $nonce, 'update-mailchimp-form-' . $form_id ) ) {
2717
+			if ( ! wp_verify_nonce( $nonce, 'update-mailchimp-form-' . $form_id ) ) {
2718 2718
 				wp_die(
2719 2719
 					__( "We've run into an error. The security check didn't pass. Please try again.", 'yikes-inc-easy-mailchimp-extender' ),
2720 2720
 					__( "Failed nonce validation", 'yikes-inc-easy-mailchimp-extender' ),
@@ -2787,11 +2787,11 @@  discard block
 block discarded – undo
2787 2787
 
2788 2788
 			// additional custom fields (extensions / user defined fields)
2789 2789
 			$custom_fields = array();
2790
-			if ( isset( $_POST['custom-field'] ) ) {
2791
-				foreach ( $_POST['custom-field'] as $custom_field => $custom_value ) {
2792
-					if ( is_array( $custom_value ) ) {
2790
+			if ( isset( $_POST['custom-field'] ) ) {
2791
+				foreach ( $_POST['custom-field'] as $custom_field => $custom_value ) {
2792
+					if ( is_array( $custom_value ) ) {
2793 2793
 						$custom_fields[ $custom_field ] = array_filter( stripslashes_deep( $custom_value ) ); // array_filters to remove empty items (don't save them!)
2794
-					} else {
2794
+					} else {
2795 2795
 						$custom_fields[ $custom_field ] = stripslashes( $custom_value );
2796 2796
 					}
2797 2797
 				}
@@ -2827,7 +2827,7 @@  discard block
 block discarded – undo
2827 2827
 			exit();
2828 2828
 		}
2829 2829
 
2830
-		public static function generate_default_email_body() {
2830
+		public static function generate_default_email_body() {
2831 2831
 			$email_body  = '<p>' . __( 'Greetings,', 'yikes-inc-easy-mailchimp-extender' ) . '</p>'; 
2832 2832
 
2833 2833
 			$email_body .= '<p>';
@@ -2850,18 +2850,18 @@  discard block
 block discarded – undo
2850 2850
 		}
2851 2851
 
2852 2852
 		/* Unsubscribe a given user from our list */
2853
-		public function yikes_easy_mailchimp_unsubscribe_user() {
2853
+		public function yikes_easy_mailchimp_unsubscribe_user() {
2854 2854
 			$nonce    = $_REQUEST['nonce'];
2855 2855
 			$list_id  = $_REQUEST['mailchimp-list'];
2856 2856
 			$email_id = $_REQUEST['email_id'];
2857 2857
 
2858 2858
 			// verify our nonce
2859
-			if ( ! wp_verify_nonce( $nonce, 'unsubscribe-user-' . $email_id ) ) {
2859
+			if ( ! wp_verify_nonce( $nonce, 'unsubscribe-user-' . $email_id ) ) {
2860 2860
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2861 2861
 			}
2862 2862
 
2863 2863
 			$response = yikes_get_mc_api_manager()->get_list_handler()->member_unsubscribe( $list_id, $email_id );
2864
-			if ( is_wp_error( $response ) ) {
2864
+			if ( is_wp_error( $response ) ) {
2865 2865
 				$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
2866 2866
 				$error_logging->maybe_write_to_log(
2867 2867
 					$response->get_error_code(),
@@ -2874,22 +2874,22 @@  discard block
 block discarded – undo
2874 2874
 			exit;
2875 2875
 		}
2876 2876
 
2877
-		public function yikes_easy_mailchimp_create_missing_error_log() {
2877
+		public function yikes_easy_mailchimp_create_missing_error_log() {
2878 2878
 			// grab our nonnce
2879 2879
 			$nonce = $_REQUEST['nonce'];
2880 2880
 			// validate nonce
2881
-			if ( !wp_verify_nonce( $nonce, 'create_error_log' ) ) {
2881
+			if ( !wp_verify_nonce( $nonce, 'create_error_log' ) ) {
2882 2882
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2883 2883
 			}
2884 2884
 			// setup the path to the error log
2885 2885
 			$error_log = fopen( plugin_dir_path( __FILE__ ) . '../includes/error_log/yikes-easy-mailchimp-error-log.php', 'w' );
2886
-			try {
2886
+			try {
2887 2887
 				// create the file
2888 2888
 				fwrite( $error_log , '' );
2889 2889
 				// close out
2890 2890
 				fclose( $error_log );
2891 2891
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings&error_log_created=true' ) ) );
2892
-			} catch ( Exception $e ) {
2892
+			} catch ( Exception $e ) {
2893 2893
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=debug-settings&error_log_created=false&error_message='.urlencode( $e->getMessage() ) ) ) );
2894 2894
 			}
2895 2895
 		}
@@ -2898,11 +2898,11 @@  discard block
 block discarded – undo
2898 2898
 		*	Clear Transient Data !
2899 2899
 		*	Probably Move these to its own file,
2900 2900
 		*/
2901
-		public function yikes_easy_mailchimp_clear_transient_data() {
2901
+		public function yikes_easy_mailchimp_clear_transient_data() {
2902 2902
 
2903 2903
 			// verify our nonce
2904 2904
 			$nonce = $_REQUEST['nonce'];
2905
-			if ( ! wp_verify_nonce( $nonce, 'clear-mc-transient-data' ) ) {
2905
+			if ( ! wp_verify_nonce( $nonce, 'clear-mc-transient-data' ) ) {
2906 2906
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
2907 2907
 			}
2908 2908
 
@@ -2910,14 +2910,14 @@  discard block
 block discarded – undo
2910 2910
 
2911 2911
 			// if the request came from the settings page, redirect to the settings page.
2912 2912
 			$referer = wp_get_referer();
2913
-			if ( $referer && ( strpos( $referer, 'yikes-inc-easy-mailchimp-settings' ) > 0 ) ) {
2913
+			if ( $referer && ( strpos( $referer, 'yikes-inc-easy-mailchimp-settings' ) > 0 ) ) {
2914 2914
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=api-cache-settings&transient-cleared=true' ) ) );
2915
-			} elseif ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] === 'yikes-mailchimp-edit-form' && isset( $_REQUEST['id'] ) && ! empty( $_REQUEST['id'] ) ) {
2915
+			} elseif ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] === 'yikes-mailchimp-edit-form' && isset( $_REQUEST['id'] ) && ! empty( $_REQUEST['id'] ) ) {
2916 2916
 
2917 2917
 				// else check if we were editing a form.
2918 2918
 				$id = filter_var( $_REQUEST['id'], FILTER_SANITIZE_NUMBER_INT );
2919 2919
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-edit-form&id=' . $id ) ) );
2920
-			} else {
2920
+			} else {
2921 2921
 				// else redirect to the manage forms page.
2922 2922
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp&transient-cleared=true' ) ) );
2923 2923
 			}
@@ -2933,17 +2933,17 @@  discard block
 block discarded – undo
2933 2933
 		 * @since 6.0.2
2934 2934
 		 * @return $list_id_array - array of list id's to loop over
2935 2935
 		 */
2936
-		public function get_mailchimp_list_ids_on_account() {
2936
+		public function get_mailchimp_list_ids_on_account() {
2937 2937
 			$api_key = yikes_get_mc_api_key();
2938
-			if ( ! $api_key ) {
2938
+			if ( ! $api_key ) {
2939 2939
 				// if no api key is set/site is not connected, return an empty array.
2940 2940
 				return array();
2941 2941
 			}
2942 2942
 
2943 2943
 			$lists = get_transient( 'yikesinc_eme_list_ids' );
2944
-			if ( false === $lists ) {
2944
+			if ( false === $lists ) {
2945 2945
 				$lists = yikes_get_mc_api_manager()->get_list_handler()->get_list_ids();
2946
-				if ( is_wp_error( $lists ) ) {
2946
+				if ( is_wp_error( $lists ) ) {
2947 2947
 					return array();
2948 2948
 				}
2949 2949
 				set_transient( 'yikesinc_eme_list_ids', $lists, HOUR_IN_SECONDS );
@@ -2957,9 +2957,9 @@  discard block
 block discarded – undo
2957 2957
 		 *
2958 2958
 		 *	@since 6.0
2959 2959
 		 */
2960
-		public function yikes_mailchimp_load_helper_class() {
2960
+		public function yikes_mailchimp_load_helper_class() {
2961 2961
 			// check to see if it's already loaded up.
2962
-			if ( !class_exists( 'Yikes_Inc_Easy_Mailchimp_Forms_Helper' ) ) {
2962
+			if ( !class_exists( 'Yikes_Inc_Easy_Mailchimp_Forms_Helper' ) ) {
2963 2963
 				// Include our main helper class file
2964 2964
 				include_once( YIKES_MC_PATH . 'admin/partials/helpers/init.php' );
2965 2965
 			}
@@ -2972,11 +2972,11 @@  discard block
 block discarded – undo
2972 2972
 		 * @order requires that yikes-inc-easy-mailchimp-extender-admin.min.css be enqueued, so we can override the defaults (handle: yikes-inc-easy-mailchimp-extender-admin)
2973 2973
 		 * @return print out custom styles to the admin header to alter the default blue color
2974 2974
 		 */
2975
-		public function alter_yikes_easy_mc_color_scheme() {
2975
+		public function alter_yikes_easy_mc_color_scheme() {
2976 2976
 			// get the current set color scheme for the logged in user
2977 2977
 			$current_color_scheme = get_user_option( 'admin_color' );
2978 2978
 			// switch over each color scheme, and set our variable
2979
-			switch ( $current_color_scheme ) {
2979
+			switch ( $current_color_scheme ) {
2980 2980
 				default:
2981 2981
 				case 'fresh': // default blue (defined by this plugin)
2982 2982
 					$main_color = '#00a0d2';
@@ -3024,16 +3024,16 @@  discard block
 block discarded – undo
3024 3024
 		/**
3025 3025
 		 *	Display premium support page if any add-ons are installed, otherwise display free support page
3026 3026
 		 */
3027
-		public function display_support_page_content() {
3027
+		public function display_support_page_content() {
3028 3028
 
3029 3029
 			$addons = get_option( 'yikes-easy-mc-active-addons', array() );
3030 3030
 
3031 3031
 			// If we have premium add-ons...
3032
-			if ( ! empty( $addons ) ) { 
3032
+			if ( ! empty( $addons ) ) {
3033 3033
 
3034 3034
 				// Add our premium support partial.
3035 3035
 				include_once( YIKES_MC_PATH . 'admin/partials/helpers/premium-support.php' );
3036
-			} else {
3036
+			} else {
3037 3037
 
3038 3038
 				// Otherwise add our free support partial.
3039 3039
 				include_once( YIKES_MC_PATH . 'admin/partials/helpers/free-support.php' );
@@ -3045,8 +3045,8 @@  discard block
 block discarded – undo
3045 3045
 		 *
3046 3046
 		 * @since 6.0.4
3047 3047
 		 */
3048
-		public function check_yikes_mc_table_version() {
3049
-			if ( get_option( 'yikes_mc_database_version', '0.00' ) < '1.0' ) {
3048
+		public function check_yikes_mc_table_version() {
3049
+			if ( get_option( 'yikes_mc_database_version', '0.00' ) < '1.0' ) {
3050 3050
 				require_once YIKES_MC_PATH . 'includes/class-yikes-inc-easy-mailchimp-extender-activator.php';
3051 3051
 				global $wpdb;
3052 3052
 				Yikes_Inc_Easy_Mailchimp_Extender_Activator::_activate_yikes_easy_mailchimp( $wpdb );
@@ -3060,7 +3060,7 @@  discard block
 block discarded – undo
3060 3060
 		 *
3061 3061
 		 * @since 6.0.4.4
3062 3062
 		 */
3063
-		public function process_subscriber_count_shortcode_in_form_descriptions( $form_description, $form_id ) {
3063
+		public function process_subscriber_count_shortcode_in_form_descriptions( $form_description, $form_id ) {
3064 3064
 			$form_description = str_replace( '[yikes-mailchimp-subscriber-count]', do_shortcode( '[yikes-mailchimp-subscriber-count form="' . $form_id . '"]' ), $form_description );
3065 3065
 			return $form_description;
3066 3066
 		}
@@ -3070,9 +3070,9 @@  discard block
 block discarded – undo
3070 3070
 		 *
3071 3071
 		 * @since 6.0.3
3072 3072
 		 */
3073
-		public function generate_edit_forms_upsell_ad() {
3073
+		public function generate_edit_forms_upsell_ad() {
3074 3074
 		$upsell_ads = glob( YIKES_MC_PATH . 'includes/upsells/*.php' );
3075
-		if ( $upsell_ads && ! empty( $upsell_ads ) ) {
3075
+		if ( $upsell_ads && ! empty( $upsell_ads ) ) {
3076 3076
 			$ad_count = absint( count( $upsell_ads ) - 1 );
3077 3077
 			$ad       = $upsell_ads[ mt_rand( 0, $ad_count ) ];
3078 3078
 			ob_start();
@@ -3089,11 +3089,11 @@  discard block
 block discarded – undo
3089 3089
 		 * Mainly used when the API key is altered, changed or removed.
3090 3090
 		 * @since 6.1.3
3091 3091
 		 */
3092
-		public function delete_yikes_mailchimp_transients() {
3092
+		public function delete_yikes_mailchimp_transients() {
3093 3093
 
3094 3094
 		// delete all of the list_id transients.
3095 3095
 		$list_ids = $this->get_mailchimp_list_ids_on_account();
3096
-		foreach ( $list_ids as $id ) {
3096
+		foreach ( $list_ids as $id ) {
3097 3097
 			delete_transient( "yikes_eme_list_{$id}" );
3098 3098
 			delete_transient( "yikes_eme_merge_variables_{$id}" );
3099 3099
 			delete_transient( "yikes_eme_interest_categories_{$id}" );
@@ -3115,13 +3115,13 @@  discard block
 block discarded – undo
3115 3115
 	 *
3116 3116
 	 * @author Jeremy Pry
3117 3117
 	 */
3118
-	public function check_db_version() {
3118
+	public function check_db_version() {
3119 3119
 		$option = get_option( 'yikes_easy_mailchimp_extender_version', '0.0.0' );
3120
-		if ( version_compare( $option, '6.2.0', '<' ) ) {
3120
+		if ( version_compare( $option, '6.2.0', '<' ) ) {
3121 3121
 			$this->convert_db_to_option();
3122 3122
 		}
3123 3123
 
3124
-		if ( version_compare( $option, YIKES_MC_VERSION, '<' ) ) {
3124
+		if ( version_compare( $option, YIKES_MC_VERSION, '<' ) ) {
3125 3125
 			update_option( 'yikes_easy_mailchimp_extender_version', YIKES_MC_VERSION );
3126 3126
 		}
3127 3127
 	}
@@ -3131,7 +3131,7 @@  discard block
 block discarded – undo
3131 3131
 	 *
3132 3132
 	 * @author Jeremy Pry
3133 3133
 	 */
3134
-	public function convert_db_to_option() {
3134
+	public function convert_db_to_option() {
3135 3135
 		/** @var wpdb */
3136 3136
 		global $wpdb;
3137 3137
 
@@ -3140,11 +3140,11 @@  discard block
 block discarded – undo
3140 3140
 		$form_option      = array();
3141 3141
 		$form_ids         = $db_interface->get_form_ids();
3142 3142
 
3143
-		if ( empty( $form_ids ) ) {
3143
+		if ( empty( $form_ids ) ) {
3144 3144
 			return;
3145 3145
 		}
3146 3146
 
3147
-		foreach ( $form_ids as $form_id ) {
3147
+		foreach ( $form_ids as $form_id ) {
3148 3148
 			$form_option[ $form_id ] = $db_interface->get_form( $form_id );
3149 3149
 		}
3150 3150
 
@@ -3156,7 +3156,7 @@  discard block
 block discarded – undo
3156 3156
 	 *
3157 3157
 	 * @author Jeremy Pry
3158 3158
 	 */
3159
-	public function register_optin_widget() {
3159
+	public function register_optin_widget() {
3160 3160
 		register_widget( 'Yikes_Inc_Easy_Mailchimp_Extender_Widget' );
3161 3161
 	}
3162 3162
 }
Please login to merge, or discard this patch.
includes/third-party-integrations/visual-composer/visual-composer.php 1 patch
Braces   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,18 +5,18 @@  discard block
 block discarded – undo
5 5
 *	@since 6.0.3
6 6
 */
7 7
 
8
-class YIKES_MailChimp_Visual_Composer_Extension {
8
+class YIKES_MailChimp_Visual_Composer_Extension {
9 9
 
10 10
 	/**
11 11
 	 * Constructor
12 12
 	 *
13 13
 	 * @since 6.0.3
14 14
 	 */
15
-	function __construct() {
15
+	function __construct() {
16 16
 		
17 17
 		add_action( 'admin_init', array( $this, 'extend_visual_composer' ) );
18 18
 
19
-		if ( function_exists( 'vc_add_shortcode_param' ) ) {
19
+		if ( function_exists( 'vc_add_shortcode_param' ) ) {
20 20
 			vc_add_shortcode_param( 'yikes_mailchimp_logo', array( $this, 'yikes_mailchimp_logo_vc_section' ) );
21 21
 		}
22 22
 	}
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 	 *
27 27
 	 * @since 6.0.3
28 28
 	 */
29
-	public function extend_visual_composer() {
29
+	public function extend_visual_composer() {
30 30
 
31
-		if ( ! function_exists( 'vc_map' ) ) {
31
+		if ( ! function_exists( 'vc_map' ) ) {
32 32
 			return;
33 33
 		}
34 34
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 *
99 99
 	 * @since 6.0.3
100 100
 	 */
101
-	public function yikes_mailchimp_logo_vc_section() {
101
+	public function yikes_mailchimp_logo_vc_section() {
102 102
 		return '<img style="width:250px;display:block;margin:0 auto;" src="' . YIKES_MC_URL . 'includes/images/MailChimp_Assets/mailchimp-logo.png" title="' . __( 'Easy Forms for Mailchimp', 'yikes-inc-easy-mailchimp-extender' ) . '" />';
103 103
 	}
104 104
 
@@ -107,17 +107,17 @@  discard block
 block discarded – undo
107 107
 	 *
108 108
 	 * @since 6.0.3
109 109
 	 */
110
-	public function yikes_mailchimp_retreive_user_created_forms() {
110
+	public function yikes_mailchimp_retreive_user_created_forms() {
111 111
 		$interface = yikes_easy_mailchimp_extender_get_form_interface();
112 112
 		$all_forms = $interface->get_all_forms();
113 113
 
114 114
 		$lists = array();
115
-		if ( ! empty( $all_forms ) ) {
115
+		if ( ! empty( $all_forms ) ) {
116 116
 			// build an array to pass to our javascript
117
-			foreach ( $all_forms as $id => $form ) {
117
+			foreach ( $all_forms as $id => $form ) {
118 118
 				$lists[ $form['form_name'] ] = $id;
119 119
 			}
120
-		} else {
120
+		} else {
121 121
 			$lists[ __( 'Please Import Some Mailchimp Lists', 'yikes-inc-easy-mailchimp-extender' ) ] = '-';
122 122
 		}
123 123
 
Please login to merge, or discard this patch.