Completed
Push — staging ( 7f569b...cd52d3 )
by
unknown
04:28
created
public/classes/checkbox-integrations/class.contact_form_7-checkbox.php 1 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_form_tag' ) ) {
38
+		if ( ! function_exists( 'wpcf7_add_form_tag' ) ) {
39 39
 			return false;
40 40
 		}
41 41
 		wpcf7_add_form_tag( '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
 			// Default the merge_values
77 77
 			$merge_values = array( 'email' => $email );
78 78
 			// submit this subscriber
Please login to merge, or discard this patch.
public/classes/checkbox-integrations/class.registration_form-checkbox.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 */
9 9
 
10 10
 // Prevent direct access to the file
11
-defined('ABSPATH') or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!" , 'yikes-inc-easy-mailchimp-extender' ) );
11
+defined( 'ABSPATH' ) or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!", 'yikes-inc-easy-mailchimp-extender' ) );
12 12
 	
13 13
 class Yikes_Easy_MC_Registration_Checkbox_Class extends Yikes_Easy_MC_Checkbox_Integration_Class {
14 14
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 		add_action( 'register_form', array( $this, 'output_checkbox' ), 20 );
21 21
 		add_action( 'user_register', array( $this, 'subscribe_from_registration' ), 90, 1 );
22 22
 		// alter the error message, if there was an error with the users email address
23
-		add_filter( 'wp_login_errors', array( $this , 'yikes_reg_complete_msg' ), 10,  2 );
23
+		add_filter( 'wp_login_errors', array( $this, 'yikes_reg_complete_msg' ), 10, 2 );
24 24
 	}
25 25
 
26 26
 	/**
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 		$merge_variables = $this->user_merge_vars( $user );
53 53
 		// only subscribe the user if they aren't already on the list
54 54
 		if ( $this->is_user_already_subscribed( 'registration_form', $user->user_email ) === false ) {
55
-			$this->subscribe_user_integration( sanitize_email( $user->user_email ) , $this->type , $merge_variables );
55
+			$this->subscribe_user_integration( sanitize_email( $user->user_email ), $this->type, $merge_variables );
56 56
 		} else {
57 57
 			// add a temporary option to pass our email address and let the user know they are already subscribed
58
-			$user_already_subscribed_message = sprintf( __( "You have not been subscribed to our mailing list. %s is already subscribed to this list.", "yikes-inc-easy-mailchimp-extender" ), $user->user_email  );
59
-			add_option( 'yikes_register_subscription_error' , $user_already_subscribed_message );
58
+			$user_already_subscribed_message = sprintf( __( "You have not been subscribed to our mailing list. %s is already subscribed to this list.", "yikes-inc-easy-mailchimp-extender" ), $user->user_email );
59
+			add_option( 'yikes_register_subscription_error', $user_already_subscribed_message );
60 60
 		}
61 61
 	}
62 62
 	
Please login to merge, or discard this patch.
admin/partials/dashboard-widgets/templates/stats-list-template.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 /* The template file for displaying our stats in the Admin dashboard widget */
3 3
 
4 4
 if ( isset( $list_data ) ) {
5
-	if ( isset( $list_data['id'] ) ) {
5
+	if ( isset( $list_data[ 'id' ] ) ) {
6 6
 
7 7
 	// When a user selects a list from the dropdown, capture the array value here
8 8
 	$list = $list_data;
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
 		// Get the list IDs, capture the first list ID
14 14
 		$first_list_id = '';
15 15
 		$list_ids = array_keys( $list_data );
16
-		if ( is_array( $list_ids ) && isset( $list_ids[0] ) ) {
17
-			$first_list_id = $list_ids[0];
16
+		if ( is_array( $list_ids ) && isset( $list_ids[ 0 ] ) ) {
17
+			$first_list_id = $list_ids[ 0 ];
18 18
 		}
19 19
 
20 20
 		// Set our $list value to the first list in the list_data array
21
-		if ( isset( $list_data[ $first_list_id ] ) && is_array( $list_data[ $first_list_id ] ) && isset( $list_data[ $first_list_id ]['id'] ) ) {
21
+		if ( isset( $list_data[ $first_list_id ] ) && is_array( $list_data[ $first_list_id ] ) && isset( $list_data[ $first_list_id ][ 'id' ] ) ) {
22 22
 			$list = $list_data[ $first_list_id ];
23 23
 		}
24 24
 	}
@@ -31,36 +31,36 @@  discard block
 block discarded – undo
31 31
 
32 32
 ?>
33 33
 <section id="yikes-easy-mc-widget-stat-holder">
34
-	<h3><?php echo $list['name']; ?> <small><a href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $list['id'] . '' ) ); ?>" title="<?php _e( 'view List' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'view list' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></h3>
34
+	<h3><?php echo $list[ 'name' ]; ?> <small><a href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $list[ 'id' ] . '' ) ); ?>" title="<?php _e( 'view List', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'view list', 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></h3>
35 35
 	
36 36
 	<table class="yikes-easy-mc-stats-table">
37 37
 		<thead class="yikes-easy-mc-hidden">
38 38
 			<tr>
39
-				<th><?php _e( 'Subscribers' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
40
-				<th><?php _e( 'Unsubscribed' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
41
-				<th><?php _e( 'New Since Send' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>	
42
-				<th><?php _e( 'Avg. Sub. Rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
39
+				<th><?php _e( 'Subscribers', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
40
+				<th><?php _e( 'Unsubscribed', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
41
+				<th><?php _e( 'New Since Send', 'yikes-inc-easy-mailchimp-extender' ); ?></th>	
42
+				<th><?php _e( 'Avg. Sub. Rate', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
43 43
 			</tr>
44 44
 		</thead>
45 45
 		<tbody>
46 46
 			<tr class="yikes-easy-mc-table-stats-tr yikes-easy-mc-table-stats-tr-first">
47
-				<td title="<?php _e( 'Number of active subscribers.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
48
-					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['member_count']; ?></p>
49
-						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'subscribers' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
47
+				<td title="<?php _e( 'Number of active subscribers.', 'yikes-inc-easy-mailchimp-extender' ); ?>">
48
+					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list[ 'stats' ][ 'member_count' ]; ?></p>
49
+						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'subscribers', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
50 50
 				</td>
51
-				<td title="<?php _e( 'Number of users who have unsusbscribed.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
52
-					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['unsubscribe_count']; ?></p>
53
-						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'unsubscribed' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
51
+				<td title="<?php _e( 'Number of users who have unsusbscribed.', 'yikes-inc-easy-mailchimp-extender' ); ?>">
52
+					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list[ 'stats' ][ 'unsubscribe_count' ]; ?></p>
53
+						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'unsubscribed', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
54 54
 				</td>
55 55
 			</tr>
56 56
 			<tr class="yikes-easy-mc-table-stats-tr  yikes-easy-mc-table-stats-tr-second">
57
-				<td title="<?php _e( 'Number of new subscribers since the last campaign was sent.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
58
-					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['member_count_since_send']; ?></p>
59
-						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'new since send' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
57
+				<td title="<?php _e( 'Number of new subscribers since the last campaign was sent.', 'yikes-inc-easy-mailchimp-extender' ); ?>">
58
+					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list[ 'stats' ][ 'member_count_since_send' ]; ?></p>
59
+						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'new since send', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
60 60
 				</td>
61
-				<td title="<?php _e( 'Average number of subscribers per month.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
62
-					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['avg_sub_rate']; ?></p>
63
-						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'avg. sub. rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
61
+				<td title="<?php _e( 'Average number of subscribers per month.', 'yikes-inc-easy-mailchimp-extender' ); ?>">
62
+					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list[ 'stats' ][ 'avg_sub_rate' ]; ?></p>
63
+						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'avg. sub. rate', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
64 64
 				</td>
65 65
 			</tr>
66 66
 		</tbody>
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.
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,15 +28,15 @@  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
 
33 33
 		/* Clean up and delete our custom table from the databse */
34
-		$table = $wpdb->prefix."yikes_easy_mc_forms";
34
+		$table = $wpdb->prefix . "yikes_easy_mc_forms";
35 35
 		$sql = 'DROP TABLE IF EXISTS ' . $table;
36 36
 
37 37
 		//Delete any options thats stored also?
38 38
 		$wpdb->query( $sql );
39
-		dbDelta($sql);
39
+		dbDelta( $sql );
40 40
 
41 41
 		/* Clear All Transient Data */
42 42
 		delete_transient( 'yikes-easy-mailchimp-list-data' );
Please login to merge, or discard this patch.
includes/add_ons/eu-compliance.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.
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.
includes/add_ons/incentives.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.
includes/add_ons/customizer.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.