Completed
Push — staging ( 68fed3...485a71 )
by Evan
04:30
created
public/classes/checkbox-integrations/class.contact_form_7-checkbox.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 	}
31 31
 	
32 32
 	/**
33
-	* Registers the CF7 shortcode
33
+	 * Registers the CF7 shortcode
34 34
 	 *
35
-	* @return boolean
36
-	*/
35
+	 * @return boolean
36
+	 */
37 37
 	public function init() {
38 38
 		if( ! function_exists( 'wpcf7_add_shortcode' ) ) {
39 39
 			return false;
@@ -43,21 +43,21 @@  discard block
 block discarded – undo
43 43
 	}
44 44
 	
45 45
 	/**
46
-	* Alter Contact Form 7 data.
47
-	*
48
-	* Adds yikes_mailchimp_checkbox to post data so users can use `yikes_mailchimp_checkbox` in their email templates
49
-	*
50
-	* @param array $data
51
-	* @return array
52
-	*/
46
+	 * Alter Contact Form 7 data.
47
+	 *
48
+	 * Adds yikes_mailchimp_checkbox to post data so users can use `yikes_mailchimp_checkbox` in their email templates
49
+	 *
50
+	 * @param array $data
51
+	 * @return array
52
+	 */
53 53
 	public function alter_cf7_data( $data = array() ) {
54 54
 		$data['yikes_mailchimp_checkbox'] = $this->was_checkbox_checked( $this->type ) ? __( 'Yes', 'yikes-inc-easy-mailchimp-extender' ) : __( 'No', 'yikes-inc-easy-mailchimp-extender' );
55 55
 		return $data;
56 56
 	}
57 57
 	
58 58
 	/**
59
-	* Subscribe from Contact Form 7 Forms
60
-	*/
59
+	 * Subscribe from Contact Form 7 Forms
60
+	 */
61 61
 	public function new_cf7_subscription( $contact_form ) {
62 62
 		// was sign-up checkbox checked?
63 63
 		if ( $this->was_checkbox_checked( $this->type ) === false ) {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 */
12 12
 	
13 13
 // Prevent direct access to the file
14
-defined('ABSPATH') or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!" , 'yikes-inc-easy-mailchimp-extender' ) );
14
+defined( 'ABSPATH' ) or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!", 'yikes-inc-easy-mailchimp-extender' ) );
15 15
 
16 16
 class Yikes_Easy_MC_CF7_Checkbox_Class extends Yikes_Easy_MC_Checkbox_Integration_Class {
17 17
 	/**
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		// initialize
27 27
 		$this->init();
28 28
 		add_action( 'wpcf7_mail_sent', array( $this, 'new_cf7_subscription' ) );
29
-		add_action( 'wpcf7_posted_data', array( $this, 'alter_cf7_data') );
29
+		add_action( 'wpcf7_posted_data', array( $this, 'alter_cf7_data' ) );
30 30
 	}
31 31
 	
32 32
 	/**
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	* @return boolean
36 36
 	*/
37 37
 	public function init() {
38
-		if( ! function_exists( 'wpcf7_add_shortcode' ) ) {
38
+		if ( ! function_exists( 'wpcf7_add_shortcode' ) ) {
39 39
 			return false;
40 40
 		}
41 41
 		wpcf7_add_shortcode( 'yikes_mailchimp_checkbox', array( $this, 'yikes_get_checkbox' ) );
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	* @return array
52 52
 	*/
53 53
 	public function alter_cf7_data( $data = array() ) {
54
-		$data['yikes_mailchimp_checkbox'] = $this->was_checkbox_checked( $this->type ) ? __( 'Yes', 'yikes-inc-easy-mailchimp-extender' ) : __( 'No', 'yikes-inc-easy-mailchimp-extender' );
54
+		$data[ 'yikes_mailchimp_checkbox' ] = $this->was_checkbox_checked( $this->type ) ? __( 'Yes', 'yikes-inc-easy-mailchimp-extender' ) : __( 'No', 'yikes-inc-easy-mailchimp-extender' );
55 55
 		return $data;
56 56
 	}
57 57
 	
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 			return false;
65 65
 		}
66 66
 		// get the integration options
67
-		$integration_options = get_option( 'optin-checkbox-init' , '' );
67
+		$integration_options = get_option( 'optin-checkbox-init', '' );
68 68
 		// get the contact form 7 submission instance
69 69
 		$submission = WPCF7_Submission::get_instance();
70 70
 		// confirm the submission was received
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			// get the submission data
73 73
 			$posted_data = $submission->get_posted_data();
74 74
 			// store the email -- this needs to be more dynamic (find string with containing string email?)
75
-			$email = ( isset( $posted_data['your-email'] ) ) ? $posted_data['your-email'] : '';
75
+			$email = ( isset( $posted_data[ 'your-email' ] ) ) ? $posted_data[ 'your-email' ] : '';
76 76
 			// submit this subscriber
77 77
 			return $this->subscribe_user_integration( $email, $this->type, apply_filters( 'yikes-mailchimp-contact-form-7', array(), $posted_data ) );
78 78
 		}
Please login to merge, or discard this patch.
public/class-yikes-inc-easy-mailchimp-extender-public.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
 	}
74 74
 	
75 75
 	/**
76
-	*	Create our own custom the_content(); filter to prevent plugins and such from hooking in where not wanted
77
-	*
78
-	*	@since 6.0.3
79
-	*/
76
+	 *	Create our own custom the_content(); filter to prevent plugins and such from hooking in where not wanted
77
+	 *
78
+	 *	@since 6.0.3
79
+	 */
80 80
 	public function yikes_custom_frontend_content_filter() {
81 81
 		add_filter( 'yikes-mailchimp-frontend-content', 'wptexturize' );
82 82
 		add_filter( 'yikes-mailchimp-frontend-content', 'convert_smilies' );
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 *	load our checkbox classes
94 94
 	 *
95 95
 	 *	@since 6.0.0
96
-	**/
96
+	 **/
97 97
 	public function load_checkbox_integration_classes() {
98 98
 		// store our options
99 99
 		$integrations = get_option( 'optin-checkbox-init' , '' );
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,8 @@
 block discarded – undo
138 138
 		if( $form_id ) {
139 139
 			$form_settings = self::yikes_retrieve_form_settings( $form_id );
140 140
 			if( isset( $_POST ) && !empty( $_POST ) && isset( $form_id ) && $form_settings['submission_settings']['ajax'] == 0 ) {
141
-				if( $_POST['yikes-mailchimp-submitted-form'] == $form_id ) { // ensure we only process the form that was submitted
141
+				if( $_POST['yikes-mailchimp-submitted-form'] == $form_id ) {
142
+// ensure we only process the form that was submitted
142 143
 					// lets include our form processing file
143 144
 					include_once( YIKES_MC_PATH . 'public/partials/shortcodes/process/process_form_submission.php' );
144 145
 					if( $form_settings['submission_settings']['redirect_on_submission'] == '1' ) {
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 		new YIKES_Inc_Easy_MailChimp_Public_Ajax();
57 57
 
58 58
 		// Include our error logging class
59
-		add_action( 'init' , array( $this , 'load_error_logging_class' ) , 1 );
59
+		add_action( 'init', array( $this, 'load_error_logging_class' ), 1 );
60 60
 		// load our checkbox classes
61
-		add_action( 'init' , array( $this , 'load_checkbox_integration_classes' ) , 1 );
61
+		add_action( 'init', array( $this, 'load_checkbox_integration_classes' ), 1 );
62 62
 		// custom front end filter
63 63
 		add_action( 'init', array( $this, 'yikes_custom_frontend_content_filter' ) );
64 64
 		// Process non-ajax forms in the header
@@ -93,15 +93,15 @@  discard block
 block discarded – undo
93 93
 	**/
94 94
 	public function load_checkbox_integration_classes() {
95 95
 		// store our options
96
-		$integrations = get_option( 'optin-checkbox-init' , '' );
97
-		if( !empty( $integrations ) ) {
96
+		$integrations = get_option( 'optin-checkbox-init', '' );
97
+		if ( ! empty( $integrations ) ) {
98 98
 			// load our mail integrations class
99 99
 			require_once YIKES_MC_PATH . 'public/classes/checkbox-integrations.php';
100 100
 			// loop over selected classes and load them up!
101
-			foreach( $integrations as $integration => $value ) {
102
-				if( isset( $value['value'] ) && $value['value'] == 'on' ) {
101
+			foreach ( $integrations as $integration => $value ) {
102
+				if ( isset( $value[ 'value' ] ) && $value[ 'value' ] == 'on' ) {
103 103
 					// load our class extensions
104
-					require_once YIKES_MC_PATH . 'public/classes/checkbox-integrations/class.'.$integration.'-checkbox.php';
104
+					require_once YIKES_MC_PATH . 'public/classes/checkbox-integrations/class.' . $integration . '-checkbox.php';
105 105
 				}
106 106
 			}
107 107
 		}
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @since 6.0.0
116 116
 	 */
117 117
 	public function load_error_logging_class() {
118
-		if( get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
118
+		if ( get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
119 119
 			// if error logging is enabled we should include our error logging class
120 120
 			require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
121 121
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging;
@@ -128,18 +128,18 @@  discard block
 block discarded – undo
128 128
 	*	@since 6.0.3.4
129 129
 	*/
130 130
 	public function yikes_process_non_ajax_forms( $form_submitted ) {
131
-		global $wpdb,$post;
132
-		$form_id = ( ! empty( $_POST['yikes-mailchimp-submitted-form'] ) ) ? (int) $_POST['yikes-mailchimp-submitted-form'] : false; // store form id
133
-		if( $form_id ) {
131
+		global $wpdb, $post;
132
+		$form_id = ( ! empty( $_POST[ 'yikes-mailchimp-submitted-form' ] ) ) ? (int) $_POST[ 'yikes-mailchimp-submitted-form' ] : false; // store form id
133
+		if ( $form_id ) {
134 134
 			$form_settings = self::yikes_retrieve_form_settings( $form_id );
135
-			if( isset( $_POST ) && !empty( $_POST ) && isset( $form_id ) && $form_settings['submission_settings']['ajax'] == 0 ) {
136
-				if( $_POST['yikes-mailchimp-submitted-form'] == $form_id ) { // ensure we only process the form that was submitted
135
+			if ( isset( $_POST ) && ! empty( $_POST ) && isset( $form_id ) && $form_settings[ 'submission_settings' ][ 'ajax' ] == 0 ) {
136
+				if ( $_POST[ 'yikes-mailchimp-submitted-form' ] == $form_id ) { // ensure we only process the form that was submitted
137 137
 					// lets include our form processing file
138 138
 					include_once( YIKES_MC_PATH . 'public/partials/shortcodes/process/process_form_submission.php' );
139
-					if( $form_settings['submission_settings']['redirect_on_submission'] == '1' ) {
140
-						if( $form_submitted == 1 ) {
139
+					if ( $form_settings[ 'submission_settings' ][ 'redirect_on_submission' ] == '1' ) {
140
+						if ( $form_submitted == 1 ) {
141 141
 							// decode our settings
142
-							$redirect_page = ( 'custom_url' != $form_settings['submission_settings']['redirect_page'] ) ? get_permalink( (int) $form_settings['submission_settings']['redirect_page'] ) : $form_settings['submission_settings']['custom_redirect_url'];
142
+							$redirect_page = ( 'custom_url' != $form_settings[ 'submission_settings' ][ 'redirect_page' ] ) ? get_permalink( (int) $form_settings[ 'submission_settings' ][ 'redirect_page' ] ) : $form_settings[ 'submission_settings' ][ 'custom_redirect_url' ];
143 143
 							wp_redirect( apply_filters( 'yikes-mailchimp-redirect-url', esc_url( $redirect_page ), $form_id, $post ) );
144 144
 							exit;
145 145
 						}
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	 */
168 168
 	public static function yikes_retrieve_form_settings( $form_id ) {
169 169
 		// if no form id, abort
170
-		if( ! $form_id ) {
170
+		if ( ! $form_id ) {
171 171
 			return array();
172 172
 		}
173 173
 
@@ -196,13 +196,13 @@  discard block
 block discarded – undo
196 196
 			return;
197 197
 		}
198 198
 		// trim trailing period
199
-		if ( isset( $form_settings['error_messages']['update-link'] ) && ! empty( $form_settings['error_messages']['update-link'] ) ) {
200
-			$response_text = $form_settings['error_messages']['update-link'];
199
+		if ( isset( $form_settings[ 'error_messages' ][ 'update-link' ] ) && ! empty( $form_settings[ 'error_messages' ][ 'update-link' ] ) ) {
200
+			$response_text = $form_settings[ 'error_messages' ][ 'update-link' ];
201 201
 			// extract the link text
202 202
 			preg_match( '/\[link].*?\[\/link\]/', $response_text, $link_text );
203 203
 			if ( $link_text && ! empty( $link_text ) ) {
204 204
 				// Extract the custom link text ([link]*[/link])
205
-				$custom_link_text = str_replace( '[/link]', '', str_replace( '[link]', '', str_replace( 'click to send yourself an update link', $link_text[0], $link ) ) );
205
+				$custom_link_text = str_replace( '[/link]', '', str_replace( '[link]', '', str_replace( 'click to send yourself an update link', $link_text[ 0 ], $link ) ) );
206 206
 				// Replace the link text, with our custom link text
207 207
 				$response_text = str_replace( $link_text, $custom_link_text, $response_text );
208 208
 			}
@@ -231,8 +231,8 @@  discard block
 block discarded – undo
231 231
 		}
232 232
 
233 233
 		// trim trailing period
234
-		if ( isset( $form_settings['error_messages']['already-subscribed'] ) && ! empty( $form_settings['error_messages']['already-subscribed'] ) ) {
235
-			$response_text = str_replace( '[email]', $email, $form_settings['error_messages']['already-subscribed'] );
234
+		if ( isset( $form_settings[ 'error_messages' ][ 'already-subscribed' ] ) && ! empty( $form_settings[ 'error_messages' ][ 'already-subscribed' ] ) ) {
235
+			$response_text = str_replace( '[email]', $email, $form_settings[ 'error_messages' ][ 'already-subscribed' ] );
236 236
 		}
237 237
 		// Return our new string
238 238
 		return $response_text;
Please login to merge, or discard this patch.
public/helpers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 *	
12 12
 *	@since 6.0.0
13 13
 */
14
-function yksemeProcessSnippet( $list=false, $submit_text ) {
14
+function yksemeProcessSnippet( $list = false, $submit_text ) {
15 15
 	$submit_text = ( isset( $submit_text ) ) ? 'submit="' . $submit_text . '"' : '';
16 16
 	return do_shortcode( '[yikes-mailchimp form="' . $list . '" ' . $submit_text . ']' );
17 17
 }
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 *	@since 6.0.3.4
22 22
 */
23 23
 function yikes_get_form_data( $form_id ) {
24
-	if( ! $form_id ) {
24
+	if ( ! $form_id ) {
25 25
 		return __( 'Whoops, you forgot to specify a form ID.', 'yikes-inc-easy-mailchimp-extender' );
26 26
 	}
27 27
 	return Yikes_Inc_Easy_Mailchimp_Extender_Public::yikes_retrieve_form_settings( $form_id );
Please login to merge, or discard this patch.
includes/class-yikes-inc-easy-mailchimp-extender-uninstall.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
9 9
 			// users can only unisntall a plugin from the network dashboard page
10 10
 			// Get all blog ids
11
-			$blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
11
+			$blogids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
12 12
 			foreach ( $blogids as $blog_id ) {
13 13
 				switch_to_blog( $blog_id );
14 14
 				self::_uninstall_yikes_easy_mailchimp( $wpdb );
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
 	 * @since    6.0.0
29 29
 	 */
30 30
 	static function _uninstall_yikes_easy_mailchimp( $wpdb ) {
31
-		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
31
+		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
32 32
 		/* Clean up and delete our custom table from the databse */
33
-		$table = $wpdb->prefix."yikes_easy_mc_forms";
33
+		$table = $wpdb->prefix . "yikes_easy_mc_forms";
34 34
 		$sql = 'DROP TABLE IF EXISTS ' . $table;
35 35
 		//Delete any options thats stored also?
36 36
 		$wpdb->query( $sql );
37
-		dbDelta($sql);
37
+		dbDelta( $sql );
38 38
 		/* Clear All Transient Data */
39 39
 		// Delete list data transient data
40 40
 		delete_transient( 'yikes-easy-mailchimp-list-data' );
Please login to merge, or discard this patch.
includes/class-yikes-inc-easy-mailchimp-extender-loader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 * @return   type                                   The collection of actions and filters registered with WordPress.
87 87
 	 */
88 88
 	private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
89
-		$hooks[] = array(
89
+		$hooks[ ] = array(
90 90
 			'hook'          => $hook,
91 91
 			'component'     => $component,
92 92
 			'callback'      => $callback,
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	public function run() {
104 104
 		foreach ( $this->filters as $hook ) {
105
-			add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
105
+			add_filter( $hook[ 'hook' ], array( $hook[ 'component' ], $hook[ 'callback' ] ), $hook[ 'priority' ], $hook[ 'accepted_args' ] );
106 106
 		}
107 107
 		foreach ( $this->actions as $hook ) {
108
-			add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
108
+			add_action( $hook[ 'hook' ], array( $hook[ 'component' ], $hook[ 'callback' ] ), $hook[ 'priority' ], $hook[ 'accepted_args' ] );
109 109
 		}
110 110
 	}
111 111
 }
112 112
\ No newline at end of file
Please login to merge, or discard this patch.
includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -51,19 +51,19 @@  discard block
 block discarded – undo
51 51
 	*	@returned_error 
52 52
 	*	@error_type - what was running when the error occured ie (new user subscription, remove user etc)
53 53
 	*/
54
-	public function yikes_easy_mailchimp_write_to_error_log( $returned_error , $error_type , $page='' ) {
54
+	public function yikes_easy_mailchimp_write_to_error_log( $returned_error, $error_type, $page = '' ) {
55 55
 		
56 56
 		// confirm error logging is toggled on, else lets exit
57
-		if( get_option( 'yikes-mailchimp-debug-status' , '' )  != '1' ) {
57
+		if ( get_option( 'yikes-mailchimp-debug-status', '' ) != '1' ) {
58 58
 			return;
59 59
 		}
60 60
 		
61
-		$contents = file_get_contents( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php' , true );
61
+		$contents = file_get_contents( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php', true );
62 62
 		
63 63
 		// if we pass in a custom page, don't set things up
64
-		if( empty( $page ) ) {
64
+		if ( empty( $page ) ) {
65 65
 			// get the current page, admin or front end?
66
-			if( is_admin() ) {
66
+			if ( is_admin() ) {
67 67
 				$page = __( 'Admin', 'yikes-inc-easy-mailchimp-extender' );
68 68
 			} else {
69 69
 				$page = __( 'Front End', 'yikes-inc-easy-mailchimp-extender' );
@@ -79,14 +79,14 @@  discard block
 block discarded – undo
79 79
 					</label>
80 80
 				</td>
81 81
 				<td>
82
-					<?php _e( 'Page:' , 'yikes-inc-easy-mailchimp-extender' ); echo ' ' . $page; ?> || <?php _e( 'Type:' , 'yikes-inc-easy-mailchimp-extender' ); echo ' ' . $error_type; ?> || <?php _e( 'Time:' , 'yikes-inc-easy-mailchimp-extender' ); echo ' ' . date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) , current_time('timestamp') ); ?>
82
+					<?php _e( 'Page:', 'yikes-inc-easy-mailchimp-extender' ); echo ' ' . $page; ?> || <?php _e( 'Type:', 'yikes-inc-easy-mailchimp-extender' ); echo ' ' . $error_type; ?> || <?php _e( 'Time:', 'yikes-inc-easy-mailchimp-extender' ); echo ' ' . date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), current_time( 'timestamp' ) ); ?>
83 83
 				</td>
84 84
 			</tr>
85 85
 		<?php
86 86
 		$new_contents = ob_get_clean() . $contents;
87 87
 		
88 88
 		// file put contents $returned error + other data
89
-		if( file_exists( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php' ) ) {
89
+		if ( file_exists( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php' ) ) {
90 90
 			file_put_contents( 
91 91
 				YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php',
92 92
 				$new_contents
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
 	*/	
103 103
 	public function yikes_easy_mailchimp_generate_error_log_table() {		
104 104
 		// ensure file_get_contents exists
105
-		if( function_exists( 'file_get_contents' ) ) {	
105
+		if ( function_exists( 'file_get_contents' ) ) {	
106 106
 			// confirm that our file exists
107
-			if( file_exists( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php' ) ) {
108
-				$error_log_contents = file_get_contents( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php' , true );							
109
-				if( $error_log_contents === FALSE ) {
110
-					return _e( 'File get contents not available' , 'yikes-inc-easy-mailchimp-extender' );
107
+			if ( file_exists( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php' ) ) {
108
+				$error_log_contents = file_get_contents( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php', true );							
109
+				if ( $error_log_contents === FALSE ) {
110
+					return _e( 'File get contents not available', 'yikes-inc-easy-mailchimp-extender' );
111 111
 				}
112 112
 				if ( $error_log_contents != '' ) {
113 113
 					// return $error_log_contents;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 						<tr class="error-log-tr">
119 119
 							<td class="row-title colspanchange" colspan="2">
120 120
 								<strong><span class='dashicons dashicons-no-alt'></span> <?php _e( 'No errors logged.', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
121
-								<?php if( get_option( 'yikes-mailchimp-debug-status' , '' ) == '' ) { ?>
121
+								<?php if ( get_option( 'yikes-mailchimp-debug-status', '' ) == '' ) { ?>
122 122
 									<br />
123 123
 									<p class="to-start-logging-errors-notice"><em><?php _e( "To start logging errors toggle on the 'Enable Debugging' option above.", 'yikes-inc-easy-mailchimp-extender' ); ?></em></p>
124 124
 								<?php } ?>
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 									);
147 147
 									?>
148 148
 									<form id="create-error-log" method="POST" action="<?php echo $url; ?>">
149
-										<?php submit_button( __( 'Attempt to Create Error Log' , 'yikes-inc-easy-mailchimp-extender' ) , 'secondary' , '' , '' , array() ); ?>
149
+										<?php submit_button( __( 'Attempt to Create Error Log', 'yikes-inc-easy-mailchimp-extender' ), 'secondary', '', '', array() ); ?>
150 150
 									</form>
151 151
 									
152 152
 								</p>
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
 	*
101 101
 	*  @since 5.6
102 102
 	*/	
103
-	public function yikes_easy_mailchimp_generate_error_log_table() {		
103
+	public function yikes_easy_mailchimp_generate_error_log_table() {
104 104
 		// ensure file_get_contents exists
105
-		if( function_exists( 'file_get_contents' ) ) {	
105
+		if( function_exists( 'file_get_contents' ) ) {
106 106
 			// confirm that our file exists
107 107
 			if( file_exists( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php' ) ) {
108 108
 				$error_log_contents = file_get_contents( YIKES_MC_PATH . 'includes/error_log/yikes-easy-mailchimp-error-log.php' , true );							
@@ -154,7 +154,8 @@  discard block
 block discarded – undo
154 154
 						</tr>
155 155
 					<?php
156 156
 			}
157
-		} else { // if file_get_contents is disabled server side
157
+		} else {
158
+// if file_get_contents is disabled server side
158 159
 			?>
159 160
 				<!-- table body -->
160 161
 				<tr>
Please login to merge, or discard this patch.
includes/class-yikes-inc-easy-mailchimp-extender-activator.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,8 @@
 block discarded – undo
45 45
 				return;
46 46
 			}   
47 47
 			self::_activate_yikes_easy_mailchimp( $wpdb );
48
-		} else { /* end network activate */
48
+		} else {
49
+/* end network activate */
49 50
 			self::_activate_yikes_easy_mailchimp( $wpdb );
50 51
 		}
51 52
 	}
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 			if ( $network_wide ) {
35 35
 				$old_blog = $wpdb->blogid;
36 36
 				// Get all blog ids
37
-				$blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
37
+				$blogids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
38 38
 				foreach ( $blogids as $blog_id ) {
39 39
 					switch_to_blog( $blog_id );
40 40
 					self::_activate_yikes_easy_mailchimp( $wpdb );
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 		custom_fields TEXT NOT NULL,
91 91
 		UNIQUE KEY id (id)
92 92
 		) $charset_collate;";
93
-		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
94
-		dbDelta($sql);
93
+		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
94
+		dbDelta( $sql );
95 95
 
96 96
 		// create an option for the date that the user initially activated the plugin
97 97
 		// used to display a two week notice, asking for a review or to upgrade
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
 			include_once( YIKES_MC_PATH . 'includes/third-party-integrations/visual-composer/visual-composer.php' );
22 22
 		}
23 23
 	}
Please login to merge, or discard this patch.
includes/add_ons/reverse-zip-lookup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
 	<div class="addon-footer-wrap give-clearfix">
34 34
 		<a href="<?php echo esc_attr( $permalink ); ?>" title="<?php echo esc_attr( $add_on_title ); ?>" class="button-secondary" target="_blank">
35
-			<?php esc_attr_e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?>
35
+			<?php esc_attr_e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?>
36 36
 		<span class="dashicons dashicons-external"></span></a>
37 37
 	</div>
38 38
 
Please login to merge, or discard this patch.