Completed
Pull Request — staging (#840)
by
unknown
19:08
created
admin/partials/menu/options-sections/import-export-forms.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -3,15 +3,15 @@  discard block
 block discarded – undo
3 3
 $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
4 4
 $all_forms = $form_interface->get_all_forms();
5 5
 ?>
6
-<h3><span><?php _e( 'Import/Export Forms & Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
6
+<h3><span><?php _e( 'Import/Export Forms & Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7 7
 
8 8
 <div class="inside">
9 9
 
10 10
 	<!-- Export Form -->
11
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-forms' , 'nonce' => wp_create_nonce( 'export-forms' ) ) ) ); ?>" method="post">
12
-		<p><strong><?php _e( "Export Forms" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
11
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-forms', 'nonce' => wp_create_nonce( 'export-forms' ) ) ) ); ?>" method="post">
12
+		<p><strong><?php _e( "Export Forms", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
13 13
 		<p class="description">
14
-			<?php _e( "Select the forms you would like to export. When you click the download button below, Easy Forms for Mailchimp will create a CSV file for you to save to your computer. Once you've saved the download file, you can use the Import tool to import the forms to this or any other site." , "yikes-inc-easy-mailchimp-extender" ); ?>
14
+			<?php _e( "Select the forms you would like to export. When you click the download button below, Easy Forms for Mailchimp will create a CSV file for you to save to your computer. Once you've saved the download file, you can use the Import tool to import the forms to this or any other site.", "yikes-inc-easy-mailchimp-extender" ); ?>
15 15
 		</p>
16 16
 
17 17
 		<?php if ( empty( $all_forms ) ) { ?>
@@ -20,44 +20,44 @@  discard block
 block discarded – undo
20 20
 			</p>
21 21
 		<?php } else { ?>
22 22
 			<!-- custom list so users can export specific forms -->
23
-			<a class="toggle-custom-lists button-secondary" onclick="jQuery(this).next().slideToggle();return false;"><?php _e( 'Select Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
23
+			<a class="toggle-custom-lists button-secondary" onclick="jQuery(this).next().slideToggle();return false;"><?php _e( 'Select Forms', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
24 24
 			<ul class="export-custom-forms-list">
25
-				<p class="description"><?php _e( 'Select which forms to export. Leave all checkboxes unchecked to export all of your forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
26
-				<?php foreach( $all_forms as $id => $form ) { ?>
27
-					<li><label><input type="checkbox" name="yikes_export_forms[]" value="<?php echo (int) $id; ?>"><?php echo esc_html( $form['form_name'] ); ?></label></li>
25
+				<p class="description"><?php _e( 'Select which forms to export. Leave all checkboxes unchecked to export all of your forms.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
26
+				<?php foreach ( $all_forms as $id => $form ) { ?>
27
+					<li><label><input type="checkbox" name="yikes_export_forms[]" value="<?php echo (int) $id; ?>"><?php echo esc_html( $form[ 'form_name' ] ); ?></label></li>
28 28
 				<?php } ?>
29 29
 			</ul>
30 30
 		<?php } ?>
31 31
 		<!-- check if any of our transients contain data -->
32
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Opt-in Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
32
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Opt-in Forms', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
33 33
 	</form>
34 34
 	
35 35
 	<hr />
36 36
 	
37 37
 	<!-- Export Form -->
38
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-settings' , 'nonce' => wp_create_nonce( 'export-settings' ) ) ) ); ?>" method="post">
39
-		<p><strong><?php _e( "Export Settings" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
38
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-settings', 'nonce' => wp_create_nonce( 'export-settings' ) ) ) ); ?>" method="post">
39
+		<p><strong><?php _e( "Export Settings", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
40 40
 		<p class="description">
41
-			<?php _e( "Export YIKES Easy Forms for Mailchimp plugin settings." , 'yikes-inc-easy-mailchimp-extender' ); ?>
41
+			<?php _e( "Export YIKES Easy Forms for Mailchimp plugin settings.", 'yikes-inc-easy-mailchimp-extender' ); ?>
42 42
 		</p>
43 43
 
44 44
 		<!-- check if any of our transients contain data -->
45
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Plugin Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
45
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Plugin Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
46 46
 	</form>
47 47
 	
48 48
 	<hr />
49 49
 	
50 50
 	<!-- Import Form -->
51
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-import-forms' , 'nonce' => wp_create_nonce( 'import-forms' ) ) ) ); ?>" method="post" enctype="multipart/form-data">
52
-		<p><strong><?php _e( "Import" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
51
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-import-forms', 'nonce' => wp_create_nonce( 'import-forms' ) ) ) ); ?>" method="post" enctype="multipart/form-data">
52
+		<p><strong><?php _e( "Import", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
53 53
 		<p class="description">
54
-			<?php _e( "Select the Easy Forms for Mailchimp export file you would like to import. You can use this field to import your opt-in forms or settings. " , 'yikes-inc-easy-mailchimp-extender' ); ?>
54
+			<?php _e( "Select the Easy Forms for Mailchimp export file you would like to import. You can use this field to import your opt-in forms or settings. ", 'yikes-inc-easy-mailchimp-extender' ); ?>
55 55
 		</p>
56 56
 		<label>
57 57
 			<input type="file" name="csv" id="forms_to_import">
58 58
 		</label>
59 59
 		<!-- check if any of our transients contain data -->
60
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Import' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
60
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Import', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
61 61
 	</form>
62 62
 	
63 63
 </div> <!-- .inside -->
Please login to merge, or discard this patch.
admin/partials/dashboard-widgets/class.list-activity-widget.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 	// Construction
10 10
 	public function __construct() {
11 11
 
12
-		if ( apply_filters( 'yikes-mailchimp-dashboard-widgets-enabled', true ) === true &&  yikes_get_mc_api_key() != '' && get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'valid_api_key' ) {
12
+		if ( apply_filters( 'yikes-mailchimp-dashboard-widgets-enabled', true ) === true && yikes_get_mc_api_key() != '' && get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'valid_api_key' ) {
13 13
 
14 14
 			// hook in and display our list stats dashboard widget
15 15
 			add_action( 'wp_dashboard_setup', array( $this, 'yks_mc_add_dashboard_widget' ), 10 );
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 
55 55
 			/* List Stats Dashboard Widget */
56 56
 			wp_add_dashboard_widget(
57
-				'yikes_easy_mc_list_stats_widget',         // Widget slug.
58
-				__( 'Mailchimp List Stats', 'yikes-inc-easy-mailchimp-extender' ),         // Title.
57
+				'yikes_easy_mc_list_stats_widget', // Widget slug.
58
+				__( 'Mailchimp List Stats', 'yikes-inc-easy-mailchimp-extender' ), // Title.
59 59
 				array( $this, 'list_stats_dashboard_widget' ) // Display function.
60 60
 			);
61 61
 		}
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 					<?php
88 88
 					foreach ( $list_data as $list ) {
89 89
 						?>
90
-						<option value="<?php echo $list['id']; ?>"><?php echo $list['name']; ?></option>
90
+						<option value="<?php echo $list[ 'id' ]; ?>"><?php echo $list[ 'name' ]; ?></option>
91 91
 						<?php
92 92
 					}
93 93
 					?>
Please login to merge, or discard this patch.
admin/partials/front-end-widgets/front-end-widget-form.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 			// Widget name will appear in UI
26 26
 			__( 'Easy Mailchimp Forms', 'yikes-inc-easy-mailchimp-extender' ),
27 27
 			// Widget description
28
-			array( 'description' => __( 'Mailchimp opt-in widget for your sidebar.', 'yikes-inc-easy-mailchimp-extender' ), )
28
+			array( 'description' => __( 'Mailchimp opt-in widget for your sidebar.', 'yikes-inc-easy-mailchimp-extender' ),)
29 29
 		);
30 30
 	}
31 31
 
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 		// Get all form IDs so we can use the first one as a default.
40 40
 		$form_ids = $this->form_interface->get_form_ids();
41 41
 
42
-		$title              = isset( $instance['title'] ) ? apply_filters( 'widget_title', $instance['title'] ) : __( 'Mailchimp Signup Form', 'yikes-inc-easy-mailchimp-extender' );
43
-		$form_id            = isset( $instance['form_id'] ) ? $instance['form_id'] : $form_ids[0];
44
-		$form_description   = isset( $instance['form_description'] ) ? $instance['form_description'] : '';
45
-		$submit_button_text = isset( $instance['submit_text'] ) ? $instance['submit_text'] : __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
42
+		$title              = isset( $instance[ 'title' ] ) ? apply_filters( 'widget_title', $instance[ 'title' ] ) : __( 'Mailchimp Signup Form', 'yikes-inc-easy-mailchimp-extender' );
43
+		$form_id            = isset( $instance[ 'form_id' ] ) ? $instance[ 'form_id' ] : $form_ids[ 0 ];
44
+		$form_description   = isset( $instance[ 'form_description' ] ) ? $instance[ 'form_description' ] : '';
45
+		$submit_button_text = isset( $instance[ 'submit_text' ] ) ? $instance[ 'submit_text' ] : __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
46 46
 
47 47
 		// Build our array based on settings chosen
48 48
 		$shortcode_attributes = array(
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
 		$shortcode_attributes = apply_filters( 'yikes_mailchimp_widget_shortcode_attributes', $shortcode_attributes, $instance );
55 55
 
56 56
 		// before and after widget arguments are defined by themes
57
-		echo $args['before_widget'];
57
+		echo $args[ 'before_widget' ];
58 58
 
59 59
 		if ( ! empty( $title ) ) {
60
-			echo $args['before_title'] . $title . $args['after_title'];
60
+			echo $args[ 'before_title' ] . $title . $args[ 'after_title' ];
61 61
 		}
62 62
 
63 63
 		// Custom action hooks to place content in the widget before the form
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		do_action( 'yikes-mailchimp-after-form-' . $form_id );
74 74
 		do_action( 'yikes-mailchimp-after-form' );
75 75
 
76
-		echo $args['after_widget'];
76
+		echo $args[ 'after_widget' ];
77 77
 	}
78 78
 
79 79
 	// Widget Backend 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		if ( empty( $all_forms ) ) {
84 84
 			?>
85 85
 				<section class="no-forms-widget">
86
-				<strong><span class="dashicons dashicons-no-alt no-forms-found-icon"></span><?php echo sprintf( __( 'No forms found. It looks like you need to <a href="%s" title="%s">%s</a>.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ), __( 'Create a form' , 'yikes-inc-easy-mailchimp-extender' ), __( 'create a form' , 'yikes-inc-easy-mailchimp-extender' ) ); ?></strong>
86
+				<strong><span class="dashicons dashicons-no-alt no-forms-found-icon"></span><?php echo sprintf( __( 'No forms found. It looks like you need to <a href="%s" title="%s">%s</a>.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ), __( 'Create a form', 'yikes-inc-easy-mailchimp-extender' ), __( 'create a form', 'yikes-inc-easy-mailchimp-extender' ) ); ?></strong>
87 87
 				</section>
88 88
 			<?php
89 89
 			return;
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 			$submit_text = __( 'Submit', 'yikes-inc-easy-mailchimp-extender' );
111 111
 		}
112 112
 
113
-		 if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) == 'invalid_api_key' ) {
113
+		 if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) == 'invalid_api_key' ) {
114 114
 			?>
115
-				<p class="enter-valid-api-error-widget"><strong><?php _e( 'Please enter a valid Mailchimp API key to connect your site to Mailchimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
115
+				<p class="enter-valid-api-error-widget"><strong><?php _e( 'Please enter a valid Mailchimp API key to connect your site to Mailchimp.', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
116 116
 			<?php
117 117
 			return;
118 118
 		}
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
 			<select id="<?php echo $this->get_field_id( 'form_id' ); ?>" name="<?php echo $this->get_field_name( 'form_id' ); ?>" class="widefat">
130 130
 				<?php
131 131
 				// build our array
132
-				foreach( $all_forms as $id => $form ) {
132
+				foreach ( $all_forms as $id => $form ) {
133 133
 					?>
134
-						<option <?php selected( $selected_form , $id ); ?> name="<?php echo $this->get_field_name( 'form_id' ); ?>" value="<?php echo $id; ?>"><?php echo stripslashes( $form['form_name'] ); ?></option>
134
+						<option <?php selected( $selected_form, $id ); ?> name="<?php echo $this->get_field_name( 'form_id' ); ?>" value="<?php echo $id; ?>"><?php echo stripslashes( $form[ 'form_name' ] ); ?></option>
135 135
 					<?php
136 136
 				}
137 137
 				?>
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
 		<p>
142 142
 			<label for="<?php echo $this->get_field_id( 'form_description' ); ?>"><?php _e( 'Display Form Description:' ); ?></label>
143
-			<input class="widefat" id="<?php echo $this->get_field_id( 'form_description' ); ?>" name="<?php echo $this->get_field_name( 'form_description' ); ?>" type="checkbox" value="1" <?php if( isset( $instance['form_description'] ) ) { checked( $instance['form_description'] , 1 ); } ?> />
143
+			<input class="widefat" id="<?php echo $this->get_field_id( 'form_description' ); ?>" name="<?php echo $this->get_field_name( 'form_description' ); ?>" type="checkbox" value="1" <?php if ( isset( $instance[ 'form_description' ] ) ) { checked( $instance[ 'form_description' ], 1 ); } ?> />
144 144
 		</p>
145 145
 
146 146
 		<p>
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
 	// Updating widget replacing old instances with new
154 154
 	public function update( $new_instance, $old_instance ) {
155 155
 		$instance = array();
156
-		$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
157
-		$instance['form_id'] = $new_instance['form_id'];
158
-		$instance['form_description'] = isset( $new_instance['form_description'] ) ? '1' : '';
159
-		$instance['submit_text'] = ( ! empty( $new_instance['submit_text'] ) ) ? strip_tags( $new_instance['submit_text'] ) : 'Submit';
156
+		$instance[ 'title' ] = ( ! empty( $new_instance[ 'title' ] ) ) ? strip_tags( $new_instance[ 'title' ] ) : '';
157
+		$instance[ 'form_id' ] = $new_instance[ 'form_id' ];
158
+		$instance[ 'form_description' ] = isset( $new_instance[ 'form_description' ] ) ? '1' : '';
159
+		$instance[ 'submit_text' ] = ( ! empty( $new_instance[ 'submit_text' ] ) ) ? strip_tags( $new_instance[ 'submit_text' ] ) : 'Submit';
160 160
 		return $instance;
161 161
 	}
162 162
 	
Please login to merge, or discard this patch.
includes/third-party-integrations/visual-composer/visual-composer.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 		if ( ! empty( $all_forms ) ) {
116 116
 			// build an array to pass to our javascript
117 117
 			foreach ( $all_forms as $id => $form ) {
118
-				$lists[ $form['form_name'] ] = $id;
118
+				$lists[ $form[ 'form_name' ] ] = $id;
119 119
 			}
120 120
 		} else {
121 121
 			$lists[ __( 'Please Import Some Mailchimp Lists', 'yikes-inc-easy-mailchimp-extender' ) ] = '-';
Please login to merge, or discard this patch.
Braces   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,18 +5,18 @@  discard block
 block discarded – undo
5 5
 *	@since 6.0.3
6 6
 */
7 7
 
8
-class YIKES_Mailchimp_Visual_Composer_Extension {
8
+class YIKES_Mailchimp_Visual_Composer_Extension {
9 9
 
10 10
 	/**
11 11
 	 * Constructor
12 12
 	 *
13 13
 	 * @since 6.0.3
14 14
 	 */
15
-	function __construct() {
15
+	function __construct() {
16 16
 		
17 17
 		add_action( 'admin_init', array( $this, 'extend_visual_composer' ) );
18 18
 
19
-		if ( function_exists( 'vc_add_shortcode_param' ) ) {
19
+		if ( function_exists( 'vc_add_shortcode_param' ) ) {
20 20
 			vc_add_shortcode_param( 'yikes_mailchimp_logo', array( $this, 'yikes_mailchimp_logo_vc_section' ) );
21 21
 		}
22 22
 	}
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 	 *
27 27
 	 * @since 6.0.3
28 28
 	 */
29
-	public function extend_visual_composer() {
29
+	public function extend_visual_composer() {
30 30
 
31
-		if ( ! function_exists( 'vc_map' ) ) {
31
+		if ( ! function_exists( 'vc_map' ) ) {
32 32
 			return;
33 33
 		}
34 34
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 *
99 99
 	 * @since 6.0.3
100 100
 	 */
101
-	public function yikes_mailchimp_logo_vc_section() {
101
+	public function yikes_mailchimp_logo_vc_section() {
102 102
 		return '<img style="width:250px;display:block;margin:0 auto;" src="' . YIKES_MC_URL . 'includes/images/Mailchimp_Assets/mailchimp-logo.png" title="' . __( 'Easy Forms for Mailchimp', 'yikes-inc-easy-mailchimp-extender' ) . '" />';
103 103
 	}
104 104
 
@@ -107,17 +107,17 @@  discard block
 block discarded – undo
107 107
 	 *
108 108
 	 * @since 6.0.3
109 109
 	 */
110
-	public function yikes_mailchimp_retreive_user_created_forms() {
110
+	public function yikes_mailchimp_retreive_user_created_forms() {
111 111
 		$interface = yikes_easy_mailchimp_extender_get_form_interface();
112 112
 		$all_forms = $interface->get_all_forms();
113 113
 
114 114
 		$lists = array();
115
-		if ( ! empty( $all_forms ) ) {
115
+		if ( ! empty( $all_forms ) ) {
116 116
 			// build an array to pass to our javascript
117
-			foreach ( $all_forms as $id => $form ) {
117
+			foreach ( $all_forms as $id => $form ) {
118 118
 				$lists[ $form['form_name'] ] = $id;
119 119
 			}
120
-		} else {
120
+		} else {
121 121
 			$lists[ __( 'Please Import Some Mailchimp Lists', 'yikes-inc-easy-mailchimp-extender' ) ] = '-';
122 122
 		}
123 123
 
Please login to merge, or discard this patch.
includes/api/class-yikes-inc-easy-mailchimp-api.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 * @return array|WP_Error
104 104
 	 */
105 105
 	public function patch( $path = '', $headers = array(), $params = array() ) {
106
-		if ( ! isset( $params['body'] ) ) {
106
+		if ( ! isset( $params[ 'body' ] ) ) {
107 107
 			return new WP_Error(
108 108
 				'yikesinc_eme_missing_body',
109 109
 				sprintf(
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 * @return array|WP_Error
131 131
 	 */
132 132
 	public function post( $path = '', $headers = array(), $params = array() ) {
133
-		if ( ! isset( $params['body'] ) ) {
133
+		if ( ! isset( $params[ 'body' ] ) ) {
134 134
 			return new WP_Error(
135 135
 				'yikesinc_eme_missing_body',
136 136
 				sprintf(
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * @return array|WP_Error
158 158
 	 */
159 159
 	public function put( $path = '', $headers = array(), $params = array() ) {
160
-		if ( ! isset( $params['body'] ) ) {
160
+		if ( ! isset( $params[ 'body' ] ) ) {
161 161
 			return new WP_Error(
162 162
 				'yikesinc_eme_missing_body',
163 163
 				sprintf(
@@ -288,13 +288,13 @@  discard block
 block discarded – undo
288 288
 		$authorized_args = $this->get_authorized_args();
289 289
 
290 290
 		// If we have body data, maybe convert it to JSON.
291
-		if ( isset( $params['body'] ) && ( is_array( $params['body'] ) || is_object( $params['body'] ) ) ) {
292
-			$params['body']          = json_encode( wp_parse_args( $authorized_args['body'], $params['body'] ) );
293
-			$headers['Content-Type'] = 'application/json';
291
+		if ( isset( $params[ 'body' ] ) && ( is_array( $params[ 'body' ] ) || is_object( $params[ 'body' ] ) ) ) {
292
+			$params[ 'body' ]          = json_encode( wp_parse_args( $authorized_args[ 'body' ], $params[ 'body' ] ) );
293
+			$headers[ 'Content-Type' ] = 'application/json';
294 294
 		}
295 295
 
296 296
 		// Combine the given headers and auth headers
297
-		$headers = wp_parse_args( $authorized_args['headers'], $headers );
297
+		$headers = wp_parse_args( $authorized_args[ 'headers' ], $headers );
298 298
 		/**
299 299
 		 * Filter the headers used for a request to the Mailchimp API.
300 300
 		 *
@@ -358,12 +358,12 @@  discard block
 block discarded – undo
358 358
 
359 359
 		// Version 2.0 uses body authorization
360 360
 		if ( version_compare( '3.0', $this->api_version, '>' ) ) {
361
-			$args['body'] = $this->get_auth_body();
361
+			$args[ 'body' ] = $this->get_auth_body();
362 362
 		}
363 363
 
364 364
 		// Version 3.0 uses authorization headers.
365 365
 		if ( version_compare( '3.0', $this->api_version, '<=' ) ) {
366
-			$args['headers'] = $this->get_auth_headers();
366
+			$args[ 'headers' ] = $this->get_auth_headers();
367 367
 		}
368 368
 
369 369
 		return $args;
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/api-cache-settings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
3 3
 	-	Clear Mailchimp transient data such as forms, form fields, list data, subscribers etc.
4 4
 		*	transient cache is stored for 60 minutes.
5 5
 -->
6
-<h3><span><?php _e( 'API Cache Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
6
+<h3><span><?php _e( 'API Cache Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7 7
 <div class="inside">
8 8
 									
9 9
 	<!-- Settings Form -->
10
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data' , 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" method="post">							
10
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-clear-transient-data', 'nonce' => wp_create_nonce( 'clear-mc-transient-data' ) ) ) ); ?>" method="post">							
11 11
 									
12
-		<p><?php _e( "Delete all Mailchimp data stored in your sites cache. Most data is stored in the cache for 1 hour." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
12
+		<p><?php _e( "Delete all Mailchimp data stored in your sites cache. Most data is stored in the cache for 1 hour.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
13 13
 			<!-- check if any of our transients contain data -->							
14 14
 			<?php if ( false === get_transient( 'yikes-easy-mailchimp-list-data' ) && false === get_transient( 'yikes-easy-mailchimp-profile-data' ) && false === get_transient( 'yikes-easy-mailchimp-account-data' ) && false === get_transient( 'yikesinc_eme_list_ids' ) && false === get_transient( 'yikes_eme_lists' ) ) { ?>
15
-				<p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No Mailchimp data found in temporary cache storage.' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear Mailchimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
15
+				<p><a href="#" class="button-secondary" disabled="disabled" title="<?php _e( 'No Mailchimp data found in temporary cache storage.', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Clear Mailchimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?></a></p>
16 16
 			<?php } else { ?>
17
-				<p><input type="submit" class="button-primary" value="<?php _e( 'Clear Mailchimp API Cache' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
17
+				<p><input type="submit" class="button-primary" value="<?php _e( 'Clear Mailchimp API Cache', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
18 18
 			<?php } ?>
19 19
 									
20 20
 	</form>
Please login to merge, or discard this patch.
admin/partials/menu/add-ons.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
 <div class="wrap">
8 8
 
9 9
 	<!-- Freddie Logo -->
10
-	<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" />
10
+	<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" />
11 11
 
12
-	<h1>Easy Forms for Mailchimp | <?php echo esc_attr__( 'Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="https://yikesplugins.com/plugins/?plugins=Mailchimp" target="_blank" class="button-primary coming-soon-button" title="<?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1>
12
+	<h1>Easy Forms for Mailchimp | <?php echo esc_attr__( 'Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="https://yikesplugins.com/plugins/?plugins=Mailchimp" target="_blank" class="button-primary coming-soon-button" title="<?php esc_attr_e( 'View All Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_attr_e( 'View All Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1>
13 13
 
14 14
 	<!-- Addons Page Description -->
15
-	<p class="yikes-easy-mc-about-text about-text"><?php esc_attr_e( "Below you'll find all free and paid add-ons available for Easy Forms for Mailchimp. Each add-on extends the functionality of the free plugin." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
15
+	<p class="yikes-easy-mc-about-text about-text"><?php esc_attr_e( "Below you'll find all free and paid add-ons available for Easy Forms for Mailchimp. Each add-on extends the functionality of the free plugin.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
16 16
 
17 17
 	<!-- Add-On Container -->
18 18
 	<section id="add-ons">
Please login to merge, or discard this patch.
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.