Completed
Push — master ( 9cba04...5eacb7 )
by Evan
07:06
created
admin/partials/menu/lists.php 2 patches
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	// lets confirm the user has a valid API key stored
3
-	if( $this->is_user_mc_api_valid_form( false ) == 'valid' ) {
3
+	if ( $this->is_user_mc_api_valid_form( false ) == 'valid' ) {
4 4
 		/// Check for a transient, if not - set one up for one hour
5 5
 		if ( false === ( $list_data = get_transient( 'yikes-easy-mailchimp-list-data' ) ) ) {
6
-			$api_key = trim( get_option( 'yikes-mc-api-key' , '' ) );
6
+			$api_key = trim( get_option( 'yikes-mc-api-key', '' ) );
7 7
 			$dash_position = strpos( $api_key, '-' );
8
-			if( $dash_position !== false ) {
8
+			if ( $dash_position !== false ) {
9 9
 				$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/list.json';
10 10
 			}
11 11
 			$list_data = wp_remote_post( $api_endpoint, array( 
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
 				'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
18 18
 			) );
19 19
 			$list_data = json_decode( wp_remote_retrieve_body( $list_data ), true );
20
-			if( isset( $list_data['error'] ) ) {	
21
-				if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
20
+			if ( isset( $list_data[ 'error' ] ) ) {	
21
+				if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
22 22
 					require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
23 23
 					$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
24
-					$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data['error'], __( "Get Account Lists" , 'yikes-inc-easy-mailchimp-extender' ), "View Lists Page" );
24
+					$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data[ 'error' ], __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ), "View Lists Page" );
25 25
 				}
26 26
 			} else {		
27 27
 				// set our transient
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 			}
30 30
 		}
31 31
 	} else {
32
-		wp_die( __( 'It looks like you need to re-validate your MailChimp API key before you can continue.' , 'yikes-inc-easy-mailchimp-extender' ) , 500 );
32
+		wp_die( __( 'It looks like you need to re-validate your MailChimp API key before you can continue.', 'yikes-inc-easy-mailchimp-extender' ), 500 );
33 33
 	}
34 34
 		
35 35
 	wp_register_script( 'yikes-easy-mc-manage-forms-script', YIKES_MC_URL . 'admin/js/yikes-inc-easy-mailchimp-manage-forms.js', array( 'jquery' ), $this->version, false );
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
 ?>
44 44
 <div class="wrap">
45 45
 	<!-- Freddie Logo -->
46
-	<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - MailChimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
46
+	<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - MailChimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
47 47
 		
48
-	<h1>YIKES Easy Forms for MailChimp | <?php _e( 'Manage Lists' , 'yikes-inc-easy-mailchimp-extender' ) ?></h1>				
48
+	<h1>YIKES Easy Forms for MailChimp | <?php _e( 'Manage Lists', 'yikes-inc-easy-mailchimp-extender' ) ?></h1>				
49 49
 		
50 50
 	<!-- Settings Page Description -->
51
-	<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Make edits to your MailChimp lists on the following page. Select a list to make edits to it.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
51
+	<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Make edits to your MailChimp lists on the following page. Select a list to make edits to it.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
52 52
 		
53 53
 	<!-- entire body content -->
54 54
 		<div id="poststuff">
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
 									<thead>
69 69
 										<tr>
70 70
 											<th id="cb" class="manage-column column-cb check-column" scope="col"><input type="checkbox" /></th>
71
-											<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
72
-											<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
71
+											<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List Name', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
72
+											<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
73 73
 										</tr>
74 74
 									</thead>
75 75
 									<!-- end header -->
@@ -78,36 +78,36 @@  discard block
 block discarded – undo
78 78
 									<tfoot>
79 79
 										<tr>
80 80
 											<th class="manage-column column-cb check-column" scope="col"><input type="checkbox" /></th>
81
-											<th class="manage-column column-columnname" scope="col"><?php _e( 'Form Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
82
-											<th class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
81
+											<th class="manage-column column-columnname" scope="col"><?php _e( 'Form Name', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
82
+											<th class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
83 83
 										</tr>
84 84
 									</tfoot>
85 85
 									<!-- end footer -->
86 86
 									
87 87
 									<!-- TABLE BODY -->
88 88
 									<tbody>
89
-										<?php if( count( $list_data['total'] ) > 0 ) { 
89
+										<?php if ( count( $list_data[ 'total' ] ) > 0 ) { 
90 90
 												$i = 1;
91
-												foreach( $list_data['data'] as $list ) { 
91
+												foreach ( $list_data[ 'data' ] as $list ) { 
92 92
 										?>
93
-											<tr class="<?php if( $i % 2 == 0 ) { echo 'alternate'; } ?>">
93
+											<tr class="<?php if ( $i % 2 == 0 ) { echo 'alternate'; } ?>">
94 94
 												<th class="check-column" scope="row"><input type="checkbox" /></th>
95
-												<td class="column-columnname"><?php echo stripslashes( $list['name'] ); ?>
95
+												<td class="column-columnname"><?php echo stripslashes( $list[ 'name' ] ); ?>
96 96
 													<div class="row-actions">
97
-														<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => (int) $list['id'] ) , admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>"><?php _e( "View" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
98
-														<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => (int) $list['id'] ) , admin_url( 'admin.php?page=yikes-mailchimp-edit-list' ) ) ); ?>"><?php _e( "Edit Fields" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
99
-														<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => '', 'mailchimp-list' => (int) $list['id'] , 'nonce' => wp_create_nonce( 'duplicate-mailchimp-form-'.$list['id'] ) ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>"><?php _e( "Delete" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
100
-														<span><a href="#" class="view-yikes-mc-list-info"><?php _e( "List Info." , 'yikes-inc-easy-mailchimp-extender' ); ?></a></span>														
97
+														<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => (int) $list[ 'id' ] ), admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>"><?php _e( "View", 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
98
+														<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => (int) $list[ 'id' ] ), admin_url( 'admin.php?page=yikes-mailchimp-edit-list' ) ) ); ?>"><?php _e( "Edit Fields", 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
99
+														<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => '', 'mailchimp-list' => (int) $list[ 'id' ], 'nonce' => wp_create_nonce( 'duplicate-mailchimp-form-' . $list[ 'id' ] ) ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>"><?php _e( "Delete", 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
100
+														<span><a href="#" class="view-yikes-mc-list-info"><?php _e( "List Info.", 'yikes-inc-easy-mailchimp-extender' ); ?></a></span>														
101 101
 													</div>
102 102
 												</td>
103
-												<td class="column-columnname num"><?php echo $list['stats']['member_count']; ?></td>
103
+												<td class="column-columnname num"><?php echo $list[ 'stats' ][ 'member_count' ]; ?></td>
104 104
 											</tr>
105 105
 										<?php 	
106 106
 												$i++;
107 107
 												}
108 108
 											} else { ?>
109 109
 											<tr class="no-items">
110
-												<td class="colspanchange no-mailchimp-lists-found" colspan="3"><em><?php _e( 'No MailChimp lists found. Head over to' , 'yikes-inc-easy-mailchimp-extender' ); ?></em></td>
110
+												<td class="colspanchange no-mailchimp-lists-found" colspan="3"><em><?php _e( 'No MailChimp lists found. Head over to', 'yikes-inc-easy-mailchimp-extender' ); ?></em></td>
111 111
 											</tr>
112 112
 										<?php } ?>
113 113
 									</tbody>
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
 				'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
18 18
 			) );
19 19
 			$list_data = json_decode( wp_remote_retrieve_body( $list_data ), true );
20
-			if( isset( $list_data['error'] ) ) {	
20
+			if( isset( $list_data['error'] ) ) {
21 21
 				if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
22 22
 					require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
23 23
 					$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
24 24
 					$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data['error'], __( "Get Account Lists" , 'yikes-inc-easy-mailchimp-extender' ), "View Lists Page" );
25 25
 				}
26
-			} else {		
26
+			} else {
27 27
 				// set our transient
28 28
 				set_transient( 'yikes-easy-mailchimp-list-data', $list_data, 1 * HOUR_IN_SECONDS );
29 29
 			}
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
 									
87 87
 									<!-- TABLE BODY -->
88 88
 									<tbody>
89
-										<?php if( count( $list_data['total'] ) > 0 ) { 
89
+										<?php if( count( $list_data['total'] ) > 0 ) {
90 90
 												$i = 1;
91
-												foreach( $list_data['data'] as $list ) { 
91
+												foreach( $list_data['data'] as $list ) {
92 92
 										?>
93 93
 											<tr class="<?php if( $i % 2 == 0 ) { echo 'alternate'; } ?>">
94 94
 												<th class="check-column" scope="row"><input type="checkbox" /></th>
Please login to merge, or discard this patch.
admin/partials/menu/add-ons.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@  discard block
 block discarded – undo
8 8
 <div class="wrap">
9 9
 	
10 10
 	<!-- Freddie Logo -->
11
-	<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - MailChimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
11
+	<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - MailChimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
12 12
 		
13
-	<h1>YIKES Easy Forms for MailChimp | <?php echo __( 'Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="https://yikesplugins.com/plugins/?plugins=MailChimp" target="_blank" class="button-primary coming-soon-button" title="<?php _e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1>				
13
+	<h1>YIKES Easy Forms for MailChimp | <?php echo __( 'Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="https://yikesplugins.com/plugins/?plugins=MailChimp" target="_blank" class="button-primary coming-soon-button" title="<?php _e( 'View All Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'View All Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1>				
14 14
 		
15 15
 	<!-- Addons Page Description -->
16
-	<p class="yikes-easy-mc-about-text about-text"><?php _e( "Below you'll find a list of add-ons available for YIKES Easy Forms for MailChimp. Each add-on extends the base functionality of the free plugin." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
16
+	<p class="yikes-easy-mc-about-text about-text"><?php _e( "Below you'll find a list of add-ons available for YIKES Easy Forms for MailChimp. Each add-on extends the base functionality of the free plugin.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
17 17
 	
18 18
 	<!-- Add-On Container -->
19 19
 	<section id="add-ons">
@@ -48,21 +48,21 @@  discard block
 block discarded – undo
48 48
 				return $feed = new WP_Error( 'simplepie-error', $feed->error() );
49 49
 			}
50 50
 			// print_r( $feed->get_items() );
51
-			foreach( $feed->get_items() as $add_on ) {
51
+			foreach ( $feed->get_items() as $add_on ) {
52 52
 				// store the description
53 53
 				$description_pre_split = $add_on->get_description();
54 54
 				$permalink = esc_url( $add_on->get_permalink() );
55 55
 				$add_on_title = $add_on->get_title();
56 56
 				// If the returned add-on is this base plugin, skip it
57
-				if( $add_on_title != 'Easy Forms for MailChimp' ) {
57
+				if ( $add_on_title != 'Easy Forms for MailChimp' ) {
58 58
 					// extract the image
59 59
 					preg_match( '/<img[^>]+\>/i', $description_pre_split, $split_string );
60 60
 					// store the content sans image tag
61 61
 					$description = preg_replace( "/<img[^>]+\>/i", "", $add_on->get_description() ); 
62 62
 					// store the image
63
-					$image = ( count( $split_string ) > 0 ) ? $split_string[0] : '';
63
+					$image = ( count( $split_string ) > 0 ) ? $split_string[ 0 ] : '';
64 64
 					// if {hidden} is found, exclude it
65
-					if( strpos( $description_pre_split, '{hidden}' ) ) {
65
+					if ( strpos( $description_pre_split, '{hidden}' ) ) {
66 66
 						continue;
67 67
 					}
68 68
 					?>
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
 						<div class="addon-footer-wrap give-clearfix">
85 85
 							<a href="<?php echo $permalink; ?>" title="<?php echo $add_on_title; ?>" class="button-secondary" target="_blank">
86
-								<?php _e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?>	
86
+								<?php _e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?>	
87 87
 							<span class="dashicons dashicons-external"></span></a>
88 88
 						</div>
89 89
 
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/api-cache-settings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
3 3
 	-	Clear MailChimp transient data such as forms, form fields, list data, subscribers etc.
4 4
 		*	transient cache is stored for 60 minutes.
5 5
 -->
6
-<h3><span><?php _e( 'API Cache Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
6
+<h3><span><?php _e( 'API Cache Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7 7
 <div class="inside">
8 8
 									
9 9
 	<!-- Settings Form -->
10
-	<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">							
10
+	<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">							
11 11
 									
12
-		<p><?php _e( "Delete all MailChimp data stored in your sites cache. Most data is stored in the cache for 1 hour." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
12
+		<p><?php _e( "Delete all MailChimp data stored in your sites cache. Most data is stored in the cache for 1 hour.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
13 13
 			<!-- check if any of our transients contain data -->							
14 14
 			<?php if ( false === get_transient( 'yikes-easy-mailchimp-list-data' ) && false === get_transient( 'yikes-easy-mailchimp-profile-data' ) && false === get_transient( 'yikes-easy-mailchimp-account-data' ) ) { ?>
15
-				<p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No MailChimp data found in temporary cache storage.' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear MailChimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
15
+				<p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No MailChimp data found in temporary cache storage.', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear MailChimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
16 16
 			<?php } else { ?>
17
-				<p><input type="submit" class="button-primary" value="<?php _e( 'Clear MailChimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
17
+				<p><input type="submit" class="button-primary" value="<?php _e( 'Clear MailChimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
18 18
 			<?php } ?>
19 19
 									
20 20
 	</form>
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/import-export-forms.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -5,65 +5,65 @@
 block discarded – undo
5 5
 	// return it as an array, so we can work with it to build our form below
6 6
 	$all_forms = $wpdb->get_results( 'SELECT id, form_name FROM ' . $wpdb->prefix . 'yikes_easy_mc_forms', ARRAY_A );
7 7
 ?>
8
-<h3><span><?php _e( 'Import/Export Forms & Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
8
+<h3><span><?php _e( 'Import/Export Forms & Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
9 9
 
10 10
 <div class="inside">	
11 11
 					
12 12
 	<!-- Export Form -->
13
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-forms' , 'nonce' => wp_create_nonce( 'export-forms' ) ) ) ); ?>" method="post">							
13
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-forms', 'nonce' => wp_create_nonce( 'export-forms' ) ) ) ); ?>" method="post">							
14 14
 									
15
-		<p><strong><?php _e( "Export Forms" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
15
+		<p><strong><?php _e( "Export Forms", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
16 16
 		<p class="description">
17
-			<?php _e( "Select the forms you would like to export. When you click the download button below, Easy Forms for MailChimp will create a CSV file for you to save to your computer. Once you've saved the download file, you can use the Import tool to import the forms to this or any other site." , "yikes-inc-easy-mailchimp-extender" ); ?>
17
+			<?php _e( "Select the forms you would like to export. When you click the download button below, Easy Forms for MailChimp will create a CSV file for you to save to your computer. Once you've saved the download file, you can use the Import tool to import the forms to this or any other site.", "yikes-inc-easy-mailchimp-extender" ); ?>
18 18
 		</p>
19 19
 	
20
-			<?php if( !empty( $all_forms ) ) { ?>	
20
+			<?php if ( ! empty( $all_forms ) ) { ?>	
21 21
 				<!-- custom list so users can export specific forms -->
22
-				<a class="toggle-custom-lists button-secondary" onclick="jQuery(this).next().slideToggle();return false;"><?php _e( 'Select Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
22
+				<a class="toggle-custom-lists button-secondary" onclick="jQuery(this).next().slideToggle();return false;"><?php _e( 'Select Forms', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
23 23
 				<ul class="export-custom-forms-list">
24
-					<p class="description"><?php _e( 'Select which forms to export. Leave all checkboxes unchecked to export all of your forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
25
-					<?php foreach( $all_forms as $form ) { ?>
26
-						<li><label><input type="checkbox" name="export_forms[]" value="<?php echo (int) $form['id']; ?>"><?php echo esc_html( $form['form_name'] ); ?></label></li>
24
+					<p class="description"><?php _e( 'Select which forms to export. Leave all checkboxes unchecked to export all of your forms.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
25
+					<?php foreach ( $all_forms as $form ) { ?>
26
+						<li><label><input type="checkbox" name="export_forms[]" value="<?php echo (int) $form[ 'id' ]; ?>"><?php echo esc_html( $form[ 'form_name' ] ); ?></label></li>
27 27
 					<?php } ?>
28 28
 				</ul>
29 29
 			<?php } else { ?>
30
-				<p><em><?php _e( "It looks like you haven't created any forms yet." , "yikes-inc-easy-mailchimp-extender" ); ?></em></p>
30
+				<p><em><?php _e( "It looks like you haven't created any forms yet.", "yikes-inc-easy-mailchimp-extender" ); ?></em></p>
31 31
 			<?php } ?>
32 32
 		<!-- check if any of our transients contain data -->							
33
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Opt-in Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
33
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Opt-in Forms', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
34 34
 					
35 35
 	</form>
36 36
 	
37 37
 	<hr />
38 38
 	
39 39
 	<!-- Export Form -->
40
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-settings' , 'nonce' => wp_create_nonce( 'export-settings' ) ) ) ); ?>" method="post">							
40
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-settings', 'nonce' => wp_create_nonce( 'export-settings' ) ) ) ); ?>" method="post">							
41 41
 									
42
-		<p><strong><?php _e( "Export Settings" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
42
+		<p><strong><?php _e( "Export Settings", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
43 43
 		<p class="description">
44
-			<?php _e( "Export YIKES Easy Forms for MailChimp plugin settings." , "yikes-inc-easy-mailchimp-extender" ); ?>
44
+			<?php _e( "Export YIKES Easy Forms for MailChimp plugin settings.", "yikes-inc-easy-mailchimp-extender" ); ?>
45 45
 		</p>
46 46
 
47 47
 		<!-- check if any of our transients contain data -->							
48
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Plugin Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
48
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Plugin Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
49 49
 					
50 50
 	</form>
51 51
 	
52 52
 	<hr />
53 53
 	
54 54
 	<!-- Import Form -->	
55
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-import-forms' , 'nonce' => wp_create_nonce( 'import-forms' ) ) ) ); ?>" method="post" enctype="multipart/form-data">							
55
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-import-forms', 'nonce' => wp_create_nonce( 'import-forms' ) ) ) ); ?>" method="post" enctype="multipart/form-data">							
56 56
 									
57
-		<p><strong><?php _e( "Import" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
57
+		<p><strong><?php _e( "Import", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
58 58
 		<p class="description">
59
-			<?php _e( "Select the Easy Forms for MailChimp export file you would like to import. You can use this field to import your opt-in forms or settings. " , "yikes-inc-easy-mailchimp-extender" ); ?>
59
+			<?php _e( "Select the Easy Forms for MailChimp export file you would like to import. You can use this field to import your opt-in forms or settings. ", "yikes-inc-easy-mailchimp-extender" ); ?>
60 60
 		</p>
61 61
 		
62 62
 		<label>
63 63
 			<input type="file" name="csv" id="forms_to_import">
64 64
 		</label>
65 65
 		<!-- check if any of our transients contain data -->							
66
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Import' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
66
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Import', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
67 67
 					
68 68
 	</form>
69 69
 	
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/integration-settings.php 2 patches
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 */
12 12
 		
13 13
 	// enqueue jquery qtip for our tooltip
14
-	wp_enqueue_script( 'jquery-qtip-tooltip', YIKES_MC_URL . 'admin/js/min/jquery.qtip.min.js' , array( 'jquery' ) );
15
-	wp_enqueue_style( 'jquery-qtip-style',  YIKES_MC_URL . 'admin/css/jquery.qtip.min.css' );
14
+	wp_enqueue_script( 'jquery-qtip-tooltip', YIKES_MC_URL . 'admin/js/min/jquery.qtip.min.js', array( 'jquery' ) );
15
+	wp_enqueue_style( 'jquery-qtip-style', YIKES_MC_URL . 'admin/css/jquery.qtip.min.css' );
16 16
 	
17 17
 	?>
18 18
 	<script>
@@ -43,50 +43,50 @@  discard block
 block discarded – undo
43 43
 	);
44 44
 	
45 45
 	$class_descriptions = array(
46
-		'comment_form' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/wordpress-banner-logo.png" title="' . __( 'WordPress' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the WordPress core comment form opt-in checkbox will display a checkbox to your current users when leaving a comment (if they are not currently subscribed).' , 'yikes-inc-easy-mailchimp-extender' ),
47
-		'registration_form' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/wordpress-banner-logo.png" title="' . __( 'WordPress' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the WordPress core registration form opt-in checkbox will display a checkbox to new users when registering for your site.' , 'yikes-inc-easy-mailchimp-extender' ),
48
-		'woocommerce_checkout_form' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/woocommerce-banner.png" title="' . __( 'WooCommerce Store' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the WooCommerce checkout opt-in form allows you to capture email addresses from users who make purchases in your store. This option will add an opt-in checkbox to the checkout page.' , 'yikes-inc-easy-mailchimp-extender' ),
49
-		'easy_digital_downloads_checkout_form' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/edd-banner.png" title="' . __( 'Easy Digital Downloads' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the Easy Digital Downloads checkout opt-in allows users who make a purchase to opt-in to your mailing list during checkout.' , 'yikes-inc-easy-mailchimp-extender' ),
50
-		'buddypress_form' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/buddypress-banner.png" title="' . __( 'BuddyPress' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the BuddyPress opt-in allows users who register for your site to be automatically added to the mailing list of your choice.' , 'yikes-inc-easy-mailchimp-extender' ),
51
-		'bbpress_forms' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/bbpress-banner.png" title="' . __( 'bbPress' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the bbPress opt-in enables users who register to use the forums on your site to be automatically added to the mailing list of your choice.' , 'yikes-inc-easy-mailchimp-extender' ),
52
-		'contact_form_7' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/cf7-banner.png" title="' . __( 'Contact Form 7' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Once the Contact Form 7 integration is active you can use our custom shortcode [yikes_mailchimp_checkbox] in your contact forms to subscribe users to a pre-selected list.' , 'yikes-inc-easy-mailchimp-extender' ),
46
+		'comment_form' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/wordpress-banner-logo.png" title="' . __( 'WordPress', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the WordPress core comment form opt-in checkbox will display a checkbox to your current users when leaving a comment (if they are not currently subscribed).', 'yikes-inc-easy-mailchimp-extender' ),
47
+		'registration_form' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/wordpress-banner-logo.png" title="' . __( 'WordPress', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the WordPress core registration form opt-in checkbox will display a checkbox to new users when registering for your site.', 'yikes-inc-easy-mailchimp-extender' ),
48
+		'woocommerce_checkout_form' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/woocommerce-banner.png" title="' . __( 'WooCommerce Store', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the WooCommerce checkout opt-in form allows you to capture email addresses from users who make purchases in your store. This option will add an opt-in checkbox to the checkout page.', 'yikes-inc-easy-mailchimp-extender' ),
49
+		'easy_digital_downloads_checkout_form' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/edd-banner.png" title="' . __( 'Easy Digital Downloads', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the Easy Digital Downloads checkout opt-in allows users who make a purchase to opt-in to your mailing list during checkout.', 'yikes-inc-easy-mailchimp-extender' ),
50
+		'buddypress_form' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/buddypress-banner.png" title="' . __( 'BuddyPress', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the BuddyPress opt-in allows users who register for your site to be automatically added to the mailing list of your choice.', 'yikes-inc-easy-mailchimp-extender' ),
51
+		'bbpress_forms' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/bbpress-banner.png" title="' . __( 'bbPress', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Enabling the bbPress opt-in enables users who register to use the forums on your site to be automatically added to the mailing list of your choice.', 'yikes-inc-easy-mailchimp-extender' ),
52
+		'contact_form_7' => '<img class="tooltip-integration-banner" src="' . YIKES_MC_URL . 'includes/images/Checkbox_Integration_Logos/cf7-banner.png" title="' . __( 'Contact Form 7', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Once the Contact Form 7 integration is active you can use our custom shortcode [yikes_mailchimp_checkbox] in your contact forms to subscribe users to a pre-selected list.', 'yikes-inc-easy-mailchimp-extender' ),
53 53
 	);
54 54
 		
55 55
 	// Easy Digital Downloads
56
-	if( class_exists( 'Easy_Digital_Downloads' ) ) {
57
-		$active_plugins['easy_digital_downloads_checkout_form'] = __( 'Easy Digital Downloads Checkout', 'yikes-inc-easy-mailchimp-extender' );
56
+	if ( class_exists( 'Easy_Digital_Downloads' ) ) {
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' ) ) {
61
-		$active_plugins['woocommerce_checkout_form'] = __( 'WooCommerce Checkout', 'yikes-inc-easy-mailchimp-extender' );
60
+	if ( class_exists( 'WooCommerce' ) ) {
61
+		$active_plugins[ 'woocommerce_checkout_form' ] = __( 'WooCommerce Checkout', 'yikes-inc-easy-mailchimp-extender' );
62 62
 	}
63 63
 	// BuddyPress
64
-	if( class_exists( 'BuddyPress' ) ) {
65
-		$active_plugins['buddypress_form'] = __( 'BuddyPress Registration', 'yikes-inc-easy-mailchimp-extender' );
64
+	if ( class_exists( 'BuddyPress' ) ) {
65
+		$active_plugins[ 'buddypress_form' ] = __( 'BuddyPress Registration', 'yikes-inc-easy-mailchimp-extender' );
66 66
 	}
67 67
 	// bbPress
68
-	if( class_exists( 'bbPress' ) ) {
69
-		$active_plugins['bbpress_forms'] = __( 'bbPress', 'yikes-inc-easy-mailchimp-extender' );
68
+	if ( class_exists( 'bbPress' ) ) {
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' ) ) {
73
-		$active_plugins['contact_form_7'] = __( 'Contact Form 7', 'yikes-inc-easy-mailchimp-extender' );
72
+	if ( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) {
73
+		$active_plugins[ 'contact_form_7' ] = __( 'Contact Form 7', 'yikes-inc-easy-mailchimp-extender' );
74 74
 	}
75 75
 	
76 76
 	// store our checkbox options
77
-	$options = get_option( 'optin-checkbox-init' , '' );	
77
+	$options = get_option( 'optin-checkbox-init', '' );	
78 78
 ?>
79
-<h3><span><?php _e( 'Integration Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
79
+<h3><span><?php _e( 'Integration Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
80 80
 
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
 			/// Check for a transient, if not - set one up for one hour
86 86
 			if ( false === ( $list_data = get_transient( 'yikes-easy-mailchimp-list-data' ) ) ) {
87
-				$api_key = trim( get_option( 'yikes-mc-api-key' , '' ) );
87
+				$api_key = trim( get_option( 'yikes-mc-api-key', '' ) );
88 88
 				$dash_position = strpos( $api_key, '-' );
89
-				if( $dash_position !== false ) {
89
+				if ( $dash_position !== false ) {
90 90
 					$api_endpoint = 'https://' . substr( $api_key, $dash_position + 1 ) . '.api.mailchimp.com/2.0/lists/list.json';
91 91
 				}
92 92
 				$list_data = wp_remote_post( $api_endpoint, array( 
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
 					'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
99 99
 				) );
100 100
 				$list_data = json_decode( wp_remote_retrieve_body( $list_data ), true );
101
-				if( isset( $list_data['error'] ) ) {	
102
-					if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
101
+				if ( isset( $list_data[ 'error' ] ) ) {	
102
+					if ( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
103 103
 						require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
104 104
 						$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
105
-						$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data['error'], __( "Get Account Lists" , 'yikes-inc-easy-mailchimp-extender' ), "Integration Settings Page" );
105
+						$error_logging->yikes_easy_mailchimp_write_to_error_log( $list_data[ 'error' ], __( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ), "Integration Settings Page" );
106 106
 					}
107 107
 				} else {
108 108
 					// set our transient
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 			?>
114 114
 			<div class="inside">
115 115
 				<?php
116
-					echo sprintf( __( 'Please %s to setup your integrations.', 'yikes-inc-easy-mailchimp-extender' ), '<a href="' . esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=general-settings' ) ) . '" title="' . __( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'enter a valid MailChimp API key' , 'yikes-inc-easy-mailchimp-extender' ) . '</a>' );
116
+					echo sprintf( __( 'Please %s to setup your integrations.', 'yikes-inc-easy-mailchimp-extender' ), '<a href="' . esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=general-settings' ) ) . '" title="' . __( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'enter a valid MailChimp API key', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' );
117 117
 				?>
118 118
 			</div>
119 119
 			<?php
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 <div class="inside">
125 125
 		
126 126
 	<p>
127
-		<?php _e( 'Select which plugins or features Easy Forms for MailChimp by Yikes Inc. should integrate with. Depending on which plugins or features you choose to integrate with, an opt-in checkbox will be generated. For example, the comment form checkbox will generate a checkbox below the standard WordPress comment form to add any new commenters to a pre-determined MailChimp mailing list.' , 'yikes-inc-easy-mailchimp-extender' ); ?>
127
+		<?php _e( 'Select which plugins or features Easy Forms for MailChimp by Yikes Inc. should integrate with. Depending on which plugins or features you choose to integrate with, an opt-in checkbox will be generated. For example, the comment form checkbox will generate a checkbox below the standard WordPress comment form to add any new commenters to a pre-determined MailChimp mailing list.', 'yikes-inc-easy-mailchimp-extender' ); ?>
128 128
 	</p>
129 129
 		
130 130
 	<!-- Settings Form -->
@@ -134,54 +134,54 @@  discard block
 block discarded – undo
134 134
 	
135 135
 	<ul>
136 136
 		<?php 
137
-			if( !empty( $active_plugins ) ) { 
137
+			if ( ! empty( $active_plugins ) ) { 
138 138
 				
139
-				foreach( $active_plugins as $class => $value ) {
139
+				foreach ( $active_plugins as $class => $value ) {
140 140
 					// echo  $class;
141
-					$checked = isset( $options[$class]['value'] ) ? 'checked="checked"' : '';
142
-					$hidden =  !isset( $options[$class]['value'] ) ? 'yikes-easy-mc-hidden' : '';
143
-					$checkbox_label = isset( $options[$class]['label'] ) ? esc_attr__( $options[$class]['label'] ) : '';
144
-					$precheck_checkbox = isset( $options[$class]['precheck'] ) ? $options[$class]['precheck'] : '';
145
-					$selected_list = isset( $options[$class]['associated-list'] ) ? $options[$class]['associated-list'] : '-';
146
-					$list_interest_groups = isset( $options[$class]['interest-groups'] ) ? $options[$class]['interest-groups'] : false;
141
+					$checked = isset( $options[ $class ][ 'value' ] ) ? 'checked="checked"' : '';
142
+					$hidden = ! isset( $options[ $class ][ 'value' ] ) ? 'yikes-easy-mc-hidden' : '';
143
+					$checkbox_label = isset( $options[ $class ][ 'label' ] ) ? esc_attr__( $options[ $class ][ 'label' ] ) : '';
144
+					$precheck_checkbox = isset( $options[ $class ][ 'precheck' ] ) ? $options[ $class ][ 'precheck' ] : '';
145
+					$selected_list = isset( $options[ $class ][ 'associated-list' ] ) ? $options[ $class ][ 'associated-list' ] : '-';
146
+					$list_interest_groups = isset( $options[ $class ][ 'interest-groups' ] ) ? $options[ $class ][ 'interest-groups' ] : false;
147 147
 					?>
148 148
 						<li>
149 149
 							<label>
150
-								<input type="checkbox" name="optin-checkbox-init[<?php echo $class; ?>][value]" value="on" <?php echo $checked; ?> onclick="jQuery(this).parents('li').next().stop().slideToggle();"><?php echo ucwords( $value ); ?><span class="dashicons dashicons-editor-help"></span><div class="tooltiptext qtip-bootstrap" style="display:none;"><?php echo $class_descriptions[$class]; ?></div>
150
+								<input type="checkbox" name="optin-checkbox-init[<?php echo $class; ?>][value]" value="on" <?php echo $checked; ?> onclick="jQuery(this).parents('li').next().stop().slideToggle();"><?php echo ucwords( $value ); ?><span class="dashicons dashicons-editor-help"></span><div class="tooltiptext qtip-bootstrap" style="display:none;"><?php echo $class_descriptions[ $class ]; ?></div>
151 151
 							</label>
152 152
 						</li>
153 153
 						<!-- checkbox settings, text - associated list etc. -->
154 154
 						<li class="optin-checkbox-init[<?php echo $class; ?>]-settings <?php echo $hidden; ?>">
155
-							<?php if( $class == 'contact_form_7' ) { ?>
155
+							<?php if ( $class == 'contact_form_7' ) { ?>
156 156
 								<p style="margin-top:0;"><small class="contact-form-7-notice"><?php printf( __( 'Use %s in Contact Form 7 to display the checkbox.', 'yikes-inc-easy-mailchimp-extender' ), '<code>[yikes_mailchimp_checkbox]</code>' ); ?></small></p>
157 157
 							<?php } ?>
158 158
 							<p style="margin-top:0;padding-top:0;margin-bottom:0;padding-bottom:0;">
159 159
 								<!-- checkbox associated list -->
160
-								<label><?php _e( 'Associated List' , 'yikes-inc-easy-mailchimp-extender' ); ?>
160
+								<label><?php _e( 'Associated List', 'yikes-inc-easy-mailchimp-extender' ); ?>
161 161
 									<?php
162
-										if( $list_data['total'] > 0 ) {
162
+										if ( $list_data[ 'total' ] > 0 ) {
163 163
 											?>
164 164
 												<select class="optin-checkbox-init[<?php echo $class; ?>][associated-list] checkbox-settings-list-dropdown" data-attr-integration="<?php echo $class; ?>" name="optin-checkbox-init[<?php echo $class; ?>][associated-list]" onchange="checkForInterestGroups( jQuery( this ), jQuery( this ).find( 'option:selected' ).val(), jQuery( this ).attr( 'data-attr-integration' ) );return false;">
165
-														<option value="-" <?php selected( $selected_list , '-' ); ?>><?php _e( 'Select a List' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
166
-													<?php foreach( $list_data['data'] as $list ) { ?>
167
-														<option value="<?php echo $list['id']; ?>" <?php selected( $selected_list , $list['id'] ); ?>><?php echo $list['name']; ?></option>
165
+														<option value="-" <?php selected( $selected_list, '-' ); ?>><?php _e( 'Select a List', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
166
+													<?php foreach ( $list_data[ 'data' ] as $list ) { ?>
167
+														<option value="<?php echo $list[ 'id' ]; ?>" <?php selected( $selected_list, $list[ 'id' ] ); ?>><?php echo $list[ 'name' ]; ?></option>
168 168
 													<?php } ?>
169 169
 												</select>
170 170
 											<?php
171 171
 										} else {
172
-											echo '<p class="description no-lists-setup-notice"><strong>' . __( 'You have not setup any lists. You should head over to MailChimp and setup your first list.' , 'yikes-inc-easy-mailchimp-extender' ) . '</strong></p>';
172
+											echo '<p class="description no-lists-setup-notice"><strong>' . __( 'You have not setup any lists. You should head over to MailChimp and setup your first list.', 'yikes-inc-easy-mailchimp-extender' ) . '</strong></p>';
173 173
 										}
174 174
 									?>
175 175
 								</label>
176 176
 								<!-- checkbox text label -->
177
-								<label><?php _e( 'Checkbox Label' , 'yikes-inc-easy-mailchimp-extender' ); ?>
177
+								<label><?php _e( 'Checkbox Label', 'yikes-inc-easy-mailchimp-extender' ); ?>
178 178
 									<input type="text" class="optin-checkbox-init[<?php echo $class; ?>][label] optin-checkbox-label-input" name="optin-checkbox-init[<?php echo $class; ?>][label]" value="<?php echo $checkbox_label; ?>">
179 179
 								</label>
180 180
 								<!-- prechecked? -->
181
-								<label><?php _e( 'Precheck Checkbox' , 'yikes-inc-easy-mailchimp-extender' ); ?>
181
+								<label><?php _e( 'Precheck Checkbox', 'yikes-inc-easy-mailchimp-extender' ); ?>
182 182
 									<select id="optin-checkbox-init[<?php echo $class; ?>][precheck]" name="optin-checkbox-init[<?php echo $class; ?>][precheck]" class="optin-checkbox-init[<?php echo $class; ?>][precheck] checkbox-settings-list-dropdown">
183
-										<option value="true" <?php selected( $precheck_checkbox , 'true' ); ?>><?php _e( 'Yes' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
184
-										<option value="false" <?php selected( $precheck_checkbox , 'false' ); ?>><?php _e( 'No' , 'yikes-inc-easy-mailchimp-extender' ); ?></option>
183
+										<option value="true" <?php selected( $precheck_checkbox, 'true' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
184
+										<option value="false" <?php selected( $precheck_checkbox, 'false' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
185 185
 									</select>
186 186
 								</label>
187 187
 								
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
 											$interest_groupings = get_transient( $selected_list . '_interest_group' );
193 193
 											$integration_type = $class;
194 194
 											require( YIKES_MC_PATH . 'admin/partials/menu/options-sections/templates/integration-interest-groups.php' );
195
-										} else if( $selected_list != '-' && $list_interest_groups ) {
196
-											$list_id = $options[$class]['associated-list'];
195
+										} else if ( $selected_list != '-' && $list_interest_groups ) {
196
+											$list_id = $options[ $class ][ 'associated-list' ];
197 197
 											$integration_type = $class;
198 198
 											YIKES_Inc_Easy_MailChimp_Process_Ajax::check_list_for_interest_groups( $list_id, $integration_type, true ); 
199 199
 										}
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 			} else {
209 209
 				?>
210 210
 					<li>
211
-						<?php _e( 'Nothing is active.' , 'yikes-inc-easy-mailchimp-extender' ); ?>
211
+						<?php _e( 'Nothing is active.', 'yikes-inc-easy-mailchimp-extender' ); ?>
212 212
 					</li>
213 213
 				<?php
214 214
 			}
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 					'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
99 99
 				) );
100 100
 				$list_data = json_decode( wp_remote_retrieve_body( $list_data ), true );
101
-				if( isset( $list_data['error'] ) ) {	
101
+				if( isset( $list_data['error'] ) ) {
102 102
 					if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
103 103
 						require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
104 104
 						$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	
135 135
 	<ul>
136 136
 		<?php 
137
-			if( !empty( $active_plugins ) ) { 
137
+			if( !empty( $active_plugins ) ) {
138 138
 				
139 139
 				foreach( $active_plugins as $class => $value ) {
140 140
 					// echo  $class;
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/general-settings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 	General Settings Options Template
3 3
 	-- yea
4 4
 -->
5
-<h3><span><?php _e( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span><?php echo $api_connection; ?></h3>
5
+<h3><span><?php _e( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span><?php echo $api_connection; ?></h3>
6 6
 <div class="inside">
7 7
 									
8 8
 	<!-- Settings Form -->
@@ -15,15 +15,15 @@  discard block
 block discarded – undo
15 15
 		<!-- MailChimp API Input Field -->
16 16
 		<label for="yks-mailchimp-api-key">
17 17
 		
18
-			<p><?php _e( 'Enter your API key in the field below to connect your site to your MailChimp account.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
18
+			<p><?php _e( 'Enter your API key in the field below to connect your site to your MailChimp account.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
19 19
 			
20
-			<p><strong><?php _e( 'MailChimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
20
+			<p><strong><?php _e( 'MailChimp API Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
21 21
 			
22
-			<input autocomplete="off" <?php if( strlen( trim( get_option( 'yikes-mc-api-key' , '' ) ) ) > 0 ) { ?> type="password" <?php } else { ?> type="text" <?php } ?> value="<?php echo trim( get_option( 'yikes-mc-api-key' , '' ) ); ?>" placeholder="<?php _e( 'MailChimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?>" name="yikes-mc-api-key" id="yikes-mc-api-key" class="settings-page-input" />
22
+			<input autocomplete="off" <?php if ( strlen( trim( get_option( 'yikes-mc-api-key', '' ) ) ) > 0 ) { ?> type="password" <?php } else { ?> type="text" <?php } ?> value="<?php echo trim( get_option( 'yikes-mc-api-key', '' ) ); ?>" placeholder="<?php _e( 'MailChimp API Key', 'yikes-inc-easy-mailchimp-extender' ); ?>" name="yikes-mc-api-key" id="yikes-mc-api-key" class="settings-page-input" />
23 23
 			
24 24
 			<?php echo $api_error_response; ?>
25 25
 			
26
-			<p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
26
+			<p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here', 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
27 27
 		
28 28
 		</label>
29 29
 												
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/debug-settings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 	- php version, wp version, plugin version and debug log
5 5
 -->
6 6
 
7
-<h3><span><?php _e( 'Debug Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7
+<h3><span><?php _e( 'Debug Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
8 8
 
9 9
 <div class="inside">
10 10
 	
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 	
14 14
 		<?php settings_fields( 'yikes_inc_easy_mc_debug_settings_page' ); ?>
15 15
 	
16
-		<label for="yikes-mailchimp-debug-status"><strong><?php _e( 'Enable Debugging' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
17
-			<input type="checkbox" name="yikes-mailchimp-debug-status" id="yikes-mailchimp-debug-status" value="1" <?php checked( get_option( 'yikes-mailchimp-debug-status' , '' ) , '1' ); ?>>
16
+		<label for="yikes-mailchimp-debug-status"><strong><?php _e( 'Enable Debugging', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
17
+			<input type="checkbox" name="yikes-mailchimp-debug-status" id="yikes-mailchimp-debug-status" value="1" <?php checked( get_option( 'yikes-mailchimp-debug-status', '' ), '1' ); ?>>
18 18
 		</label>
19
-		<p class="description"><?php _e( "If you encounter an issue with Easy Forms for MailChimp you can toggle on debugging to display advanced error messages and start logging errors." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
19
+		<p class="description"><?php _e( "If you encounter an issue with Easy Forms for MailChimp you can toggle on debugging to display advanced error messages and start logging errors.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20 20
 		
21 21
 		<?php submit_button(); ?>
22 22
 									
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 				)
36 36
 			);
37 37
 		?>
38
-		<h2><?php _e( "Debug Log" , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="<?php echo $url; ?>" class="button-secondary"><?php _e( 'Clear Log', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h2>
38
+		<h2><?php _e( "Debug Log", 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="<?php echo $url; ?>" class="button-secondary"><?php _e( 'Clear Log', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h2>
39 39
 		
40 40
 		<table class="widefat" id="yikes-mailchimp-error-log">
41 41
 			<!-- table header -->
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/recaptcha-settings.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@  discard block
 block discarded – undo
12 12
 
13 13
 ?>
14 14
 
15
-<h3><span><?php _e( 'reCAPTCHA Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
15
+<h3><span><?php _e( 'reCAPTCHA Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
16 16
 
17 17
 <div class="inside">
18 18
 	
19 19
 	<p>
20
-		<?php _e( 'reCAPTCHA is a free CAPTCHA service, from Google, that helps protect your site against spam, malicious registrations and other forms of attacks where computers try to disguise themselves as a human. reCAPTCHA will help prevent spammers and bots from submitting data through your MailChimp forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?>
20
+		<?php _e( 'reCAPTCHA is a free CAPTCHA service, from Google, that helps protect your site against spam, malicious registrations and other forms of attacks where computers try to disguise themselves as a human. reCAPTCHA will help prevent spammers and bots from submitting data through your MailChimp forms.', 'yikes-inc-easy-mailchimp-extender' ); ?>
21 21
 	</p>
22 22
 	
23 23
 	<p>
24
-		<?php echo '<a href="https://www.google.com/recaptcha/admin" target="_blank" title="' . __( 'Get your reCAPTCHA API Key' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Get Your reCAPTCHA API Key' , 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; ?>
24
+		<?php echo '<a href="https://www.google.com/recaptcha/admin" target="_blank" title="' . __( 'Get your reCAPTCHA API Key', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Get Your reCAPTCHA API Key', 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; ?>
25 25
 	</p>
26 26
 	
27 27
 	<!-- Settings Form -->
@@ -29,21 +29,21 @@  discard block
 block discarded – undo
29 29
 		
30 30
 		<?php settings_fields( 'yikes_inc_easy_mc_recaptcha_settings_page' ); ?>
31 31
 		
32
-			<label for="yikes-mc-recaptcha-setting"><strong><?php _e( 'Enable reCAPTCHA Protection' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
33
-				<input type="checkbox" name="yikes-mc-recaptcha-status" class="recaptcha-setting-checkbox" value="1" <?php checked( get_option( 'yikes-mc-recaptcha-status' , '' ) , '1' ); ?>>
32
+			<label for="yikes-mc-recaptcha-setting"><strong><?php _e( 'Enable reCAPTCHA Protection', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
33
+				<input type="checkbox" name="yikes-mc-recaptcha-status" class="recaptcha-setting-checkbox" value="1" <?php checked( get_option( 'yikes-mc-recaptcha-status', '' ), '1' ); ?>>
34 34
 			</label>
35 35
 			
36
-			<label for="yikes-mc-recaptcha-api-key"><strong><?php _e( 'reCAPTCHA Site Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
37
-				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-site-key" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-site-key' , '' ) ); ?>">
36
+			<label for="yikes-mc-recaptcha-api-key"><strong><?php _e( 'reCAPTCHA Site Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
37
+				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-site-key" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-site-key', '' ) ); ?>">
38 38
 			</label>
39 39
 			
40
-			<label for="yikes-mc-recaptcha-private-api-key"><strong><?php _e( 'reCAPTCHA Secret Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
41
-				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-secret-key" id="" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-secret-key' , '' ) ); ?>">
40
+			<label for="yikes-mc-recaptcha-private-api-key"><strong><?php _e( 'reCAPTCHA Secret Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
41
+				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-secret-key" id="" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-secret-key', '' ) ); ?>">
42 42
 			</label>
43 43
 			
44
-			<a href="#" onclick="jQuery(this).next().slideToggle();return false;" class="recaptcha-preview-link"><?php _e( 'View reCAPTCHA Preview' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
44
+			<a href="#" onclick="jQuery(this).next().slideToggle();return false;" class="recaptcha-preview-link"><?php _e( 'View reCAPTCHA Preview', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
45 45
 				<span class="recaptcha-preview-container">
46
-					<img src="<?php echo YIKES_MC_URL . 'includes/images/recaptcha/recaptcha-demo.gif'; ?>" alt="<?php _e( 'reCAPTCHA Preview' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="recaptcha-demo-gif">
46
+					<img src="<?php echo YIKES_MC_URL . 'includes/images/recaptcha/recaptcha-demo.gif'; ?>" alt="<?php _e( 'reCAPTCHA Preview', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="recaptcha-demo-gif">
47 47
 				</span>
48 48
 			
49 49
 			
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Options page for storing our reCAPTCHA options
4
- *
5
- * Page template that houses our reCAPTCHA API keys.
6
- *
7
- * @since 6.0.0
8
- *
9
- * @package WordPress
10
- * @subpackage Component
3
+						 * Options page for storing our reCAPTCHA options
4
+						 *
5
+						 * Page template that houses our reCAPTCHA API keys.
6
+						 *
7
+						 * @since 6.0.0
8
+						 *
9
+						 * @package WordPress
10
+						 * @subpackage Component
11 11
 */
12 12
 
13 13
 ?>
Please login to merge, or discard this patch.
partials/menu/options-sections/templates/integration-interest-groups.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 // print_r( $interest_groupings );
4 4
 
5
-$integration_options = get_option( 'optin-checkbox-init' , '' );	
5
+$integration_options = get_option( 'optin-checkbox-init', '' );	
6 6
 
7 7
 // print_r( $integration_options );
8 8
 
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 /*
12 12
 * Confirm the interest groups is an array and not empty or else bail
13 13
 */
14
-if( isset( $interest_groupings['error'] ) ) {
15
-	echo '<p class="description no-interest-groupings-enabled-message">' . $interest_groupings['error'] . '</p>';
14
+if ( isset( $interest_groupings[ 'error' ] ) ) {
15
+	echo '<p class="description no-interest-groupings-enabled-message">' . $interest_groupings[ 'error' ] . '</p>';
16 16
 	return;
17 17
 }
18 18
 
@@ -25,30 +25,30 @@  discard block
 block discarded – undo
25 25
 /*
26 26
 *	Loop over interest groups
27 27
 */
28
-foreach( $interest_groupings as $interest_group ) {
28
+foreach ( $interest_groupings as $interest_group ) {
29 29
 	
30
-	$interest_group_id = $interest_group['id'];
31
-	$interest_group_type = ( isset( $interest_group['form_field'] ) ) ? $interest_group['form_field'] : '';
32
-	$interest_groups_fields = ( isset( $interest_group['groups'] ) ) ? $interest_group['groups'] : false; // if not set return false
33
-	$selected_interest_groups = ( isset( $integration_options[$integration_type]['interest-groups'] ) ) ? $integration_options[$integration_type]['interest-groups'] : array();
30
+	$interest_group_id = $interest_group[ 'id' ];
31
+	$interest_group_type = ( isset( $interest_group[ 'form_field' ] ) ) ? $interest_group[ 'form_field' ] : '';
32
+	$interest_groups_fields = ( isset( $interest_group[ 'groups' ] ) ) ? $interest_group[ 'groups' ] : false; // if not set return false
33
+	$selected_interest_groups = ( isset( $integration_options[ $integration_type ][ 'interest-groups' ] ) ) ? $integration_options[ $integration_type ][ 'interest-groups' ] : array();
34 34
 	?>
35 35
 	<section class="interest-group-section">
36
-		<strong class="interest-group-section-title"><?php echo ucwords( $interest_group['name'] ); ?></strong>
36
+		<strong class="interest-group-section-title"><?php echo ucwords( $interest_group[ 'name' ] ); ?></strong>
37 37
 	<?php
38 38
 	/*
39 39
 	*	Loop over the interest group types, and return the appropriate type
40 40
 	*/	
41
-	switch( $interest_group_type ) {
41
+	switch ( $interest_group_type ) {
42 42
 	
43 43
 		default:
44 44
 		case 'hidden':
45 45
 		case 'checkboxes':
46
-			if( $interest_groups_fields ) {
47
-				foreach( $interest_groups_fields as $field ) {
46
+			if ( $interest_groups_fields ) {
47
+				foreach ( $interest_groups_fields as $field ) {
48 48
 				?>
49 49
 					<label>
50
-						<input type="checkbox" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field['name']; ?>" <?php if( isset( $selected_interest_groups[$interest_group_id] ) ) {  if( in_array( $field['name'], $selected_interest_groups[$interest_group_id] ) ) { ?> checked="checked" <?php } } ?>>
51
-						<?php echo $field['name']; ?>
50
+						<input type="checkbox" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field[ 'name' ]; ?>" <?php if ( isset( $selected_interest_groups[ $interest_group_id ] ) ) {  if ( in_array( $field[ 'name' ], $selected_interest_groups[ $interest_group_id ] ) ) { ?> checked="checked" <?php } } ?>>
51
+						<?php echo $field[ 'name' ]; ?>
52 52
 					</label>
53 53
 				<?php
54 54
 				}
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
 			break;
57 57
 			
58 58
 		case 'radio':
59
-			if( $interest_groups_fields ) {
59
+			if ( $interest_groups_fields ) {
60 60
 				$x = 1; //  used to decide which is pre-checked
61
-				foreach( $interest_groups_fields as $field ) {
61
+				foreach ( $interest_groups_fields as $field ) {
62 62
 				?>
63 63
 					<label>
64
-						<input type="radio" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field['name']; ?>" <?php if( isset( $selected_interest_groups[$interest_group_id] ) ) {  if( in_array( $field['name'], $selected_interest_groups[$interest_group_id] ) ) { ?> checked="checked" <?php } } elseif( $x == 1 ) { ?> checked="checked" <?php }?>>
65
-						<?php echo $field['name']; ?>
64
+						<input type="radio" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field[ 'name' ]; ?>" <?php if ( isset( $selected_interest_groups[ $interest_group_id ] ) ) {  if ( in_array( $field[ 'name' ], $selected_interest_groups[ $interest_group_id ] ) ) { ?> checked="checked" <?php } } elseif ( $x == 1 ) { ?> checked="checked" <?php }?>>
65
+						<?php echo $field[ 'name' ]; ?>
66 66
 					</label>
67 67
 				<?php
68 68
 					$x++;
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
 			break;
72 72
 			
73 73
 		case 'dropdown':
74
-			if( $interest_groups_fields ) {
74
+			if ( $interest_groups_fields ) {
75 75
 				?><select name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]"><?php
76
-				foreach( $interest_groups_fields as $field ) {
76
+				foreach ( $interest_groups_fields as $field ) {
77 77
 				?>
78
-					<option  value="<?php echo $field['name']; ?>" <?php if( isset( $selected_interest_groups[$interest_group_id] ) ) {  if( in_array( $field['name'], $selected_interest_groups[$interest_group_id] ) ) { ?> selected="selected" <?php } } ?>>
79
-						<?php echo $field['name']; ?>
78
+					<option  value="<?php echo $field[ 'name' ]; ?>" <?php if ( isset( $selected_interest_groups[ $interest_group_id ] ) ) {  if ( in_array( $field[ 'name' ], $selected_interest_groups[ $interest_group_id ] ) ) { ?> selected="selected" <?php } } ?>>
79
+						<?php echo $field[ 'name' ]; ?>
80 80
 					</option>
81 81
 				<?php
82 82
 				}
Please login to merge, or discard this patch.