Completed
Push — staging ( ee16a6...cde0f6 )
by
unknown
16:05 queued 10s
created
admin/partials/menu/support.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,21 +9,21 @@
 block discarded – undo
9 9
 <div class="wrap yikes-easy-mc-support-wrap"> 
10 10
 
11 11
 	<!-- Freddie Logo -->
12
-	<img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
12
+	<img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
13 13
 
14
-	<h1>Easy Forms for Mailchimp | <?php _e( 'Support' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
14
+	<h1>Easy Forms for Mailchimp | <?php _e( 'Support', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
15 15
 		<!-- Support Page Description -->
16
-	<p class="yikes-easy-mc-about-text about-text"><?php _e( 'If you have questions, we have answers!' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
16
+	<p class="yikes-easy-mc-about-text about-text"><?php _e( 'If you have questions, we have answers!', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
17 17
 
18
-	<?php if( get_option( 'yikes-easy-mc-active-addons' , array() ) == array() ) { ?>
19
-		<p><?php _e( 'Users of the free version of Easy Forms for Mailchimp can post questions to our support forum on the WordPress Plugin Directory. We aim to respond to support requests for the free version of the plugin within a week.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
-		<p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support. <a href="%s" target="_blank" title="' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!' , 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p>
18
+	<?php if ( get_option( 'yikes-easy-mc-active-addons', array() ) == array() ) { ?>
19
+		<p><?php _e( 'Users of the free version of Easy Forms for Mailchimp can post questions to our support forum on the WordPress Plugin Directory. We aim to respond to support requests for the free version of the plugin within a week.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
+		<p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support. <a href="%s" target="_blank" title="' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Check out our paid add-ons', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!', 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p>
21 21
 	<?php } else { ?>
22
-		<p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
23
-		<p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:[email protected]'>[email protected]</a> and a ticket will be created." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
22
+		<p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
23
+		<p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:[email protected]'>[email protected]</a> and a ticket will be created.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
24 24
 	<?php } ?>
25 25
 
26
-		<p><?php printf( __( 'Before submitting a support request, please visit our %s.' , 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help' ); ?></p>
26
+		<p><?php printf( __( 'Before submitting a support request, please visit our %s.', 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help' ); ?></p>
27 27
 
28 28
 	<hr />
29 29
 	
Please login to merge, or discard this patch.
admin/partials/menu/manage-forms.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@  discard block
 block discarded – undo
6 6
 $all_forms = $form_interface->get_all_forms();
7 7
 
8 8
 /* Store Data if User is Authorized */
9
-if( $this->is_user_mc_api_valid_form( false ) == 'valid' ) {
9
+if ( $this->is_user_mc_api_valid_form( false ) == 'valid' ) {
10 10
 	$list_data = yikes_get_mc_api_manager()->get_list_handler()->get_lists();
11 11
 	if ( is_wp_error( $list_data ) ) {
12 12
 		$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
13 13
 		$error_logging->maybe_write_to_log(
14 14
 			$list_data->get_error_code(),
15
-			__( "Get Account Lists" , 'yikes-inc-easy-mailchimp-extender' ),
15
+			__( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ),
16 16
 			"Manage Forms Page"
17 17
 		);
18 18
 		$list_data = array();
@@ -23,24 +23,24 @@  discard block
 block discarded – undo
23 23
 ?>
24 24
 <div class="wrap">
25 25
 	<!-- Freddie Logo -->
26
-	<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" />
26
+	<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" />
27 27
 
28
-	<h1>Easy Forms for Mailchimp | <?php _e( 'Manage Forms' , 'yikes-inc-easy-mailchimp-extender' ) ?></h1>
28
+	<h1>Easy Forms for Mailchimp | <?php _e( 'Manage Forms', 'yikes-inc-easy-mailchimp-extender' ) ?></h1>
29 29
 
30 30
 	<!-- Settings Page Description -->
31
-	<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Create and manage your Mailchimp forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
31
+	<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Create and manage your Mailchimp forms.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
32 32
 
33 33
 	<!-- Action Notices -->
34 34
 	<?php
35 35
 
36 36
 	/* If the user hasn't authenticated yet, lets kill off */
37
-	if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) != 'valid_api_key' ) {
38
-		wp_die( '<div class="error"><p>' . sprintf( __( 'You need to connect to Mailchimp before you can start creating forms. Head over to the <a href="%s" title="Settings Page">Settings Page</a> and enter your API key.' , 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings' ) ) ) . '</p></div>' , 500 );
37
+	if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) != 'valid_api_key' ) {
38
+		wp_die( '<div class="error"><p>' . sprintf( __( 'You need to connect to Mailchimp before you can start creating forms. Head over to the <a href="%s" title="Settings Page">Settings Page</a> and enter your API key.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings' ) ) ) . '</p></div>', 500 );
39 39
 	}
40 40
 
41 41
 	/* Display our admin notices here */
42 42
 	// delete form success
43
-	if( isset( $_REQUEST['deleted-form'] ) && $_REQUEST['deleted-form'] == 'true' ) {
43
+	if ( isset( $_REQUEST[ 'deleted-form' ] ) && $_REQUEST[ 'deleted-form' ] == 'true' ) {
44 44
 		?>
45 45
 		<div class="updated manage-form-admin-notice">
46 46
 			<p><?php _e( 'Opt-in form successfully deleted.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 		<?php
49 49
 	}
50 50
 	// duplicate form success
51
-	if( isset( $_REQUEST['duplicated-form'] ) && $_REQUEST['duplicated-form'] == 'true' ) {
51
+	if ( isset( $_REQUEST[ 'duplicated-form' ] ) && $_REQUEST[ 'duplicated-form' ] == 'true' ) {
52 52
 		?>
53 53
 		<div class="updated manage-form-admin-notice">
54 54
 			<p><?php _e( 'Mailchimp Form successfully cloned.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		<?php
57 57
 	}
58 58
 	// duplicate form error
59
-	if( isset( $_REQUEST['duplicated-form'] ) && $_REQUEST['duplicated-form'] == 'false' ) {
59
+	if ( isset( $_REQUEST[ 'duplicated-form' ] ) && $_REQUEST[ 'duplicated-form' ] == 'false' ) {
60 60
 		?>
61 61
 		<div class="error manage-form-admin-notice">
62 62
 			<p><?php _e( 'There was an error trying to clone your form. Please try again. If this error persists, please contact the YIKES Inc. support team.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		<?php
65 65
 	}
66 66
 	// reset form submission stats success
67
-	if( isset( $_REQUEST['reset-stats'] ) && $_REQUEST['reset-stats'] == 'true' ) {
67
+	if ( isset( $_REQUEST[ 'reset-stats' ] ) && $_REQUEST[ 'reset-stats' ] == 'true' ) {
68 68
 		?>
69 69
 		<div class="updated manage-form-admin-notice">
70 70
 			<p><?php _e( 'Form submission stats/rates successfully reset.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		<?php
73 73
 	}
74 74
 	// reset form submission stats error
75
-	if( isset( $_REQUEST['reset-stats'] ) && $_REQUEST['reset-stats'] == 'false' ) {
75
+	if ( isset( $_REQUEST[ 'reset-stats' ] ) && $_REQUEST[ 'reset-stats' ] == 'false' ) {
76 76
 		?>
77 77
 		<div class="error manage-form-admin-notice">
78 78
 			<p><?php _e( 'There was an error trying to reset the form submission stats/rates. Please try again. If this error persists, please contact the YIKES Inc. support team.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
 								<thead>
100 100
 									<tr>
101 101
 										<th id="cb" class="manage-column column-cb check-column num" scope="col"><input type="checkbox" /></th>
102
-										<th id="columnname" class="manage-column column-columnname num yikes-form-id-number" scope="col"><?php _e( 'ID' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
103
-										<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
104
-										<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Description' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
105
-										<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
106
-										<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Impressions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
107
-										<th id="columnname" class="manage-column column-columnname num" scope="col" ><?php _e( 'Submissions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
108
-										<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Conversion Rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
102
+										<th id="columnname" class="manage-column column-columnname num yikes-form-id-number" scope="col"><?php _e( 'ID', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
103
+										<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Name', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
104
+										<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Description', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
105
+										<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
106
+										<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Impressions', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
107
+										<th id="columnname" class="manage-column column-columnname num" scope="col" ><?php _e( 'Submissions', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
108
+										<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Conversion Rate', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
109 109
 									</tr>
110 110
 								</thead>
111 111
 								<!-- end header -->
@@ -114,13 +114,13 @@  discard block
 block discarded – undo
114 114
 								<tfoot>
115 115
 									<tr>
116 116
 										<th class="manage-column column-cb check-column num" scope="col"><input type="checkbox" /></th>
117
-										<th id="columnname" class="manage-column column-columnname num yikes-form-id-number" scope="col"><?php _e( 'ID' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
118
-										<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
119
-										<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Description' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
120
-										<th class="manage-column column-columnname" scope="col"><?php _e( 'List' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
121
-										<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Impressions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
122
-										<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Submissions' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
123
-										<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Conversion Rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
117
+										<th id="columnname" class="manage-column column-columnname num yikes-form-id-number" scope="col"><?php _e( 'ID', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
118
+										<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Name', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
119
+										<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'Form Description', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
120
+										<th class="manage-column column-columnname" scope="col"><?php _e( 'List', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
121
+										<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Impressions', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
122
+										<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Submissions', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
123
+										<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Conversion Rate', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
124 124
 									</tr>
125 125
 								</tfoot>
126 126
 								<!-- end footer -->
@@ -130,40 +130,40 @@  discard block
 block discarded – undo
130 130
 									<?php
131 131
 									if ( count( $all_forms ) > 0 ) {
132 132
 										$i = 1;
133
-										foreach( $all_forms as $id => $form ) {
133
+										foreach ( $all_forms as $id => $form ) {
134 134
 										?>
135
-										<tr class="<?php if( $i % 2 == 0 ) { echo 'alternate'; } ?>">
135
+										<tr class="<?php if ( $i % 2 == 0 ) { echo 'alternate'; } ?>">
136 136
 											<th class="check-column num" scope="row"><input type="checkbox" /></th>
137 137
 											<td class="column-columnname num"><span class="form-id-container"><?php echo intval( $id ); ?></span></td>
138 138
 											<td class="column-columnname">
139 139
 												<!-- row title/link -->
140
-												<a href="<?php echo esc_url_raw( add_query_arg( array( 'id' => $id ) , admin_url( 'admin.php?page=yikes-mailchimp-edit-form' ) ) ); ?>" class="row-title">
141
-													<?php echo stripslashes( $form['form_name'] ); ?>
140
+												<a href="<?php echo esc_url_raw( add_query_arg( array( 'id' => $id ), admin_url( 'admin.php?page=yikes-mailchimp-edit-form' ) ) ); ?>" class="row-title">
141
+													<?php echo stripslashes( $form[ 'form_name' ] ); ?>
142 142
 												</a>
143 143
 												<div class="row-actions">
144
-													<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'id' => $id ) , admin_url( 'admin.php?page=yikes-mailchimp-edit-form' ) ) ); ?>"><?php _e( "Edit" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
145
-													<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-duplicate-form', 'mailchimp-form' => $id , 'nonce' => wp_create_nonce( 'duplicate-mailchimp-form-'.$id ) ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>"><?php _e( "Duplicate" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
146
-													<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-reset-stats', 'mailchimp-form' => $id , 'nonce' => wp_create_nonce( 'reset-stats-mailchimp-form-'.$id ) ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>"><?php _e( "Reset Stats" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
147
-													<span><a href="#" class="view-yikes-mc-form-shortcode" data-alt-text="<?php _e( 'Stats' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( "Shortcode" , 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
144
+													<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'id' => $id ), admin_url( 'admin.php?page=yikes-mailchimp-edit-form' ) ) ); ?>"><?php _e( "Edit", 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
145
+													<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-duplicate-form', 'mailchimp-form' => $id, 'nonce' => wp_create_nonce( 'duplicate-mailchimp-form-' . $id ) ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>"><?php _e( "Duplicate", 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
146
+													<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-reset-stats', 'mailchimp-form' => $id, 'nonce' => wp_create_nonce( 'reset-stats-mailchimp-form-' . $id ) ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>"><?php _e( "Reset Stats", 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
147
+													<span><a href="#" class="view-yikes-mc-form-shortcode" data-alt-text="<?php _e( 'Stats', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( "Shortcode", 'yikes-inc-easy-mailchimp-extender' ); ?></a> |</span>
148 148
 													<?php
149 149
 														/*
150 150
 														*	Custom action to allow users to add additional action links
151 151
 														*	to each form. We use this in our add-ons.
152 152
 														*	- Delete should remain last
153 153
 														*/
154
-														do_action( 'yikes-mailchimp-custom-form-actions' , $id );
154
+														do_action( 'yikes-mailchimp-custom-form-actions', $id );
155 155
 													?>
156
-													<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-delete-form', 'mailchimp-form' => $id , 'nonce' => wp_create_nonce( 'delete-mailchimp-form-'.$id ) ) , admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>" class="yikes-delete-mailchimp-form" onclick="return confirm('<?php printf( __( 'Are you sure you want to delete the %s form? This cannot be undone.' , 'yikes-inc-easy-mailchimp-extender' ), stripslashes( $form['form_name'] ) ); ?>');"><?php _e( "Delete" , 'yikes-inc-easy-mailchimp-extender' ); ?></a></span>
156
+													<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-delete-form', 'mailchimp-form' => $id, 'nonce' => wp_create_nonce( 'delete-mailchimp-form-' . $id ) ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?>" class="yikes-delete-mailchimp-form" onclick="return confirm('<?php printf( __( 'Are you sure you want to delete the %s form? This cannot be undone.', 'yikes-inc-easy-mailchimp-extender' ), stripslashes( $form[ 'form_name' ] ) ); ?>');"><?php _e( "Delete", 'yikes-inc-easy-mailchimp-extender' ); ?></a></span>
157 157
 												</div>
158 158
 											</td>
159 159
 
160
-											<td class="column-columnname"><?php echo isset( $form['form_description'] ) ? str_replace( '[yikes-mailchimp-subscriber-count]', do_shortcode( '[yikes-mailchimp-subscriber-count form="' . $id . '"]' ), $form['form_description'] ) : ''; ?></td>
160
+											<td class="column-columnname"><?php echo isset( $form[ 'form_description' ] ) ? str_replace( '[yikes-mailchimp-subscriber-count]', do_shortcode( '[yikes-mailchimp-subscriber-count form="' . $id . '"]' ), $form[ 'form_description' ] ) : ''; ?></td>
161 161
 											<td class="column-columnname">
162 162
 												<?php
163 163
 												if ( $list_data && count( $list_data ) > 0 ) {
164 164
 													$parsed = wp_list_pluck( $list_data, 'name', 'id' );
165
-													if ( isset( $parsed[ $form['list_id'] ] ) ) {
166
-														echo esc_textarea( $parsed[ $form['list_id'] ] );
165
+													if ( isset( $parsed[ $form[ 'list_id' ] ] ) ) {
166
+														echo esc_textarea( $parsed[ $form[ 'list_id' ] ] );
167 167
 													} else {
168 168
 														echo '<strong>' . __( 'List Not Found', 'yikes-inc-easy-mailchimp-extender' ) . '</strong>';
169 169
 													}
@@ -172,25 +172,25 @@  discard block
 block discarded – undo
172 172
 
173 173
 											<td class="column-columnname num stat-container">
174 174
 												<?php
175
-													$impressions = number_format( $form['impressions'] );
176
-													echo '<span title="' . __( 'Impressions' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . $impressions . '</span>';
175
+													$impressions = number_format( $form[ 'impressions' ] );
176
+													echo '<span title="' . __( 'Impressions', 'yikes-inc-easy-mailchimp-extender' ) . '">' . $impressions . '</span>';
177 177
 												?>
178 178
 											</td>
179 179
 											<td class="column-columnname num stat-container">
180 180
 												<?php
181
-													$submissions = number_format( $form['submissions'] );
182
-													echo '<span title="' . __( 'Submissions' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . $submissions . '</span>';
181
+													$submissions = number_format( $form[ 'submissions' ] );
182
+													echo '<span title="' . __( 'Submissions', 'yikes-inc-easy-mailchimp-extender' ) . '">' . $submissions . '</span>';
183 183
 												?>
184 184
 											</td>
185 185
 											<td class="column-columnname num stat-container">
186 186
 												<?php
187
-													if( $impressions != 0 ) {
188
-														$conversion_rate = ( round( 100 * $form['submissions'] / $form['impressions'] , 3 ) );
189
-														if( $conversion_rate >= '15' ) {
187
+													if ( $impressions != 0 ) {
188
+														$conversion_rate = ( round( 100 * $form[ 'submissions' ] / $form[ 'impressions' ], 3 ) );
189
+														if ( $conversion_rate >= '15' ) {
190 190
 															$conversion_color = '#00cc00'; // green (unicorn!)
191
-														} else if( $conversion_rate < '15' && $conversion_rate >= '10' ) {
191
+														} else if ( $conversion_rate < '15' && $conversion_rate >= '10' ) {
192 192
 															$conversion_color = '#0080FF'; // light blue (good)
193
-														} else if( $conversion_rate < '10' && $conversion_rate >= '5' ) {
193
+														} else if ( $conversion_rate < '10' && $conversion_rate >= '5' ) {
194 194
 															$conversion_color = '#FFFF32'; // yellow (ok)
195 195
 														} else {
196 196
 															$conversion_color = '#FF0000'; // red (no bueno)
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 														$conversion_rate = '0';
200 200
 														$conversion_color = '#333333';
201 201
 													}
202
-													echo '<span style="color:' . esc_attr( $conversion_color ) . ';" title="' . esc_attr__( 'Conversion Rate' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . $conversion_rate . '%</span>';
202
+													echo '<span style="color:' . esc_attr( $conversion_color ) . ';" title="' . esc_attr__( 'Conversion Rate', 'yikes-inc-easy-mailchimp-extender' ) . '">' . $conversion_rate . '%</span>';
203 203
 												?>
204 204
 											</td>
205 205
 											<!-- shortcode -->
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 											}
213 213
 										} else { ?>
214 214
 										<tr class="no-items">
215
-											<td class="colspanchange no-mailchimp-forms-found" colspan="8"><em><?php _e( 'No Mailchimp forms found. Use the form to the right to create a new one.' , 'yikes-inc-easy-mailchimp-extender' ); ?></em></td>
215
+											<td class="colspanchange no-mailchimp-forms-found" colspan="8"><em><?php _e( 'No Mailchimp forms found. Use the form to the right to create a new one.', 'yikes-inc-easy-mailchimp-extender' ); ?></em></td>
216 216
 										</tr>
217 217
 									<?php } ?>
218 218
 								</tbody>
Please login to merge, or discard this patch.
admin/partials/menu/options.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@  discard block
 block discarded – undo
5 5
 */
6 6
 
7 7
 	/* Get and Store Option Values */
8
-	if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) === 'valid_api_key' ) {
9
-		$api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the Mailchimp API" , "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
8
+	if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) === 'valid_api_key' ) {
9
+		$api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the Mailchimp API", "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected", 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
10 10
 		$api_error_response = '';
11 11
 	} else {
12
-		$api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span>  ' . __( "Not Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
-		if( get_option( 'yikes-mc-api-invalid-key-response' , '' ) != '' ) {
14
-			$api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response' , '' ) . '</small></p>';
12
+		$api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span>  ' . __( "Not Connected", 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
+		if ( get_option( 'yikes-mc-api-invalid-key-response', '' ) != '' ) {
14
+			$api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response', '' ) . '</small></p>';
15 15
 		} else {
16 16
 			$api_error_response = '';
17 17
 		}
@@ -23,23 +23,23 @@  discard block
 block discarded – undo
23 23
 	* @since 6.2.2
24 24
 	*
25 25
 	*/
26
-	if ( isset( $_REQUEST['section'] ) ) {
27
-		$_REQUEST['section'] = preg_replace('/[^\w-]/', '', strip_tags ( $_REQUEST['section'] ) );
26
+	if ( isset( $_REQUEST[ 'section' ] ) ) {
27
+		$_REQUEST[ 'section' ] = preg_replace( '/[^\w-]/', '', strip_tags( $_REQUEST[ 'section' ] ) );
28 28
 	}
29 29
 ?>
30 30
 	<!-- Actual Settings Form -->
31 31
 	<div class="wrap">
32 32
 
33 33
 		<!-- Freddie Logo -->
34
-		<img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
34
+		<img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
35 35
 
36
-		<h1>Easy Forms for Mailchimp | <?php if ( isset( $_REQUEST['section'] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST['section'] ) ); } else { echo __( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
36
+		<h1>Easy Forms for Mailchimp | <?php if ( isset( $_REQUEST[ 'section' ] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST[ 'section' ] ) ); } else { echo __( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
37 37
 
38 38
 		<!-- Settings Page Description -->
39
-		<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Manage the overall settings for Easy forms for Mailchimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
39
+		<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Manage the overall settings for Easy forms for Mailchimp.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
40 40
 		<?php
41 41
 			/* Success Messages on Options Updated */
42
-			if( isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ) {
42
+			if ( isset( $_REQUEST[ 'settings-updated' ] ) && $_REQUEST[ 'settings-updated' ] == 'true' ) {
43 43
 				?>
44 44
 				<div class="updated manage-form-admin-notice">
45 45
 					<p><?php _e( 'Settings successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 				<?php
48 48
 			}
49 49
 			/* Mailchimp API Cleared Successfully message */
50
-			if( isset( $_REQUEST['transient-cleared'] ) && $_REQUEST['transient-cleared'] == 'true' ) {
50
+			if ( isset( $_REQUEST[ 'transient-cleared' ] ) && $_REQUEST[ 'transient-cleared' ] == 'true' ) {
51 51
 				?>
52 52
 				<div class="updated manage-form-admin-notice">
53 53
 					<p><?php _e( 'Mailchimp API Cache successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 			}
57 57
 			/* Error Log Clear Messages */
58 58
 				/* Success Messages on Options Updated */
59
-				if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'true' ) {
59
+				if ( isset( $_REQUEST[ 'error-log-cleared' ] ) && $_REQUEST[ 'error-log-cleared' ] == 'true' ) {
60 60
 					?>
61 61
 					<div class="updated manage-form-admin-notice">
62 62
 						<p><?php _e( 'Error log successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 					<?php
65 65
 				}
66 66
 				/* Mailchimp API Cleared Successfully message */
67
-				if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'false' ) {
67
+				if ( isset( $_REQUEST[ 'error-log-cleared' ] ) && $_REQUEST[ 'error-log-cleared' ] == 'false' ) {
68 68
 					?>
69 69
 					<div class="error manage-form-admin-notice">
70 70
 						<p><?php _e( "Whoops! We've encountered an error while trying to clear the error log. Please refresh the page and try again. If the error persists please get in touch with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -73,28 +73,28 @@  discard block
 block discarded – undo
73 73
 				}
74 74
 
75 75
 				/* Display a success message if our error log was sucessfully created, or display an error if not */
76
-				if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'true' ) {
76
+				if ( isset( $_GET[ 'error_log_created' ] ) && $_GET[ 'error_log_created' ] == 'true' ) {
77 77
 					?>
78 78
 					<div class="updated">
79 79
 						<p><?php _e( 'Error log successfully created. You may now start logging errors.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
80 80
 					</div>
81 81
 					<?php
82
-				} else if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'false' ) {
82
+				} else if ( isset( $_GET[ 'error_log_created' ] ) && $_GET[ 'error_log_created' ] == 'false' ) {
83 83
 					?>
84 84
 					<div class="error">
85
-						<p><?php echo esc_attr( urldecode( $_GET['error_message'] ) , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
85
+						<p><?php echo esc_attr( urldecode( $_GET[ 'error_message' ] ), 'yikes-inc-easy-mailchimp-extender' ); ?></p>
86 86
 					</div>
87 87
 					<?php
88 88
 				}
89 89
 
90 90
 				/* Display a success message if the user successfully imported some forms */
91
-				if( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-forms'] ) && $_GET['import-forms'] == 'true' ) {
91
+				if ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'import-export-forms' && isset( $_GET[ 'import-forms' ] ) && $_GET[ 'import-forms' ] == 'true' ) {
92 92
 					?>
93 93
 					<div class="updated">
94 94
 						<p><?php printf( __( 'Opt-in forms successfully imported. <a href="%s" title="View Forms">View Forms</a>', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
95 95
 					</div>
96 96
 					<?php
97
-				} elseif( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-settings'] ) && $_GET['import-settings'] == 'true' ) {
97
+				} elseif ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'import-export-forms' && isset( $_GET[ 'import-settings' ] ) && $_GET[ 'import-settings' ] == 'true' ) {
98 98
 					?>
99 99
 					<div class="updated">
100 100
 						<p><?php printf( __( 'YIKES Easy Forms for Mailchimp settings successfully imported.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
 
116 116
 						<div class="postbox yikes-easy-mc-postbox">
117 117
 
118
-							<?php if( !isset( $_REQUEST['section'] ) || $_REQUEST['section'] == '' ) {
118
+							<?php if ( ! isset( $_REQUEST[ 'section' ] ) || $_REQUEST[ 'section' ] == '' ) {
119 119
 								include YIKES_MC_PATH . 'admin/partials/menu/options-sections/general-settings.php';
120 120
 							} else {
121
-								if( isset( $_REQUEST['addon'] ) && $_REQUEST['addon'] == 'true' ) {
122
-									include apply_filters( 'yikes-mailchimp-'.$_REQUEST['section'].'-options-path' , '' );
121
+								if ( isset( $_REQUEST[ 'addon' ] ) && $_REQUEST[ 'addon' ] == 'true' ) {
122
+									include apply_filters( 'yikes-mailchimp-' . $_REQUEST[ 'section' ] . '-options-path', '' );
123 123
 								} else {
124 124
 									// White list a set of files that are allowed to be included here
125 125
 									$file_base = 'admin/partials/menu/options-sections/';
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 										$file_base . 'recaptcha-settings.php',
133 133
 									);
134 134
 									// Ensure the included file is allowed and whitelisted above, before including it
135
-									if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php', $acceptable_files ) ) {
136
-										include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php';
135
+									if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST[ 'section' ] . '.php', $acceptable_files ) ) {
136
+										include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST[ 'section' ] . '.php';
137 137
 									} else {
138 138
 										wp_die( esc_attr__( 'Invalid file. If this error persists, please contact support.', 'yikes-inc-easy-mailchimp' ) );
139 139
 									}
Please login to merge, or discard this patch.
admin/partials/menu/manage-lists.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -27,16 +27,16 @@  discard block
 block discarded – undo
27 27
 ?>
28 28
 <div class="wrap">
29 29
 	<!-- Freddie Logo -->
30
-	<img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - Mailchimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
30
+	<img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png'; ?>" alt="<?php __( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
31 31
 
32
-	<h1>Easy Forms for Mailchimp | <?php _e( 'Manage Mailing Lists' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
32
+	<h1>Easy Forms for Mailchimp | <?php _e( 'Manage Mailing Lists', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
33 33
 
34 34
 	<!-- Settings Page Description -->
35
-	<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Make edits to your Mailchimp lists.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
35
+	<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Make edits to your Mailchimp lists.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
36 36
 
37 37
 	<?php
38 38
 		/* If the user hasn't authenticated yet, lets kill off */
39
-		if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) != 'valid_api_key' ) {
39
+		if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) != 'valid_api_key' ) {
40 40
 
41 41
 			$error_string = sprintf(
42 42
 				esc_html__( 'You need to connect to Mailchimp before you can start creating forms. Head over to the %s and enter your API key.', 'yikes-inc-easy-mailchimp-extender' ),
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 									<!-- TABLE HEAD -->
73 73
 									<thead>
74 74
 										<tr>
75
-											<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
76
-											<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
75
+											<th id="columnname" class="manage-column column-columnname" scope="col"><?php _e( 'List Name', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
76
+											<th id="columnname" class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
77 77
 										</tr>
78 78
 									</thead>
79 79
 									<!-- end header -->
@@ -81,25 +81,25 @@  discard block
 block discarded – undo
81 81
 									<!-- FOOTER -->
82 82
 									<tfoot>
83 83
 										<tr>
84
-											<th class="manage-column column-columnname" scope="col"><?php _e( 'List Name' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
85
-											<th class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
84
+											<th class="manage-column column-columnname" scope="col"><?php _e( 'List Name', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
85
+											<th class="manage-column column-columnname num" scope="col"><?php _e( 'Subscriber Count', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
86 86
 										</tr>
87 87
 									</tfoot>
88 88
 									<!-- end footer -->
89 89
 
90 90
 									<!-- TABLE BODY -->
91 91
 									<tbody>
92
-										<?php if( count( $list_data ) > 0 ) {
92
+										<?php if ( count( $list_data ) > 0 ) {
93 93
 											$i = 1;
94
-											foreach( $list_data as $list ) {
94
+											foreach ( $list_data as $list ) {
95 95
 												?>
96
-												<tr class="<?php if( $i % 2 == 0 ) { echo 'alternate'; } ?>">
96
+												<tr class="<?php if ( $i % 2 == 0 ) { echo 'alternate'; } ?>">
97 97
 													<td class="column-columnname">
98
-														<a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list['id'] ) , admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>" class="row-title">
99
-															<?php echo stripslashes( $list['name'] ); ?>
98
+														<a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list[ 'id' ] ), admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>" class="row-title">
99
+															<?php echo stripslashes( $list[ 'name' ] ); ?>
100 100
 														</a>
101 101
 														<div class="row-actions">
102
-															<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list['id'] ) , admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>"><?php _e( "View" , 'yikes-inc-easy-mailchimp-extender' ); ?></a></span>
102
+															<span><a href="<?php echo esc_url_raw( add_query_arg( array( 'list-id' => $list[ 'id' ] ), admin_url( 'admin.php?page=yikes-mailchimp-view-list' ) ) ); ?>"><?php _e( "View", 'yikes-inc-easy-mailchimp-extender' ); ?></a></span>
103 103
 															<?php
104 104
 																/*
105 105
 																*	Custom action to allow users to add additional action links
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 															?>
110 110
 														</div>
111 111
 													</td>
112
-													<td class="column-columnname num"><?php echo $list['stats']['member_count']; ?></td>
112
+													<td class="column-columnname num"><?php echo $list[ 'stats' ][ 'member_count' ]; ?></td>
113 113
 												</tr>
114 114
 												<?php
115 115
 												$i++;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 											} else {
118 118
 											?>
119 119
 											<tr class="no-items">
120
-												<td class="colspanchange no-mailchimp-lists-found" colspan="3"><em><?php printf( __( 'No Mailchimp lists found. Head over to <a href="%s" title="Mailchimp.com">Mailchimp.com</a> to setup your first mailing list. Once thats done you can head back here to customize it!' , 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'http://mailchimp.com/' ) ); ?></em></td>
120
+												<td class="colspanchange no-mailchimp-lists-found" colspan="3"><em><?php printf( __( 'No Mailchimp lists found. Head over to <a href="%s" title="Mailchimp.com">Mailchimp.com</a> to setup your first mailing list. Once thats done you can head back here to customize it!', 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'http://mailchimp.com/' ) ); ?></em></td>
121 121
 											</tr>
122 122
 										<?php } ?>
123 123
 									</tbody>
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
 					<div class="postbox yikes-easy-mc-postbox">
138 138
 						<div class="inside">
139 139
 
140
-							<a href="https://us3.admin.mailchimp.com/" title="<?php _e( 'Mailchimp Site' , 'yikes-inc-easy-mailchimp-extender' ); ?>" target="_blank">
141
-								<img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/mailchimp-logo.png'; ?>" title="<?php _e( 'Mailchimp Site' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="list-page-mailchimp-logo">
140
+							<a href="https://us3.admin.mailchimp.com/" title="<?php _e( 'Mailchimp Site', 'yikes-inc-easy-mailchimp-extender' ); ?>" target="_blank">
141
+								<img src="<?php echo YIKES_MC_URL . 'includes/images/Mailchimp_Assets/mailchimp-logo.png'; ?>" title="<?php _e( 'Mailchimp Site', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="list-page-mailchimp-logo">
142 142
 							</a>
143 143
 
144 144
 						</div>
@@ -148,42 +148,42 @@  discard block
 block discarded – undo
148 148
 					<div class="postbox yikes-easy-mc-postbox list-page-sidebar">
149 149
 						<div class="inside">
150 150
 
151
-							<h2 class="account-status"><?php echo $account_details['username']; ?> <small>(<?php echo $account_details['role']; ?>)</small></h2>
151
+							<h2 class="account-status"><?php echo $account_details[ 'username' ]; ?> <small>(<?php echo $account_details[ 'role' ]; ?>)</small></h2>
152 152
 
153
-							<img class="mailchimp-avatar" src="<?php echo esc_url_raw( $account_details['avatar_url'] ); ?>" title="<?php echo $account_details['username'] . ' ' . __( "Mailchimp avatar" , 'yikes-inc-easy-mailchimp-extender' ); ?>">
153
+							<img class="mailchimp-avatar" src="<?php echo esc_url_raw( $account_details[ 'avatar_url' ] ); ?>" title="<?php echo $account_details[ 'username' ] . ' ' . __( "Mailchimp avatar", 'yikes-inc-easy-mailchimp-extender' ); ?>">
154 154
 
155 155
 							<table class="form-table" id="account-details-table">
156 156
 								<tr valign="top">
157 157
 									<td scope="row">
158 158
 										<label for="tablecell">
159
-											<strong><?php _e( 'Company' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
159
+											<strong><?php _e( 'Company', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
160 160
 										</label>
161 161
 									</td>
162
-									<td><?php echo $account_details['contact']['company']; ?><br /><?php echo $account_details['contact']['city'] . ', ' . $account_details['contact']['state']; ?></td>
162
+									<td><?php echo $account_details[ 'contact' ][ 'company' ]; ?><br /><?php echo $account_details[ 'contact' ][ 'city' ] . ', ' . $account_details[ 'contact' ][ 'state' ]; ?></td>
163 163
 								</tr>
164 164
 								<tr valign="top">
165 165
 									<td scope="row">
166 166
 										<label for="tablecell">
167
-											<strong><?php _e( 'Industry' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
167
+											<strong><?php _e( 'Industry', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
168 168
 										</label>
169 169
 									</td>
170
-									<td><?php echo $account_details['account_industry']; ?></td>
170
+									<td><?php echo $account_details[ 'account_industry' ]; ?></td>
171 171
 								</tr>
172 172
 								<tr valign="top">
173 173
 									<td scope="row">
174 174
 										<label for="tablecell">
175
-											<strong><?php _e( 'Member Since' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
175
+											<strong><?php _e( 'Member Since', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
176 176
 										</label>
177 177
 									</td>
178
-									<td><?php echo date( get_option('date_format') , strtotime( $account_details['member_since'] ) ); ?></td>
178
+									<td><?php echo date( get_option( 'date_format' ), strtotime( $account_details[ 'member_since' ] ) ); ?></td>
179 179
 								</tr>
180 180
 								<tr valign="top">
181 181
 									<td scope="row">
182 182
 										<label for="tablecell">
183
-											<strong><?php _e( 'Plan Type' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
183
+											<strong><?php _e( 'Plan Type', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
184 184
 										</label>
185 185
 									</td>
186
-									<td><?php echo ucwords( $account_details['pricing_plan_type'] ); ?></td>
186
+									<td><?php echo ucwords( $account_details[ 'pricing_plan_type' ] ); ?></td>
187 187
 								</tr>
188 188
 							</table>
189 189
 
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/integration-settings.php 2 patches
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -54,23 +54,23 @@  discard block
 block discarded – undo
54 54
 
55 55
 	// Easy Digital Downloads.
56 56
 	if ( class_exists( 'Easy_Digital_Downloads' ) ) {
57
-		$active_plugins['easy_digital_downloads_checkout_form'] = __( 'Easy Digital Downloads Checkout', 'yikes-inc-easy-mailchimp-extender' );
57
+		$active_plugins[ 'easy_digital_downloads_checkout_form' ] = __( 'Easy Digital Downloads Checkout', 'yikes-inc-easy-mailchimp-extender' );
58 58
 	}
59 59
 	// WooCommerce.
60 60
 	if ( class_exists( 'WooCommerce' ) ) {
61
-		$active_plugins['woocommerce_checkout_form'] = __( 'WooCommerce Checkout', 'yikes-inc-easy-mailchimp-extender' );
61
+		$active_plugins[ 'woocommerce_checkout_form' ] = __( 'WooCommerce Checkout', 'yikes-inc-easy-mailchimp-extender' );
62 62
 	}
63 63
 	// BuddyPress.
64 64
 	if ( class_exists( 'BuddyPress' ) ) {
65
-		$active_plugins['buddypress_form'] = __( 'BuddyPress Registration', 'yikes-inc-easy-mailchimp-extender' );
65
+		$active_plugins[ 'buddypress_form' ] = __( 'BuddyPress Registration', 'yikes-inc-easy-mailchimp-extender' );
66 66
 	}
67 67
 	// bbPress.
68 68
 	if ( class_exists( 'bbPress' ) ) {
69
-		$active_plugins['bbpress_forms'] = __( 'bbPress', 'yikes-inc-easy-mailchimp-extender' );
69
+		$active_plugins[ 'bbpress_forms' ] = __( 'bbPress', 'yikes-inc-easy-mailchimp-extender' );
70 70
 	}
71 71
 	// Contact Form 7.
72 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' );
73
+		$active_plugins[ 'contact_form_7' ] = __( 'Contact Form 7', 'yikes-inc-easy-mailchimp-extender' );
74 74
 	}
75 75
 
76 76
 	// store our checkbox options.
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
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(),
90
-				__( "Get Account Lists" , 'yikes-inc-easy-mailchimp-extender' ),
90
+				__( "Get Account Lists", 'yikes-inc-easy-mailchimp-extender' ),
91 91
 				"Integration Settings Page"
92 92
 			);
93 93
 		}
@@ -118,26 +118,26 @@  discard block
 block discarded – undo
118 118
 		<?php
119 119
 			if ( ! empty( $active_plugins ) ) {
120 120
 
121
-				foreach( $active_plugins as $class => $value ) {
121
+				foreach ( $active_plugins as $class => $value ) {
122 122
 
123
-					$checked              = isset( $options[$class]['value'] ) ? 'checked="checked"' : '';
124
-					$hidden               = ! isset( $options[$class]['value'] ) ? 'yikes-easy-mc-hidden' : '';
125
-					$checkbox_label       = isset( $options[$class]['label'] ) ? esc_attr( $options[$class]['label'] ) : '';
126
-					$precheck_checkbox    = isset( $options[$class]['precheck'] ) ? $options[$class]['precheck'] : '';
127
-					$selected_list        = isset( $options[$class]['associated-list'] ) ? $options[$class]['associated-list'] : '-';
128
-					$list_interest_groups = isset( $options[$class]['interest-groups'] ) ? $options[$class]['interest-groups'] : false;
123
+					$checked              = isset( $options[ $class ][ 'value' ] ) ? 'checked="checked"' : '';
124
+					$hidden               = ! isset( $options[ $class ][ 'value' ] ) ? 'yikes-easy-mc-hidden' : '';
125
+					$checkbox_label       = isset( $options[ $class ][ 'label' ] ) ? esc_attr( $options[ $class ][ 'label' ] ) : '';
126
+					$precheck_checkbox    = isset( $options[ $class ][ 'precheck' ] ) ? $options[ $class ][ 'precheck' ] : '';
127
+					$selected_list        = isset( $options[ $class ][ 'associated-list' ] ) ? $options[ $class ][ 'associated-list' ] : '-';
128
+					$list_interest_groups = isset( $options[ $class ][ 'interest-groups' ] ) ? $options[ $class ][ 'interest-groups' ] : false;
129 129
 
130 130
 					// Force the selected list to be an array (@since 6.4).
131 131
 					$selected_list        = is_array( $selected_list ) ? $selected_list : array( $selected_list );
132 132
 					?>
133 133
 						<li class="yikes-mailchimp-checkbox-integration-item">
134 134
 							<label>
135
-								<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>
135
+								<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>
136 136
 							</label>
137 137
 						</li>
138 138
 						<!-- checkbox settings, text - associated list etc. -->
139 139
 						<li class="optin-checkbox-init[<?php echo $class; ?>]-settings <?php echo $hidden; ?>">
140
-							<?php if( $class == 'contact_form_7' ) { ?>
140
+							<?php if ( $class == 'contact_form_7' ) { ?>
141 141
 								<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>
142 142
 							<?php } ?>
143 143
 							<p style="margin-top:0;padding-top:0;margin-bottom:0;padding-bottom:0;">
@@ -147,24 +147,24 @@  discard block
 block discarded – undo
147 147
 									<?php
148 148
 									if ( count( $list_data ) > 0 ) {
149 149
 									?>
150
-										<?php foreach( $list_data as $list ) { ?>
150
+										<?php foreach ( $list_data as $list ) { ?>
151 151
 
152 152
 											<?php
153
-												$list_interest_groups = isset( $list_interest_groups[ $list['id'] ] ) ? $list_interest_groups[ $list['id'] ] : $list_interest_groups;
153
+												$list_interest_groups = isset( $list_interest_groups[ $list[ 'id' ] ] ) ? $list_interest_groups[ $list[ 'id' ] ] : $list_interest_groups;
154 154
 											?>
155 155
 
156
-											<label class="yikes-mailchimp-checkbox-integration-list" for="list-<?php echo $class ?>-<?php echo $list['id']; ?>">
156
+											<label class="yikes-mailchimp-checkbox-integration-list" for="list-<?php echo $class ?>-<?php echo $list[ 'id' ]; ?>">
157 157
 												<input type="checkbox" class="checkbox-settings-list-item" data-integration="<?php echo $class; ?>" 
158 158
 													name="optin-checkbox-init[<?php echo $class; ?>][associated-list][]"
159
-													value="<?php echo $list['id']; ?>" <?php echo in_array( $list['id'], $selected_list ) ? 'checked="checked"' : ''; ?> 
160
-													id="list-<?php echo $class ?>-<?php echo $list['id']; ?>">
161
-												<?php echo $list['name']; ?>
159
+													value="<?php echo $list[ 'id' ]; ?>" <?php echo in_array( $list[ 'id' ], $selected_list ) ? 'checked="checked"' : ''; ?> 
160
+													id="list-<?php echo $class ?>-<?php echo $list[ 'id' ]; ?>">
161
+												<?php echo $list[ 'name' ]; ?>
162 162
 											</label>
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 ) {
167
-												YIKES_Inc_Easy_Mailchimp_Process_Ajax::check_list_for_interest_groups( $list['id'], $class, true );
166
+											if ( in_array( $list[ 'id' ], $selected_list ) && $list_interest_groups ) {
167
+												YIKES_Inc_Easy_Mailchimp_Process_Ajax::check_list_for_interest_groups( $list[ 'id' ], $class, true );
168 168
 											}
169 169
 											?>
170 170
 
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
 								<label class="optin-checkbox-label">
186 186
 									<strong><?php _e( 'Precheck Checkbox?', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
187 187
 									<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">
188
-										<option value="true" <?php selected( $precheck_checkbox , 'true' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
189
-										<option value="false" <?php selected( $precheck_checkbox , 'false' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
188
+										<option value="true" <?php selected( $precheck_checkbox, 'true' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
189
+										<option value="false" <?php selected( $precheck_checkbox, 'false' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></option>
190 190
 									</select>
191 191
 								</label>
192 192
 							</p>
Please login to merge, or discard this 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/partials/edit-form.php 1 patch
Spacing   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -2,20 +2,20 @@  discard block
 block discarded – undo
2 2
 <?php
3 3
 
4 4
 // If an error was returned.
5
-if ( isset( $_GET['sql_error'] ) ) {
5
+if ( isset( $_GET[ 'sql_error' ] ) ) {
6 6
 
7 7
 	if ( get_option( 'yikes-mailchimp-debug-status', '' ) === '1' ) {
8
-		wp_die( '<strong>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) . '</strong> <p>' . stripslashes( urldecode( $_GET['sql_error'] ) ) . '</p>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) );
8
+		wp_die( '<strong>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) . '</strong> <p>' . stripslashes( urldecode( $_GET[ 'sql_error' ] ) ) . '</p>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) );
9 9
 	} else {
10 10
 		wp_die( '<strong>' . __( 'Error Creating Form', 'yikes-inc-easy-mailchimp-extender' ) . '</strong><p>' . __( "Please try again. If the error persists please get in contact with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>' );
11 11
 	}
12 12
 }
13 13
 
14 14
 // Get The Form ID.
15
-if ( ! isset( $_GET['id'] ) ) {
15
+if ( ! isset( $_GET[ 'id' ] ) ) {
16 16
 	wp_die( esc_html_e( 'Oh No!', 'yikes-inc-easy-mailchimp-extender' ), esc_html_e( 'Error', 'yikes-inc-easy-mailchimp-extender' ) );
17 17
 }
18
-$form_id = (int) filter_var( wp_unslash( $_GET['id'] ), FILTER_SANITIZE_NUMBER_INT );
18
+$form_id = (int) filter_var( wp_unslash( $_GET[ 'id' ] ), FILTER_SANITIZE_NUMBER_INT );
19 19
 
20 20
 // Get our form interface.
21 21
 $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
 }
36 36
 
37 37
 // Set global form data, mainly for use in custom form field declarations or add-ons.
38
-$GLOBALS['form_data'] = $form;
39
-$custom_styles        = $form['custom_styles'];
40
-$optin_settings       = $form['optin_settings'];
41
-$submission_settings  = $form['submission_settings'];
42
-$error_messages       = $form['error_messages'];
43
-
44
-if ( isset( $form['form_settings'] ) ) {
45
-	$form_settings = $form['form_settings'];
38
+$GLOBALS[ 'form_data' ] = $form;
39
+$custom_styles        = $form[ 'custom_styles' ];
40
+$optin_settings       = $form[ 'optin_settings' ];
41
+$submission_settings  = $form[ 'submission_settings' ];
42
+$error_messages       = $form[ 'error_messages' ];
43
+
44
+if ( isset( $form[ 'form_settings' ] ) ) {
45
+	$form_settings = $form[ 'form_settings' ];
46 46
 }
47 47
 
48 48
 // Get defaults if none are saved in the database yet.
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 }
81 81
 
82 82
 // Get the merge fields.
83
-$available_merge_variables = $list_handler->get_merge_fields( $form['list_id'] );
83
+$available_merge_variables = $list_handler->get_merge_fields( $form[ 'list_id' ] );
84 84
 if ( is_wp_error( $available_merge_variables ) ) {
85 85
 	$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
86 86
 	$error_logging->maybe_write_to_log(
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 }
93 93
 
94 94
 // Get the interest groups.
95
-$interest_groupings = $list_handler->get_interest_categories( $form['list_id'] );
95
+$interest_groupings = $list_handler->get_interest_categories( $form[ 'list_id' ] );
96 96
 if ( is_wp_error( $interest_groupings ) ) {
97 97
 	$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
98 98
 	$error_logging->maybe_write_to_log(
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 }
105 105
 
106 106
 // Get the tags.
107
-$tags = $list_handler->get_segments( $form['list_id'], 'static' );
107
+$tags = $list_handler->get_segments( $form[ 'list_id' ], 'static' );
108 108
 if ( is_wp_error( $tags ) ) {
109 109
 	$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
110 110
 	$error_logging->maybe_write_to_log(
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 $url = add_query_arg(
120 120
 	array(
121 121
 		'action' => 'yikes-easy-mc-update-form',
122
-		'nonce'  => wp_create_nonce( 'update-mailchimp-form-' . $form['id'] ),
122
+		'nonce'  => wp_create_nonce( 'update-mailchimp-form-' . $form[ 'id' ] ),
123 123
 	)
124 124
 );
125 125
 ?>
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
 <img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/Mailchimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - Mailchimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
128 128
 
129 129
 <?php /* translators: the placeholder is the form's name */ ?>
130
-<h1>YIKES Easy Forms for Mailchimp | <?php echo sprintf( esc_html__( 'Edit %1s', 'yikes-inc-easy-mailchimp-extender' ), esc_html( $form['form_name'] ) ); ?></h1>
130
+<h1>YIKES Easy Forms for Mailchimp | <?php echo sprintf( esc_html__( 'Edit %1s', 'yikes-inc-easy-mailchimp-extender' ), esc_html( $form[ 'form_name' ] ) ); ?></h1>
131 131
 
132 132
 <!-- Settings Page Description -->
133 133
 <p class="yikes-easy-mc-about-text about-text"><?php esc_html_e( 'Update this Mailchimp form\'s fields, styles and settings below.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
134 134
 
135 135
 <?php
136
-if ( isset( $_REQUEST['updated-form'] ) && filter_var( $_REQUEST['updated-form'], FILTER_SANITIZE_STRING ) === 'true' ) {
136
+if ( isset( $_REQUEST[ 'updated-form' ] ) && filter_var( $_REQUEST[ 'updated-form' ], FILTER_SANITIZE_STRING ) === 'true' ) {
137 137
 	?>
138 138
 	<div class="updated manage-form-admin-notice">
139 139
 		<p><?php esc_html_e( 'Opt-in form successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -155,13 +155,13 @@  discard block
 block discarded – undo
155 155
 
156 156
 							<label for="form-name">
157 157
 								<h3 class="bg-transparent"><?php esc_html_e( 'Form Name', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
158
-								<input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo esc_html( stripslashes( $form['form_name'] ) ); ?>" class="widefat" />
158
+								<input autocomplete="disabled" id="form-name" name="form-name" type="text" value="<?php echo esc_html( stripslashes( $form[ 'form_name' ] ) ); ?>" class="widefat" />
159 159
 								<p class="description"><?php esc_html_e( 'The title of this signup form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
160 160
 							</label>
161 161
 
162 162
 							<label for="form-description">
163 163
 								<h3 class="bg-transparent"><?php esc_html_e( 'Form Description', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
164
-								<textarea name="form-description" id="form-description" class="large-text edit-form-form-description"><?php echo isset( $form['form_description'] ) ? esc_textarea( stripslashes( $form['form_description'] ) ) : ''; ?></textarea>
164
+								<textarea name="form-description" id="form-description" class="large-text edit-form-form-description"><?php echo isset( $form[ 'form_description' ] ) ? esc_textarea( stripslashes( $form[ 'form_description' ] ) ) : ''; ?></textarea>
165 165
 								<p class="description"><?php esc_html_e( 'Descriptions are optional and you may choose to display it to visitors to your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
166 166
 								<p class="description"><?php printf( esc_html_e( 'To display the number of subscribers for the list associated with this form, use %s in the form description field above.', 'yikes-inc-easy-mailchimp-extender' ), '<code>[yikes-mailchimp-subscriber-count]</code>' ); ?><p>
167 167
 							</label>
@@ -208,26 +208,26 @@  discard block
 block discarded – undo
208 208
 											<div class="meta-box-sortables ui-sortable">
209 209
 												<div class="postbox yikes-easy-mc-postbox">
210 210
 													<!-- container title -->
211
-													<h3 class="edit-form-title" id="form-builder-div" data-form-id="<?php echo esc_attr( $form['id'] ); ?>" data-list-id="<?php echo esc_attr( $form['list_id'] ); ?>" ><?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
211
+													<h3 class="edit-form-title" id="form-builder-div" data-form-id="<?php echo esc_attr( $form[ 'id' ] ); ?>" data-list-id="<?php echo esc_attr( $form[ 'list_id' ] ); ?>" ><?php _e( 'Form Builder', 'yikes-inc-easy-mailchimp-extender' ); ?></h3>
212 212
 													<div class="tags-title" style="display: none;">
213 213
 														<span class="tags-title-text">Tags</span>
214 214
 														<div class="tags-title-container"></div>
215 215
 													</div>
216
-													<p id="edit-form-description" class="description edit-form-description-form-builder"><?php _e( 'Click a field to show its advanced options or drag fields to re-arrange them. Click <span class="dashicons dashicons-edit"></span> to edit a field label. Make sure you hit "Update Form" to save all of your changes.', 'yikes-inc-easy-mailchimp-extender' );?></p>
216
+													<p id="edit-form-description" class="description edit-form-description-form-builder"><?php _e( 'Click a field to show its advanced options or drag fields to re-arrange them. Click <span class="dashicons dashicons-edit"></span> to edit a field label. Make sure you hit "Update Form" to save all of your changes.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
217 217
 													<div id="form-builder-container" class="inside">
218 218
 														<!-- #poststuff -->
219
-														<?php echo $this->generate_form_editor( $form['fields'], $form['list_id'], $available_merge_variables, isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
219
+														<?php echo $this->generate_form_editor( $form[ 'fields' ], $form[ 'list_id' ], $available_merge_variables, isset( $interest_groupings ) ? $interest_groupings : array() ); ?>
220 220
 													</div>
221 221
 
222 222
 													<!-- Bulk Delete Form Fields -->
223
-													<a href="#" class="clear-form-fields" <?php if( isset( $form['fields'] ) && count( $form['fields'] ) <= 0 ) { ?> style="display:none;" <?php } ?>><?php _e( 'Clear Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
223
+													<a href="#" class="clear-form-fields" <?php if ( isset( $form[ 'fields' ] ) && count( $form[ 'fields' ] ) <= 0 ) { ?> style="display:none;" <?php } ?>><?php _e( 'Clear Form Fields', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
224 224
 
225 225
 													<?php
226
-														$display_none = ( isset( $form['fields'] ) && count( $form['fields'] ) <= 0 ) ? 'display:none;' : '';
226
+														$display_none = ( isset( $form[ 'fields' ] ) && count( $form[ 'fields' ] ) <= 0 ) ? 'display:none;' : '';
227 227
 													?>
228 228
 
229 229
 													<!-- Save Fields Button -->
230
-													<?php submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;'.$display_none ) ); ?>
230
+													<?php submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => '', 'style' => 'float:right;margin-right:12px;' . $display_none ) ); ?>
231 231
 
232 232
 													<!-- .inside -->
233 233
 												</div>
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 																<?php
262 262
 																if ( ! isset( $merge_variable_error ) ) {
263 263
 																	echo '<p class="description">' . __( "Select the fields below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
264
-																	$this->build_available_merge_vars( $form['fields'], $available_merge_variables );
264
+																	$this->build_available_merge_vars( $form[ 'fields' ], $available_merge_variables );
265 265
 																} else {
266 266
 																	echo $merge_variable_error;
267 267
 																}
@@ -270,23 +270,23 @@  discard block
 block discarded – undo
270 270
 
271 271
 															<div id="interest-groups-container" class="list-container">
272 272
 																<?php
273
-																if ( isset( $interest_groupings ) && ! isset( $interest_groupings['error'] ) ) {
273
+																if ( isset( $interest_groupings ) && ! isset( $interest_groupings[ 'error' ] ) ) {
274 274
 																	echo '<p class="description">' . __( "Select an interest group below to add to the form builder.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
275
-																	$this->build_available_interest_groups( $form['fields'], $interest_groupings, $form['list_id'] );
275
+																	$this->build_available_interest_groups( $form[ 'fields' ], $interest_groupings, $form[ 'list_id' ] );
276 276
 																} else {
277
-																	echo '<p class="description">' . $interest_groupings['error'] . '</p>';
277
+																	echo '<p class="description">' . $interest_groupings[ 'error' ] . '</p>';
278 278
 																}
279 279
 																?>
280 280
 															</div>
281 281
 
282 282
 															<div id="tags-container" class="list-container">
283 283
 																<?php
284
-																if ( isset( $tags ) && ! isset( $tags['error'] ) ) {
284
+																if ( isset( $tags ) && ! isset( $tags[ 'error' ] ) ) {
285 285
 																	echo '<p class="description">' . __( "Select a tag to add to the form builder. Selected tags will be added to all subscribers of this form.", 'yikes-inc-easy-mailchimp-extender' ) . '</p>';
286 286
 																	echo '<p id="yikes-tags-error-message" class="hidden"><strong>' . __( 'Warning: due to limitations in Mailchimp\'s API, tags are not currently supported for double opt-in signups.', 'yikes-inc-easy-mailchimp-extender' ) . '</strong></p>';
287
-																	$this->build_available_tags( isset( $form['tags'] ) ? $form['tags'] : array(), $tags, $form['list_id'] );
287
+																	$this->build_available_tags( isset( $form[ 'tags' ] ) ? $form[ 'tags' ] : array(), $tags, $form[ 'list_id' ] );
288 288
 																} else {
289
-																	echo '<p class="description">' . $interest_groupings['error'] . '</p>';
289
+																	echo '<p class="description">' . $interest_groupings[ 'error' ] . '</p>';
290 290
 																}
291 291
 																?>
292 292
 															</div>
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 
332 332
 															<!-- form classes -->
333 333
 															<label for="yikes-easy-mc-form-class-names"><strong><?php _e( 'Form Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
334
-																<input type="text" class="widefat" name="yikes-easy-mc-form-class-names" id="yikes-easy-mc-form-class-names" value="<?php echo $form_settings['yikes-easy-mc-form-class-names']; ?>" placeholder="<?php _e( 'Add additional classes to this opt-in form.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
334
+																<input type="text" class="widefat" name="yikes-easy-mc-form-class-names" id="yikes-easy-mc-form-class-names" value="<?php echo $form_settings[ 'yikes-easy-mc-form-class-names' ]; ?>" placeholder="<?php _e( 'Add additional classes to this opt-in form.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
335 335
 																<p class="description"><?php printf( __( 'Add additional class names to the %s element.', 'yikes-inc-easy-mailchimp-extender' ), '<code>' . htmlentities( '<form>' ) . '</code>' ); ?></p>
336 336
 															</label>
337 337
 
@@ -346,10 +346,10 @@  discard block
 block discarded – undo
346 346
 															<!-- inline form -->
347 347
 															<strong><?php _e( 'Inline Form', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
348 348
 															<label class="inline-form-label">
349
-																<input type="radio" name="yikes-easy-mc-inline-form[]" value="1" <?php checked( $form_settings['yikes-easy-mc-inline-form'], '1' ); ?>/><?php _e( 'Enable', 'yikes-inc-easy-mailchimp-extender' ); ?>
349
+																<input type="radio" name="yikes-easy-mc-inline-form[]" value="1" <?php checked( $form_settings[ 'yikes-easy-mc-inline-form' ], '1' ); ?>/><?php _e( 'Enable', 'yikes-inc-easy-mailchimp-extender' ); ?>
350 350
 															</label>
351 351
 															<label class="inline-form-label">
352
-																<input type="radio" name="yikes-easy-mc-inline-form[]" value="0" <?php checked( $form_settings['yikes-easy-mc-inline-form'], '0' ); ?> /><?php _e( 'Disable', 'yikes-inc-easy-mailchimp-extender' ); ?>
352
+																<input type="radio" name="yikes-easy-mc-inline-form[]" value="0" <?php checked( $form_settings[ 'yikes-easy-mc-inline-form' ], '0' ); ?> /><?php _e( 'Disable', 'yikes-inc-easy-mailchimp-extender' ); ?>
353 353
 															</label>
354 354
 															<p class="description"><?php _e( 'Programatically setup this form so that all fields are on the same line.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
355 355
 															<p class="description"><?php printf( __( 'If you are having issues with your theme not displaying the inline form properly, please see the following %s.', 'yikes-inc-easy-mailchimp-extender' ), '<a href="https://yikesplugins.com/support/knowledge-base/my-form-fields-are-not-fully-inline-after-enabling-the-inline-form-option-how-come/" target="_blank">' . __( 'knowledge base article', 'yikes-inc-easy-mailchimp-extender' ) . '</a>' ); ?></p>
@@ -364,19 +364,19 @@  discard block
 block discarded – undo
364 364
 															<!-- Submit button type -->
365 365
 															<strong><?php _e( 'Submit Button Type', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
366 366
 															<label class="inline-form-label">
367
-																<input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="text" <?php checked( $form_settings['yikes-easy-mc-submit-button-type'], 'text' ); ?> /><?php _e( 'Text', 'yikes-inc-easy-mailchimp-extender' ); ?>
367
+																<input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="text" <?php checked( $form_settings[ 'yikes-easy-mc-submit-button-type' ], 'text' ); ?> /><?php _e( 'Text', 'yikes-inc-easy-mailchimp-extender' ); ?>
368 368
 															</label>
369 369
 															<label class="inline-form-label">
370
-																<input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="image" <?php checked( $form_settings['yikes-easy-mc-submit-button-type'], 'image' ); ?> /><?php _e( 'Image', 'yikes-inc-easy-mailchimp-extender' ); ?>
370
+																<input type="radio" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-submit-button-type[]" value="image" <?php checked( $form_settings[ 'yikes-easy-mc-submit-button-type' ], 'image' ); ?> /><?php _e( 'Image', 'yikes-inc-easy-mailchimp-extender' ); ?>
371 371
 															</label>
372 372
 															<p class="description"><?php _e( 'Select the submit button type for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
373 373
 															<!-- end submit button type -->
374 374
 
375 375
 																<!-- Text submit button type -->
376
-																<section class="submit-button-type-text nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'image' ) { echo ' hidden'; } ?>">
376
+																<section class="submit-button-type-text nested-child<?php if ( $form_settings[ 'yikes-easy-mc-submit-button-type' ] == 'image' ) { echo ' hidden'; } ?>">
377 377
 																	<!-- submit button text -->
378 378
 																	<label for="yikes-easy-mc-submit-button-text"><strong><?php _e( 'Submit Button Text', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
379
-																		<input type="text" class="widefat" name="yikes-easy-mc-submit-button-text" id="yikes-easy-mc-submit-button-text" value="<?php echo $form_settings['yikes-easy-mc-submit-button-text']; ?>" placeholder="<?php _e( 'Submit', 'yikes-inc-easy-mailchimp-extender' ); ?>">
379
+																		<input type="text" class="widefat" name="yikes-easy-mc-submit-button-text" id="yikes-easy-mc-submit-button-text" value="<?php echo $form_settings[ 'yikes-easy-mc-submit-button-text' ]; ?>" placeholder="<?php _e( 'Submit', 'yikes-inc-easy-mailchimp-extender' ); ?>">
380 380
 																		<p class="description"><?php printf( __( 'Set the submit button text. Leaving this blank will default to %s.', 'yikes-inc-easy-mailchimp-extender' ), '"' . __( 'Submit', 'yikes-inc-easy-mailchimp-extender' ) . '"' ); ?></p>
381 381
 
382 382
 																		<p class="description"><?php _e( 'The submit button text set above, can be overwritten on a per-form basis using shortcodes.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -385,9 +385,9 @@  discard block
 block discarded – undo
385 385
 																<!-- end text submit button type -->
386 386
 
387 387
 																<!-- Image submit button type -->
388
-																<section class="submit-button-type-image nested-child<?php if( $form_settings['yikes-easy-mc-submit-button-type'] == 'text' ) { echo ' hidden'; } ?>">
388
+																<section class="submit-button-type-image nested-child<?php if ( $form_settings[ 'yikes-easy-mc-submit-button-type' ] == 'text' ) { echo ' hidden'; } ?>">
389 389
 																	<label for="yikes-easy-mc-submit-button-image"><strong><?php _e( 'Submit Button URL', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
390
-																		<input type="text" class="widefat" name="yikes-easy-mc-submit-button-image" id="yikes-easy-mc-submit-button-image" value="<?php echo $form_settings['yikes-easy-mc-submit-button-image']; ?>" placeholder="<?php _e( 'http://', 'yikes-inc-easy-mailchimp-extender' ); ?>">
390
+																		<input type="text" class="widefat" name="yikes-easy-mc-submit-button-image" id="yikes-easy-mc-submit-button-image" value="<?php echo $form_settings[ 'yikes-easy-mc-submit-button-image' ]; ?>" placeholder="<?php _e( 'http://', 'yikes-inc-easy-mailchimp-extender' ); ?>">
391 391
 																		<p class="description"><?php _e( 'Enter the URL of an image you would like to use as the submit button for this form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
392 392
 																	</label>
393 393
 																</section>
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 
397 397
 															<!-- submit button classes -->
398 398
 															<label for="yikes-easy-mc-form-submit-button-classes"><strong style="float:left;"><?php _e( 'Submit Button Classes', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
399
-																<input type="text" class="widefat" name="yikes-easy-mc-submit-button-classes" id="yikes-easy-mc-submit-button-classes" value="<?php echo $form_settings['yikes-easy-mc-submit-button-classes']; ?>" placeholder="<?php _e( 'Add additional classes to this submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
399
+																<input type="text" class="widefat" name="yikes-easy-mc-submit-button-classes" id="yikes-easy-mc-submit-button-classes" value="<?php echo $form_settings[ 'yikes-easy-mc-submit-button-classes' ]; ?>" placeholder="<?php _e( 'Add additional classes to this submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
400 400
 																<p class="description"><?php _e( 'Add custom classes to the submit button.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
401 401
 															</label>
402 402
 															<!-- end submit button classes -->
@@ -409,37 +409,37 @@  discard block
 block discarded – undo
409 409
 														<section class="section-interior">
410 410
 															<!-- Schedule form -->
411 411
 															<label class="inline-form-label">
412
-																<input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-schedule" value="1" <?php checked( $form_settings['yikes-easy-mc-form-schedule'], '1' ); ?>/><?php _e( 'Schedule Form', 'yikes-inc-easy-mailchimp-extender' ); ?>
412
+																<input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-schedule" value="1" <?php checked( $form_settings[ 'yikes-easy-mc-form-schedule' ], '1' ); ?>/><?php _e( 'Schedule Form', 'yikes-inc-easy-mailchimp-extender' ); ?>
413 413
 															</label>
414 414
 															<p class="description" style="margin-bottom:0;"><?php _e( 'Set a time period that this form should be active on your site. (mm/dd/yyyy)', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
415 415
 															<p class="description" style="margin: 0 0 .5em 0;"><?php _e( 'Once the end date & time have passed, users will no longer be able to signup for your mailing list.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
416 416
 																<!-- Start Date Limitation Nested -->
417
-																<section class="date-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?>">
417
+																<section class="date-restriction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-schedule' ] == '0' ) { echo ' hidden'; } ?>">
418 418
 																	<!-- Start Date -->
419 419
 																	<label for="yikes-easy-mc-form-restriction-start-date"><strong><?php _e( 'Start Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
420
-																		<input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-start-date" id="yikes-easy-mc-form-restriction-start-date" value="<?php echo ! empty($form_settings['yikes-easy-mc-form-restriction-start'] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings['yikes-easy-mc-form-restriction-start'] ) : ''; ?>" >
420
+																		<input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-start-date" id="yikes-easy-mc-form-restriction-start-date" value="<?php echo ! empty( $form_settings[ 'yikes-easy-mc-form-restriction-start' ] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings[ 'yikes-easy-mc-form-restriction-start' ] ) : ''; ?>" >
421 421
 																		<?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
422 422
 																	</label>
423 423
 
424 424
 																	<!-- Start Time -->
425 425
 																	<label for="yikes-easy-mc-form-restriction-start-time"><strong><?php _e( 'Start Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
426
-																		<input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-start-time" id="yikes-easy-mc-form-restriction-start-time" value="<?php echo ! empty( $form_settings['yikes-easy-mc-form-restriction-start'] ) ? date( 'g:iA', $form_settings['yikes-easy-mc-form-restriction-start'] ) : ''; ?>" >
426
+																		<input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-start-time" id="yikes-easy-mc-form-restriction-start-time" value="<?php echo ! empty( $form_settings[ 'yikes-easy-mc-form-restriction-start' ] ) ? date( 'g:iA', $form_settings[ 'yikes-easy-mc-form-restriction-start' ] ) : ''; ?>" >
427 427
 																	</label>
428 428
 																	<p class="description"><?php _e( 'Set the dates that this form should display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
429 429
 																</section>
430 430
 																<!-- end Start Date Limitation Nested -->
431 431
 
432 432
 																<!-- End Date Limitation Nested -->
433
-																<section class="date-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-schedule'] == '0' ) { echo ' hidden'; } ?> last">
433
+																<section class="date-restriction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-schedule' ] == '0' ) { echo ' hidden'; } ?> last">
434 434
 																	<!-- End Date -->
435 435
 																	<label for="yikes-easy-mc-form-restriction-end-date"><strong><?php _e( 'End Date', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
436
-																		<input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-end-date" id="yikes-easy-mc-form-restriction-end-date" value="<?php echo ! empty(  $form_settings['yikes-easy-mc-form-restriction-end'] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings['yikes-easy-mc-form-restriction-end'] ) : ''; ?>" >
436
+																		<input type="text" class="date-picker" name="yikes-easy-mc-form-restriction-end-date" id="yikes-easy-mc-form-restriction-end-date" value="<?php echo ! empty( $form_settings[ 'yikes-easy-mc-form-restriction-end' ] ) ? date( $this->yikes_jQuery_datepicker_date_format( get_option( 'date_format' ) ), $form_settings[ 'yikes-easy-mc-form-restriction-end' ] ) : ''; ?>" >
437 437
 																		<?php _e( 'at', 'yikes-inc-easy-mailchimp-extender' ); ?>
438 438
 																	</label>
439 439
 
440 440
 																	<!-- End Time -->
441 441
 																	<label for="yikes-easy-mc-form-restriction-end-time"><strong><?php _e( 'End Time', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
442
-																		<input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-end-time" id="yikes-easy-mc-form-restriction-end-time" value="<?php echo ! empty( $form_settings['yikes-easy-mc-form-restriction-end'] ) ? date( 'g:iA', $form_settings['yikes-easy-mc-form-restriction-end'] ) : ''; ?>" >
442
+																		<input type="text" class="time-picker" name="yikes-easy-mc-form-restriction-end-time" id="yikes-easy-mc-form-restriction-end-time" value="<?php echo ! empty( $form_settings[ 'yikes-easy-mc-form-restriction-end' ] ) ? date( 'g:iA', $form_settings[ 'yikes-easy-mc-form-restriction-end' ] ) : ''; ?>" >
443 443
 																	</label>
444 444
 																	<p class="description"><?php _e( 'Set the dates that this form should no longer display on your site.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
445 445
 
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 																	<label for="yikes-easy-mc-form-restriction-pending-message"><strong><?php _e( 'Pending Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
448 448
 																		<?php
449 449
 																			wp_editor(
450
-																				$form_settings['yikes-easy-mc-form-restriction-pending-message'],
450
+																				$form_settings[ 'yikes-easy-mc-form-restriction-pending-message' ],
451 451
 																				'yikes-easy-mc-form-restriction-pending-message',
452 452
 																				array(
453 453
 																					'editor_class' => 'yikes-easy-mc-form-restriction-pending-message',
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 																	<label for="yikes-easy-mc-form-restriction-expired-message"><strong><?php _e( 'Expired Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
463 463
 																		<?php
464 464
 																			wp_editor(
465
-																				$form_settings['yikes-easy-mc-form-restriction-expired-message'],
465
+																				$form_settings[ 'yikes-easy-mc-form-restriction-expired-message' ],
466 466
 																				'yikes-easy-mc-form-restriction-expired-message',
467 467
 																				array(
468 468
 																					'editor_class' => 'yikes-easy-mc-form-restriction-expired-message',
@@ -477,16 +477,16 @@  discard block
 block discarded – undo
477 477
 
478 478
 																<!-- Require Users to be Logged In -->
479 479
 																<label class="inline-form-label">
480
-																	<input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-login-required" value="1" <?php checked( $form_settings['yikes-easy-mc-form-login-required'], '1' ); ?> /><?php _e( 'Require Login', 'yikes-inc-easy-mailchimp-extender' ); ?>
480
+																	<input type="checkbox" onclick="toggle_nested_section( jQuery(this) );" name="yikes-easy-mc-form-login-required" value="1" <?php checked( $form_settings[ 'yikes-easy-mc-form-login-required' ], '1' ); ?> /><?php _e( 'Require Login', 'yikes-inc-easy-mailchimp-extender' ); ?>
481 481
 																</label>
482 482
 																<p class="description"><?php _e( 'Require users to be logged in before they can view and submit this opt-in form.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
483 483
 
484 484
 																<!-- Require Login Message -->
485
-																<section class="login-restriction-section nested-child<?php if( $form_settings['yikes-easy-mc-form-login-required'] == '0' ) { echo ' hidden'; } ?>">
485
+																<section class="login-restriction-section nested-child<?php if ( $form_settings[ 'yikes-easy-mc-form-login-required' ] == '0' ) { echo ' hidden'; } ?>">
486 486
 																	<label for="yikes-easy-mc-form-restriction-login-message"><strong><?php _e( 'Required Login Message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
487 487
 																		<?php
488 488
 																			wp_editor(
489
-																				$form_settings['yikes-easy-mc-form-restriction-login-message'],
489
+																				$form_settings[ 'yikes-easy-mc-form-restriction-login-message' ],
490 490
 																				'yikes-easy-mc-form-restriction-login-message',
491 491
 																				array(
492 492
 																					'editor_class' => 'yikes-easy-mc-form-restriction-login-message',
@@ -573,40 +573,40 @@  discard block
 block discarded – undo
573 573
 
574 574
 														<!-- Success Message (refactored @ 6.3.0 for double optin) -->
575 575
 														<label for="yikes-easy-mc-success-message"><strong><?php _e( 'Success: Double opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
576
-															<input type="text" class="widefat" name="yikes-easy-mc-success-message" id="yikes-easy-mc-success-message" value="<?php echo isset( $error_messages['success'] ) ? stripslashes( esc_html( $error_messages['success'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success']; ?>" >
576
+															<input type="text" class="widefat" name="yikes-easy-mc-success-message" id="yikes-easy-mc-success-message" value="<?php echo isset( $error_messages[ 'success' ] ) ? stripslashes( esc_html( $error_messages[ 'success' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'success' ]; ?>" >
577 577
 														</label>
578 578
 														<!-- Success Message (for single optin) -->
579 579
 														<label for="yikes-easy-mc-success-single-optin-message"><strong><?php _e( 'Success: Single opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
580
-															<input type="text" class="widefat" name="yikes-easy-mc-success-single-optin-message" id="yikes-easy-mc-success-single-optin-message" value="<?php echo isset( $error_messages['success-single-optin'] ) ? stripslashes( esc_html( $error_messages['success-single-optin'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success-single-optin']; ?>" >
580
+															<input type="text" class="widefat" name="yikes-easy-mc-success-single-optin-message" id="yikes-easy-mc-success-single-optin-message" value="<?php echo isset( $error_messages[ 'success-single-optin' ] ) ? stripslashes( esc_html( $error_messages[ 'success-single-optin' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'success-single-optin' ]; ?>" >
581 581
 														</label>
582 582
 														<!-- Resubscribing users when updating your profile via the form is allowed -->
583 583
 														<label for="yikes-easy-mc-user-resubscribed-success-message"><strong><?php _e( 'Success: Re-subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
584
-															<input type="text" class="widefat" name="yikes-easy-mc-user-resubscribed-success-message" id="yikes-easy-mc-user-resubscribed-success-message" value="<?php echo isset( $error_messages['success-resubscribed'] ) ? stripslashes( esc_html( $error_messages['success-resubscribed'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['success-resubscribed']; ?>">
584
+															<input type="text" class="widefat" name="yikes-easy-mc-user-resubscribed-success-message" id="yikes-easy-mc-user-resubscribed-success-message" value="<?php echo isset( $error_messages[ 'success-resubscribed' ] ) ? stripslashes( esc_html( $error_messages[ 'success-resubscribed' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'success-resubscribed' ]; ?>">
585 585
 														</label>
586 586
 
587 587
 														<!-- Click the link to update user profile etc. etc. -->
588 588
 														<label for="yikes-easy-mc-user-subscribed-update-link"><strong><?php _e( 'Success: Re-subscriber with link to email profile update message', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
589
-															<input type="text" class="widefat" name="yikes-easy-mc-user-update-link" id="yikes-easy-mc-user-update-link" value="<?php echo isset( $error_messages['update-link'] ) ? stripslashes( esc_html( $error_messages['update-link'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-link']; ?>">
589
+															<input type="text" class="widefat" name="yikes-easy-mc-user-update-link" id="yikes-easy-mc-user-update-link" value="<?php echo isset( $error_messages[ 'update-link' ] ) ? stripslashes( esc_html( $error_messages[ 'update-link' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'update-link' ]; ?>">
590 590
 														</label>
591 591
 
592 592
 														<!-- Email Address is already subscribed -->
593 593
 														<label for="yikes-easy-mc-user-subscribed-message"><strong><?php _e( 'Error: Re-subscribers not permitted', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
594
-															<input type="text" class="widefat" name="yikes-easy-mc-user-subscribed-message" id="yikes-easy-mc-user-subscribed-message" value="<?php echo isset( $error_messages['already-subscribed'] ) ? stripslashes( esc_html( $error_messages['already-subscribed'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['email-exists-error']; ?>">
594
+															<input type="text" class="widefat" name="yikes-easy-mc-user-subscribed-message" id="yikes-easy-mc-user-subscribed-message" value="<?php echo isset( $error_messages[ 'already-subscribed' ] ) ? stripslashes( esc_html( $error_messages[ 'already-subscribed' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'email-exists-error' ]; ?>">
595 595
 														</label>
596 596
 
597 597
 														<!-- Update email successfully sent -->
598 598
 														<label for="yikes-easy-mc-update-email-successful"><strong><?php _e( 'Success: Update email successfully sent', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
599
-															<input type="text" class="widefat" name="yikes-easy-mc-update-email-successful" id="yikes-easy-mc-update-email-successful" value="<?php echo isset( $error_messages['update-email-success'] ) ? stripslashes( esc_attr( $error_messages['update-email-success'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-email-success']; ?>" >
599
+															<input type="text" class="widefat" name="yikes-easy-mc-update-email-successful" id="yikes-easy-mc-update-email-successful" value="<?php echo isset( $error_messages[ 'update-email-success' ] ) ? stripslashes( esc_attr( $error_messages[ 'update-email-success' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'update-email-success' ]; ?>" >
600 600
 														</label>
601 601
 
602 602
 														<!-- Update email failed to send -->
603 603
 														<label for="yikes-easy-mc-update-email-failure"><strong><?php _e( 'Error: Update email failed to send', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
604
-															<input type="text" class="widefat" name="yikes-easy-mc-update-email-failure" id="yikes-easy-mc-update-email-failure" value="<?php echo isset( $error_messages['update-email-failure'] ) ? stripslashes( esc_attr( $error_messages['update-email-failure'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['update-email-failure']; ?>" >
604
+															<input type="text" class="widefat" name="yikes-easy-mc-update-email-failure" id="yikes-easy-mc-update-email-failure" value="<?php echo isset( $error_messages[ 'update-email-failure' ] ) ? stripslashes( esc_attr( $error_messages[ 'update-email-failure' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'update-email-failure' ]; ?>" >
605 605
 														</label>
606 606
 
607 607
 														<!-- General Error Message -->
608 608
 														<label for="yikes-easy-mc-general-error-message"><strong><?php _e( 'Error: General', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
609
-															<input type="text" class="widefat" name="yikes-easy-mc-general-error-message" id="yikes-easy-mc-general-error-message" value="<?php echo isset( $error_messages['general-error'] ) ? stripslashes( esc_html( $error_messages['general-error'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['general-error']; ?>" >
609
+															<input type="text" class="widefat" name="yikes-easy-mc-general-error-message" id="yikes-easy-mc-general-error-message" value="<?php echo isset( $error_messages[ 'general-error' ] ) ? stripslashes( esc_html( $error_messages[ 'general-error' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'general-error' ]; ?>" >
610 610
 														</label>
611 611
 
612 612
 														<!-- Email Section -->
@@ -616,12 +616,12 @@  discard block
 block discarded – undo
616 616
 															<p class="edit-form-description"><?php _e( 'Customize the profile verification email sent to re-subscribers. Leave the text unedited to use the default message.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
617 617
 															<!-- Email Subject -->
618 618
 															<label for="yikes-easy-mc-user-email-subject"><strong><?php _e( 'Email Subject', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
619
-																<input type="text" class="widefat" name="yikes-easy-mc-user-email-subject" id="yikes-easy-mc-user-email-subject" value="<?php echo isset( $error_messages['email-subject'] ) ? stripslashes( esc_html( $error_messages['email-subject'] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages['email-subject']; ?>">
619
+																<input type="text" class="widefat" name="yikes-easy-mc-user-email-subject" id="yikes-easy-mc-user-email-subject" value="<?php echo isset( $error_messages[ 'email-subject' ] ) ? stripslashes( esc_html( $error_messages[ 'email-subject' ] ) ) : ''; ?>" placeholder="<?php echo $global_error_messages[ 'email-subject' ]; ?>">
620 620
 															</label>
621 621
 															<!-- Email Body -->
622 622
 															<label for="yikes-easy-mc-user-email-body"><strong><?php _e( 'Email Body', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
623 623
 																<?php 
624
-																	$editor_content = ( isset( $error_messages['email-body'] ) && ! empty( $error_messages['email-body'] ) ) ? $error_messages['email-body'] : Yikes_Inc_Easy_Mailchimp_Forms_Admin::generate_default_email_body();
624
+																	$editor_content = ( isset( $error_messages[ 'email-body' ] ) && ! empty( $error_messages[ 'email-body' ] ) ) ? $error_messages[ 'email-body' ] : Yikes_Inc_Easy_Mailchimp_Forms_Admin::generate_default_email_body();
625 625
 																	wp_editor( $editor_content, 'yikes-easy-mc-user-email-body', array( 'textarea_id' => 'yikes-easy-mc-user-email-body' ) ); 
626 626
 																?>
627 627
 															</label>
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
 																	<li>
732 732
 																	<?php
733 733
 																		/* translators: First two placeholders are HTML <code> tags, third one is the form's name  */
734
-																		echo sprintf( esc_html__( '%1$1s[form_name]%2$2s displays your form\'s name (i.e. %3$3s).', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>', esc_html( $form['form_name'] ) );
734
+																		echo sprintf( esc_html__( '%1$1s[form_name]%2$2s displays your form\'s name (i.e. %3$3s).', 'yikes-inc-easy-mailchimp-extender' ), '<code>', '</code>', esc_html( $form[ 'form_name' ] ) );
735 735
 																	?>
736 736
 																	</li>
737 737
 																	<li>
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
 									<label for="shortcode"><?php esc_html_e( 'Edit Another Form', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
788 788
 										<select class="widefat" name="form_switcher" id="form_switcher" onchange="YIKES_Easy_MC_SwitchForm(jQuery(this).val());">
789 789
 											<?php foreach ( $all_forms as $single_form ) { ?>
790
-												<option <?php selected( $form_id, $single_form['id'] ); ?> value="<?php echo esc_attr( $single_form['id'] ); ?>"><?php echo esc_html( $single_form['form_name'] ); ?></option>
790
+												<option <?php selected( $form_id, $single_form[ 'id' ] ); ?> value="<?php echo esc_attr( $single_form[ 'id' ] ); ?>"><?php echo esc_html( $single_form[ 'form_name' ] ); ?></option>
791 791
 											<?php } ?>
792 792
 										</select>
793 793
 									</label>
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 
796 796
 								<p class="inside-section-2">
797 797
 									<label for="shortcode"><?php esc_html_e( 'Shortcode', 'yikes-inc-easy-mailchimp-extender' ); ?><br />
798
-										<input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo esc_attr( $form['id'] ); ?>"]' />
798
+										<input type="text" onclick="this.setSelectionRange(0, this.value.length)" class="widefat shortcode-input-field" readonly value='[yikes-mailchimp form="<?php echo esc_attr( $form[ 'id' ] ); ?>"]' />
799 799
 									</label>
800 800
 								</p>
801 801
 
@@ -811,9 +811,9 @@  discard block
 block discarded – undo
811 811
 										<select name="associated-list" id="associated-list" <?php if ( empty( $list_data ) ) { echo 'disabled="disabled"'; } ?> onchange="jQuery('.view-list-link').attr( 'href', '<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' ) ); ?>' + jQuery( this ).val() );">
812 812
 											<?php
813 813
 											if ( ! empty( $list_data ) ) {
814
-												foreach( $list_data as $mailing_list ) {
814
+												foreach ( $list_data as $mailing_list ) {
815 815
 													?>
816
-													<option <?php selected( $form['list_id'], $mailing_list['id'] ); ?> value="<?php echo $mailing_list['id']; ?>"><?php echo stripslashes( $mailing_list['name'] ) . ' (' . $mailing_list['stats']['member_count'] . ') '; ?></option>
816
+													<option <?php selected( $form[ 'list_id' ], $mailing_list[ 'id' ] ); ?> value="<?php echo $mailing_list[ 'id' ]; ?>"><?php echo stripslashes( $mailing_list[ 'name' ] ) . ' (' . $mailing_list[ 'stats' ][ 'member_count' ] . ') '; ?></option>
817 817
 													<?php
818 818
 												}
819 819
 											} else {
@@ -823,9 +823,9 @@  discard block
 block discarded – undo
823 823
 											}
824 824
 											?>
825 825
 										</select>
826
-										<?php if( ! empty( $form['list_id'] ) ) { ?>
826
+										<?php if ( ! empty( $form[ 'list_id' ] ) ) { ?>
827 827
 											<p class="description view-list">
828
-												<a href="<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $form['list_id'] ) ); ?>" class="view-list-link"><?php _e( 'View List', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
828
+												<a href="<?php echo esc_url( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $form[ 'list_id' ] ) ); ?>" class="view-list-link"><?php _e( 'View List', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
829 829
 											</p>
830 830
 											<p class="description">
831 831
 												<?php _e( "Users who sign up via this form will be added to the list selected above.", 'yikes-inc-easy-mailchimp-extender' ); ?>
@@ -853,28 +853,28 @@  discard block
 block discarded – undo
853 853
 
854 854
 								<!-- Single or Double Opt-in -->
855 855
 								<?php
856
-									if( !isset( $optin_settings['optin'] ) ) {
857
-										$optin_settings['optin'] = '1';
856
+									if ( ! isset( $optin_settings[ 'optin' ] ) ) {
857
+										$optin_settings[ 'optin' ] = '1';
858 858
 									}
859 859
 								?>
860 860
 								<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="single-double-optin"><strong><?php _e( 'Single or Double Opt-in', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
861 861
 									<span class="edit-form-field-container-span">
862
-										<label for="single"><input id="single" type="radio" name="single-double-optin" value="0" <?php checked( $optin_settings['optin'], '0' ); ?>><?php _e( 'Single', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
863
-										&nbsp;<label for="double"><input id="double" type="radio" name="single-double-optin" value="1" <?php checked( $optin_settings['optin'], '1' ); ?>><?php _e( 'Double', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
862
+										<label for="single"><input id="single" type="radio" name="single-double-optin" value="0" <?php checked( $optin_settings[ 'optin' ], '0' ); ?>><?php _e( 'Single', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
863
+										&nbsp;<label for="double"><input id="double" type="radio" name="single-double-optin" value="1" <?php checked( $optin_settings[ 'optin' ], '1' ); ?>><?php _e( 'Double', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
864 864
 									</span>
865 865
 									<p class="description"><?php _e( "Double opt-in requires users to confirm their email address before being added to a list (recommended)", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
866 866
 								</label></p>
867 867
 
868 868
 								<!-- Update Existing Users -->
869 869
 								<?php
870
-									if( !isset( $optin_settings['update_existing_user'] ) ) {
871
-										$optin_settings['update_existing_user'] = '1';
870
+									if ( ! isset( $optin_settings[ 'update_existing_user' ] ) ) {
871
+										$optin_settings[ 'update_existing_user' ] = '1';
872 872
 									}
873 873
 								?>
874 874
 								<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="update-existing-user"><strong><?php _e( 'Update Existing Subscriber', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
875 875
 									<span class="form-field-container-span">
876
-										<label for="update-user"><input type="radio" id="update-user" onchange="toggleUpdateEmailContainer(this);return false;" name="update-existing-user" value="1" <?php checked( $optin_settings['update_existing_user'], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
877
-										&nbsp;<label for="do-not-update-user"><input type="radio" onchange="toggleUpdateEmailContainer(this);return false;" id="do-not-update-user"  name="update-existing-user" value="0" <?php checked( $optin_settings['update_existing_user'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
876
+										<label for="update-user"><input type="radio" id="update-user" onchange="toggleUpdateEmailContainer(this);return false;" name="update-existing-user" value="1" <?php checked( $optin_settings[ 'update_existing_user' ], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
877
+										&nbsp;<label for="do-not-update-user"><input type="radio" onchange="toggleUpdateEmailContainer(this);return false;" id="do-not-update-user"  name="update-existing-user" value="0" <?php checked( $optin_settings[ 'update_existing_user' ], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
878 878
 									</span>
879 879
 									<p class="description"><?php printf( __( "Update an existing subscriber's profile information instead of displaying a %s message.", "yikes-inc-easy-mailchimp-extender" ), __( '"user already subscribed"', 'yikes-inc-easy-mailchimp-extender' ) ); ?></p>
880 880
 								</label></p>
@@ -885,9 +885,9 @@  discard block
 block discarded – undo
885 885
 									- No = Just update the user profile without an email
886 886
 								-->
887 887
 								<?php
888
-									$send_update_email = ( isset( $optin_settings['send_update_email'] ) && '' !== $optin_settings['send_update_email'] ) ? $optin_settings['send_update_email'] : 0;
888
+									$send_update_email = ( isset( $optin_settings[ 'send_update_email' ] ) && '' !== $optin_settings[ 'send_update_email' ] ) ? $optin_settings[ 'send_update_email' ] : 0;
889 889
 								?>
890
-								<p class="form-field-container send-update-email" <?php if ( 1 !== absint( $optin_settings['update_existing_user'] ) ) { ?>style="display:none;"<?php } ?>><!-- necessary to prevent skipping on slideToggle(); --><label for="update-existing-user"><strong><?php _e( 'Send Update Email', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
890
+								<p class="form-field-container send-update-email" <?php if ( 1 !== absint( $optin_settings[ 'update_existing_user' ] ) ) { ?>style="display:none;"<?php } ?>><!-- necessary to prevent skipping on slideToggle(); --><label for="update-existing-user"><strong><?php _e( 'Send Update Email', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
891 891
 									<span class="form-field-container-span">
892 892
 										<label for="update-email"><input type="radio" id="update-email" name="update-existing-email" value="1" <?php checked( $send_update_email, '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
893 893
 										&nbsp;<label for="do-not-update-email"><input type="radio" id="do-not-update-email"  name="update-existing-email" value="0" <?php checked( $send_update_email, '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
@@ -903,77 +903,77 @@  discard block
 block discarded – undo
903 903
 							<div class="yikes-mc-settings-expansion-section">
904 904
 								<!-- AJAX form Submission -->
905 905
 								<?php
906
-									if( !isset( $submission_settings['ajax'] ) ) {
907
-										$submission_settings['ajax'] = '1';
906
+									if ( ! isset( $submission_settings[ 'ajax' ] ) ) {
907
+										$submission_settings[ 'ajax' ] = '1';
908 908
 									}
909 909
 								?>
910 910
 								<p class="form-field-container"><!-- necessary to prevent skipping on slideToggle(); --><label for="form-ajax-submission"><strong><?php _e( 'Enable AJAX Submission', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
911 911
 									<span class="form-field-container-span">
912
-										<label for="enable-ajax"><input type="radio" id="enable-ajax" name="form-ajax-submission" class="yikes-enable-disable-ajax" value="1" <?php checked( $submission_settings['ajax'], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
913
-										&nbsp;<label for="disable-ajax"><input type="radio" id="disable-ajax"  name="form-ajax-submission" class="yikes-enable-disable-ajax" value="0" <?php checked( $submission_settings['ajax'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
912
+										<label for="enable-ajax"><input type="radio" id="enable-ajax" name="form-ajax-submission" class="yikes-enable-disable-ajax" value="1" <?php checked( $submission_settings[ 'ajax' ], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
913
+										&nbsp;<label for="disable-ajax"><input type="radio" id="disable-ajax"  name="form-ajax-submission" class="yikes-enable-disable-ajax" value="0" <?php checked( $submission_settings[ 'ajax' ], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
914 914
 									</span>
915 915
 									<p class="description"><?php _e( "AJAX form submissions transmit data without requiring the page to refresh.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
916 916
 								</label></p>
917 917
 
918 918
 								<!-- Redirect User On Submission -->
919 919
 								<?php
920
-									if( !isset( $submission_settings['redirect_on_submission'] ) ) {
921
-										$submission_settings['redirect_on_submission'] = '0';
922
-										$submission_settings['redirect_page'] = '';
920
+									if ( ! isset( $submission_settings[ 'redirect_on_submission' ] ) ) {
921
+										$submission_settings[ 'redirect_on_submission' ] = '0';
922
+										$submission_settings[ 'redirect_page' ] = '';
923 923
 									}
924 924
 								?>
925 925
 								<p><label for="redirect-user-on-submission"><strong><?php _e( 'Redirect On Submission', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
926 926
 									<span class="form-field-container-span">
927
-										<label for="redirect-user"><input type="radio" id="redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="1" <?php checked( $submission_settings['redirect_on_submission'], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
928
-										&nbsp;<label for="do-not-redirect-user"><input type="radio" id="do-not-redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="0" <?php checked( $submission_settings['redirect_on_submission'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
927
+										<label for="redirect-user"><input type="radio" id="redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="1" <?php checked( $submission_settings[ 'redirect_on_submission' ], '1' ); ?>><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
928
+										&nbsp;<label for="do-not-redirect-user"><input type="radio" id="do-not-redirect-user" onclick="togglePageRedirection( this );" name="redirect-user-on-submission" value="0" <?php checked( $submission_settings[ 'redirect_on_submission' ], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
929 929
 									</span>
930
-									<?php $this->generate_page_redirect_dropdown( $submission_settings['redirect_on_submission'], $submission_settings['redirect_page'], ( isset( $submission_settings['custom_redirect_url'] ) ) ? esc_url( $submission_settings['custom_redirect_url'] ) : '' ); ?>
930
+									<?php $this->generate_page_redirect_dropdown( $submission_settings[ 'redirect_on_submission' ], $submission_settings[ 'redirect_page' ], ( isset( $submission_settings[ 'custom_redirect_url' ] ) ) ? esc_url( $submission_settings[ 'custom_redirect_url' ] ) : '' ); ?>
931 931
 									<p class="description"><?php _e( "When the user signs up would you like to redirect them to another page?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
932 932
 								</label></p>
933 933
 
934 934
 								<?php
935
-									if ( ! isset( $submission_settings['redirect_new_window'] ) ) {
936
-										$submission_settings['redirect_new_window'] = '0';
935
+									if ( ! isset( $submission_settings[ 'redirect_new_window' ] ) ) {
936
+										$submission_settings[ 'redirect_new_window' ] = '0';
937 937
 									}
938 938
 								?>
939 939
 
940 940
 								<!-- Option to open the redirect URL in a new window -->
941
-								<div class="redirect-new-window-div" <?php if ( ( ! isset( $submission_settings['redirect_on_submission'] ) || $submission_settings['redirect_on_submission'] === '0' ) || ( ! isset( $submission_settings['ajax'] ) || $submission_settings['ajax'] !== '1' )  ) { echo 'style="display:none;"'; } ?>>
941
+								<div class="redirect-new-window-div" <?php if ( ( ! isset( $submission_settings[ 'redirect_on_submission' ] ) || $submission_settings[ 'redirect_on_submission' ] === '0' ) || ( ! isset( $submission_settings[ 'ajax' ] ) || $submission_settings[ 'ajax' ] !== '1' ) ) { echo 'style="display:none;"'; } ?>>
942 942
 										<p><strong><?php _e( "Open Redirect URL in a New Window", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
943 943
 										<label for="redirect-new-window-yes">
944
-											<input type="radio" class="widefat custom-redirect-new-window" id="redirect-new-window-yes" name="redirect_new_window" value="1" <?php checked( $submission_settings['redirect_new_window'], '1' ); ?>/><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?>
944
+											<input type="radio" class="widefat custom-redirect-new-window" id="redirect-new-window-yes" name="redirect_new_window" value="1" <?php checked( $submission_settings[ 'redirect_new_window' ], '1' ); ?>/><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?>
945 945
 										</label>
946 946
 										&nbsp;
947 947
 										<label for="redirect-new-window-no">
948
-											<input type="radio" class="widefat redirect-new-window" id="redirect-new-window-no" name="redirect_new_window" value="0" <?php checked( $submission_settings['redirect_new_window'], '0' ); ?>/><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?>
948
+											<input type="radio" class="widefat redirect-new-window" id="redirect-new-window-no" name="redirect_new_window" value="0" <?php checked( $submission_settings[ 'redirect_new_window' ], '0' ); ?>/><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?>
949 949
 										</label>
950 950
 										<p class="description"><?php _e( "Should the redirect URL open in a new window/tab?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
951 951
 								</div>
952 952
 
953 953
 								<!-- Hide Form On Submission -->
954 954
 								<?php
955
-									if( !isset( $submission_settings['hide_form_post_signup'] ) ) {
956
-										$submission_settings['hide_form_post_signup'] = '0';
955
+									if ( ! isset( $submission_settings[ 'hide_form_post_signup' ] ) ) {
956
+										$submission_settings[ 'hide_form_post_signup' ] = '0';
957 957
 									}
958 958
 								?>
959 959
 								<p><label for="hide-form-post-signup"><strong><?php _e( 'Hide Form After Sign Up', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
960 960
 									<span class="form-field-container-span">
961
-										<label for="hide-form"><input type="radio"  id="hide-form" name="hide-form-post-signup" value="1" <?php checked( $submission_settings['hide_form_post_signup'], '1' ); ?> checked><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
962
-										&nbsp;<label for="do-not-hide-form"><input type="radio" id="do-not-hide-form" name="hide-form-post-signup" value="0" <?php checked( $submission_settings['hide_form_post_signup'], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
961
+										<label for="hide-form"><input type="radio"  id="hide-form" name="hide-form-post-signup" value="1" <?php checked( $submission_settings[ 'hide_form_post_signup' ], '1' ); ?> checked><?php _e( 'Yes', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
962
+										&nbsp;<label for="do-not-hide-form"><input type="radio" id="do-not-hide-form" name="hide-form-post-signup" value="0" <?php checked( $submission_settings[ 'hide_form_post_signup' ], '0' ); ?>><?php _e( 'No', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
963 963
 									</span>
964 964
 									<p class="description"><?php _e( "Should the form be hidden after the user successfully signs up?", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
965 965
 								</label></p>
966 966
 
967 967
 								<!-- Append or Replace Interest Groups -->
968 968
 								<?php
969
-									if( !isset( $submission_settings['replace_interests'] ) ) {
970
-										$submission_settings['replace_interests'] = '1'; // defaults to true
969
+									if ( ! isset( $submission_settings[ 'replace_interests' ] ) ) {
970
+										$submission_settings[ 'replace_interests' ] = '1'; // defaults to true
971 971
 									}
972 972
 								?>
973 973
 								<p><label for="replace-interest-groups"><strong><?php _e( 'Existing Interest Groups', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
974 974
 									<span class="form-field-container-span">
975
-										<label for="replace-interest-groups"><input type="radio"  id="replace-interest-groups" name="replace-interest-groups" value="1" <?php checked( $submission_settings['replace_interests'], '1' ); ?> checked><?php _e( 'Replace', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
976
-										&nbsp;<label for="update-interest-groups"><input type="radio" id="update-interest-groups" name="replace-interest-groups" value="0" <?php checked( $submission_settings['replace_interests'], '0' ); ?>><?php _e( 'Update', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
975
+										<label for="replace-interest-groups"><input type="radio"  id="replace-interest-groups" name="replace-interest-groups" value="1" <?php checked( $submission_settings[ 'replace_interests' ], '1' ); ?> checked><?php _e( 'Replace', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
976
+										&nbsp;<label for="update-interest-groups"><input type="radio" id="update-interest-groups" name="replace-interest-groups" value="0" <?php checked( $submission_settings[ 'replace_interests' ], '0' ); ?>><?php _e( 'Update', 'yikes-inc-easy-mailchimp-extender' ); ?></label>
977 977
 									</span>
978 978
 
979 979
 										<p class="description"><small><?php _e( "<strong>Replace</strong>: Replace all interest groups with the new ones submitted.", 'yikes-inc-easy-mailchimp-extender' ); ?></small></p>
@@ -993,7 +993,7 @@  discard block
 block discarded – undo
993 993
 							<span class="form-buttons-container" id="major-publishing-actions">
994 994
 								<?php
995 995
 									echo submit_button( __( 'Update Form' ), 'primary', '', false, array( 'onclick' => 'jQuery(this).parent().prev().css({"display":"block","visibility":"inherit"});' ) );
996
-									$url = esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-delete-form', 'mailchimp-form' => $form['id'], 'nonce' => wp_create_nonce( 'delete-mailchimp-form-'.$form['id'] ) ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) );
996
+									$url = esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-delete-form', 'mailchimp-form' => $form[ 'id' ], 'nonce' => wp_create_nonce( 'delete-mailchimp-form-' . $form[ 'id' ] ) ), admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) );
997 997
 									echo '<a href="' . $url . '" class="yikes-delete-mailchimp-form" onclick="return confirm(\'' . __( "Are you sure you want to delete this form? This cannot be undone.", 'yikes-inc-easy-mailchimp-extender' ) . '\');">' . __( "Delete Form", 'yikes-inc-easy-mailchimp-extender' ) . '</a>';
998 998
 								?>
999 999
 							</span>
Please login to merge, or discard this patch.
includes/class-yikes-inc-easy-mailchimp-extender.php 1 patch
Braces   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  * @subpackage Yikes_Inc_Easy_Mailchimp_Extender/includes
26 26
  * @author     YIKES Inc. <[email protected]>
27 27
  */
28
-class Yikes_Inc_Easy_Mailchimp_Extender {
28
+class Yikes_Inc_Easy_Mailchimp_Extender {
29 29
 	/**
30 30
 	 * The loader that's responsible for maintaining and registering all hooks that power
31 31
 	 * the plugin.
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 *
71 71
 	 * @param Yikes_Inc_Easy_Mailchimp_Extender_Form_Interface $form_interface
72 72
 	 */
73
-	public function __construct( Yikes_Inc_Easy_Mailchimp_Extender_Form_Interface $form_interface ) {
73
+	public function __construct( Yikes_Inc_Easy_Mailchimp_Extender_Form_Interface $form_interface ) {
74 74
 		$this->version = YIKES_MC_VERSION;
75 75
 		$this->form_interface = $form_interface;
76 76
 		$this->load_dependencies();
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @since    1.0.0
94 94
 	 * @access   private
95 95
 	 */
96
-	private function load_dependencies() {
96
+	private function load_dependencies() {
97 97
 		/**
98 98
 		 * The class responsible for orchestrating the actions and filters of the
99 99
 		 * core plugin.
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 * @since    1.0.0
122 122
 	 * @access   private
123 123
 	 */
124
-	private function define_admin_hooks() {
124
+	private function define_admin_hooks() {
125 125
 		$plugin_admin = new Yikes_Inc_Easy_Mailchimp_Forms_Admin( $this->get_yikes_inc_easy_mailchimp_extender(), $this->get_version(), $this->form_interface );
126 126
 		$plugin_admin->hooks();
127 127
 		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	 * @since    1.0.0
135 135
 	 * @access   private
136 136
 	 */
137
-	private function define_public_hooks() {
137
+	private function define_public_hooks() {
138 138
 		$plugin_public = new Yikes_Inc_Easy_Mailchimp_Extender_Public( $this->get_yikes_inc_easy_mailchimp_extender(), $this->get_version() );
139 139
 	}
140 140
 	/**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	 *
143 143
 	 * @since    1.0.0
144 144
 	 */
145
-	public function run() {
145
+	public function run() {
146 146
 		$this->loader->run();
147 147
 	}
148 148
 	/**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	 * @since     1.0.0
153 153
 	 * @return    string    The name of the plugin.
154 154
 	 */
155
-	public function get_yikes_inc_easy_mailchimp_extender() {
155
+	public function get_yikes_inc_easy_mailchimp_extender() {
156 156
 		return $this->yikes_inc_easy_mailchimp_extender;
157 157
 	}
158 158
 	/**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	 * @since     1.0.0
162 162
 	 * @return    Yikes_Inc_Easy_Mailchimp_Extender_Loader    Orchestrates the hooks of the plugin.
163 163
 	 */
164
-	public function get_loader() {
164
+	public function get_loader() {
165 165
 		return $this->loader;
166 166
 	}
167 167
 	/**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 * @since     1.0.0
171 171
 	 * @return    string    The version number of the plugin.
172 172
 	 */
173
-	public function get_version() {
173
+	public function get_version() {
174 174
 		return $this->version;
175 175
 	}
176 176
 }
Please login to merge, or discard this patch.
includes/api/class-yikes-inc-easy-mailchimp-api-manager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 
73 73
 		$this->api_key = $api_key;
74 74
 		$parts         = $this->get_api_key_parts();
75
-		$this->key     = $parts['key'];
76
-		$this->dc      = $parts['dc'];
75
+		$this->key     = $parts[ 'key' ];
76
+		$this->dc      = $parts[ 'dc' ];
77 77
 	}
78 78
 
79 79
 	/**
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 		$parts = explode( '-', $this->api_key );
99 99
 
100 100
 		return array(
101
-			'key' => $parts[0],
102
-			'dc'  => isset( $parts[1] ) ? $parts[1] : '',
101
+			'key' => $parts[ 0 ],
102
+			'dc'  => isset( $parts[ 1 ] ) ? $parts[ 1 ] : '',
103 103
 		);
104 104
 	}
105 105
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @return Yikes_Inc_Easy_Mailchimp_API
144 144
 	 */
145 145
 	public function get_api( $version = '' ) {
146
-		$version = $version ?: $this->get_default_api_version();
146
+		$version = $version ? : $this->get_default_api_version();
147 147
 
148 148
 		if ( ! array_key_exists( $version, $this->api ) || null === $this->api[ $version ] ) {
149 149
 			$this->api[ $version ] = new Yikes_Inc_Easy_Mailchimp_API( $this->get_datacenter(), $this->get_api_key(), $version );
Please login to merge, or discard this patch.
includes/third-party-integrations/third-party-init.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 		// required..*
18 18
 		include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
19 19
 		/* Visual Composer */
20
-		if( is_plugin_active( 'js_composer/js_composer.php' ) ) {
20
+		if ( is_plugin_active( 'js_composer/js_composer.php' ) ) {
21 21
 			new YIKES_Mailchimp_Visual_Composer_Extension();
22 22
 		}
23 23
 	}
Please login to merge, or discard this patch.