Completed
Push — staging ( ff36b4...d90c8e )
by
unknown
04:32
created
public/classes/checkbox-integrations/class.bbpress_forms-checkbox.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 		 * @param array $anonymous_data
42 42
 		 * @param int $user_id
43 43
 		 * @param string $trigger
44
-		 * @return boolean
44
+		 * @return boolean|null
45 45
 		 */
46 46
 		public function subscribe_from_bbpress( $anonymous_data, $user_id, $trigger ) {
47 47
 			$user_data = get_userdata( $user_id );
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
 		}
28 28
 
29 29
 		/**
30
-		* Outputs a checkbox
31
-		*/
30
+		 * Outputs a checkbox
31
+		 */
32 32
 		public function output_checkbox() {
33 33
 			// if the user is already subscribed, abort and don't render the checkbox
34 34
 			if ( $this->is_user_already_subscribed( $this->type ) ) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 	*/
7 7
 	
8 8
 	// Prevent direct access to the file
9
-	defined('ABSPATH') or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!" , 'yikes-inc-easy-mailchimp-extender' ) );
9
+	defined( 'ABSPATH' ) or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!", 'yikes-inc-easy-mailchimp-extender' ) );
10 10
 	
11 11
 	class Yikes_Easy_MC_bbPress_Checkbox_Class extends Yikes_Easy_MC_Checkbox_Integration_Class {
12 12
 	
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		 */
46 46
 		public function subscribe_from_bbpress( $anonymous_data, $user_id, $trigger ) {
47 47
 			$user_data = get_userdata( $user_id );
48
-			return $this->subscribe_user_integration( $user_data->user_email, $this->type , array(
48
+			return $this->subscribe_user_integration( $user_data->user_email, $this->type, array(
49 49
 				'FNAME' => $user_data->first_name,
50 50
 				'LNAME' => $user_data->last_name,
51 51
 			) );
Please login to merge, or discard this patch.
public/classes/checkbox-integrations/class.buddypress_form-checkbox.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,6 @@
 block discarded – undo
40 40
 		 * @param string $user_login
41 41
 		 * @param string $user_password
42 42
 		 * @param string $user_email
43
-		 * @param array $usermeta
44 43
 		 */
45 44
 		public function subscribe_from_buddypress_form( $user_id, $user_login, $user_password, $user_email ) {
46 45
 			if ( $this->was_checkbox_checked( $this->type ) === false ) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 	*/
7 7
 	
8 8
 	// Prevent direct access to the file
9
-	defined('ABSPATH') or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!" , 'yikes-inc-easy-mailchimp-extender' ) );
9
+	defined( 'ABSPATH' ) or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!", 'yikes-inc-easy-mailchimp-extender' ) );
10 10
 	
11 11
 	class Yikes_Easy_MC_BuddyPress_Checkbox_Class extends Yikes_Easy_MC_Checkbox_Integration_Class {
12 12
 		
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
 		}
19 19
 		
20 20
 		/**
21
-		* Outputs a checkbox, if user is not already subscribed
22
-		*/
21
+		 * Outputs a checkbox, if user is not already subscribed
22
+		 */
23 23
 		public function output_checkbox() {
24 24
 			if ( $this->is_user_already_subscribed( $this->type ) ) {
25 25
 				return;
Please login to merge, or discard this patch.
class.easy_digital_downloads_checkout_form-checkbox.php 3 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,6 @@  discard block
 block discarded – undo
41 41
 		
42 42
 		
43 43
 		/**
44
-		 * @param array $meta
45 44
 		 *
46 45
 		 * @return array
47 46
 		 */
@@ -57,7 +56,7 @@  discard block
 block discarded – undo
57 56
 		/**
58 57
 		 * @param int $payment_id The ID of the payment
59 58
 		 *
60
-		 * @return bool|string
59
+		 * @return false|null
61 60
 		 */
62 61
 		public function subscribe_from_edd_purchase( $payment_id ) {
63 62
 			$meta = get_post_meta( $payment_id , '_yikes_easy_mc_optin' , true );
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 	*/
8 8
 	
9 9
 	// Prevent direct access to the file
10
-	defined('ABSPATH') or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!" , 'yikes-inc-easy-mailchimp-extender' ) );
10
+	defined( 'ABSPATH' ) or die( __( "Whoops, you shouldn't be accessing this file directly. Abort!", 'yikes-inc-easy-mailchimp-extender' ) );
11 11
 
12 12
 	class Yikes_Easy_MC_EDD_Checkbox_Class extends Yikes_Easy_MC_Checkbox_Integration_Class {
13 13
 	
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 		 */
22 22
 		public function __construct() {
23 23
 			add_action( 'edd_purchase_form_user_info_fields', array( $this, 'output_checkbox' ) );
24
-			add_action( 'edd_insert_payment', array( $this, 'update_payment_post_meta' ) , 99999 );
25
-			add_action( 'edd_complete_purchase', array( $this, 'subscribe_from_edd_purchase'), 50 );
24
+			add_action( 'edd_insert_payment', array( $this, 'update_payment_post_meta' ), 99999 );
25
+			add_action( 'edd_complete_purchase', array( $this, 'subscribe_from_edd_purchase' ), 50 );
26 26
 		}
27 27
 		
28 28
 		
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 		 */
49 49
 		public function update_payment_post_meta( $payment_id = 0, $payment_data = array() ) {
50 50
 			// don't save anything if the checkbox was not checked
51
-			if( ! $this->was_checkbox_checked( $this->type ) ) {
51
+			if ( ! $this->was_checkbox_checked( $this->type ) ) {
52 52
 				update_post_meta( $payment_id, '_yikes_easy_mc_optin', '0' );
53 53
 				return;
54 54
 			}
@@ -61,25 +61,25 @@  discard block
 block discarded – undo
61 61
 		 * @return bool|string
62 62
 		 */
63 63
 		public function subscribe_from_edd_purchase( $payment_id ) {
64
-			$meta = get_post_meta( $payment_id , '_yikes_easy_mc_optin' , true );
65
-			if( $meta == '0' ) {
64
+			$meta = get_post_meta( $payment_id, '_yikes_easy_mc_optin', true );
65
+			if ( $meta == '0' ) {
66 66
 				return false;
67 67
 			}
68 68
 			$email = (string) edd_get_payment_user_email( $payment_id );
69 69
 			$merge_vars = array();
70 70
 			// add first and last name to merge vars, if given
71 71
 			$user_info = (array) edd_get_payment_meta_user_info( $payment_id );
72
-			if( isset( $user_info['first_name'] ) && isset( $user_info['last_name'] ) ) {
73
-				$merge_vars['NAME'] = $user_info['first_name'] . ' ' . $user_info['last_name'];
72
+			if ( isset( $user_info[ 'first_name' ] ) && isset( $user_info[ 'last_name' ] ) ) {
73
+				$merge_vars[ 'NAME' ] = $user_info[ 'first_name' ] . ' ' . $user_info[ 'last_name' ];
74 74
 			}
75
-			if( isset( $user_info['first_name'] ) ) {
76
-				$merge_vars['FNAME'] = $user_info['first_name'];
75
+			if ( isset( $user_info[ 'first_name' ] ) ) {
76
+				$merge_vars[ 'FNAME' ] = $user_info[ 'first_name' ];
77 77
 			}
78
-			if( isset( $user_info['last_name'] ) ) {
79
-				$merge_vars['LNAME'] = $user_info['last_name'];
78
+			if ( isset( $user_info[ 'last_name' ] ) ) {
79
+				$merge_vars[ 'LNAME' ] = $user_info[ 'last_name' ];
80 80
 			}
81 81
 			// subscribe the user
82
-			$this->subscribe_user_integration( sanitize_email( $email ) , $this->type , $merge_vars );
82
+			$this->subscribe_user_integration( sanitize_email( $email ), $this->type, $merge_vars );
83 83
 		}
84 84
 	
85 85
 	}
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
 		
28 28
 		
29 29
 		/**
30
-		* Outputs a checkbox
31
-		*/
30
+		 * Outputs a checkbox
31
+		 */
32 32
 		public function output_checkbox() {
33 33
 			if ( $this->is_user_already_subscribed( $this->type ) ) {
34 34
 				return;
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/debug-settings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 	- php version, wp version, plugin version and debug log
5 5
 -->
6 6
 
7
-<h3><span><?php _e( 'Debug Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7
+<h3><span><?php _e( 'Debug Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
8 8
 
9 9
 <div class="inside">
10 10
 	
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
 	
14 14
 		<?php settings_fields( 'yikes_inc_easy_mc_debug_settings_page' ); ?>
15 15
 	
16
-		<label for="yikes-mailchimp-debug-status"><strong><?php _e( 'Enable Debugging' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
17
-			<input type="checkbox" name="yikes-mailchimp-debug-status" id="yikes-mailchimp-debug-status" value="1" <?php checked( get_option( 'yikes-mailchimp-debug-status' , '' ) , '1' ); ?>>
16
+		<label for="yikes-mailchimp-debug-status"><strong><?php _e( 'Enable Debugging', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
17
+			<input type="checkbox" name="yikes-mailchimp-debug-status" id="yikes-mailchimp-debug-status" value="1" <?php checked( get_option( 'yikes-mailchimp-debug-status', '' ), '1' ); ?>>
18 18
 		</label>
19
-		<p class="description"><?php _e( "If you encounter an issue with Easy Forms for MailChimp you can toggle on debugging to display advanced error messages and start logging errors." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
19
+		<p class="description"><?php _e( "If you encounter an issue with Easy Forms for MailChimp you can toggle on debugging to display advanced error messages and start logging errors.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20 20
 		
21 21
 		<?php submit_button(); ?>
22 22
 									
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 				)
36 36
 			);
37 37
 		?>
38
-		<h2><?php _e( "Debug Log" , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="<?php echo $url; ?>" class="button-secondary"><?php _e( 'Clear Log', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h2>
38
+		<h2><?php _e( "Debug Log", 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="<?php echo $url; ?>" class="button-secondary"><?php _e( 'Clear Log', 'yikes-inc-easy-mailchimp-extender' ); ?></a></h2>
39 39
 		
40 40
 		<table class="widefat" id="yikes-mailchimp-error-log">
41 41
 			<!-- table header -->
Please login to merge, or discard this patch.
admin/partials/helpers/init.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
 	class Yikes_Inc_Easy_Mailchimp_Extender_Helper {
8 8
 	
9 9
 			/**
10
-			*	Helper functions to help out with extensions (still fleshing out)
11
-			*	@since 6.0
12
-			*	@ Parameters (array of data)
13
-			*		-	Section ID - id of the section, should be a slug style text ie: 'custom-section'
14
-			*		-	Link Text - Visible text for this link ie: 'Custom Section'
15
-			*		-	Dashicon - class of the icon you would like to use for this link
16
-			**/
10
+			 *	Helper functions to help out with extensions (still fleshing out)
11
+			 *	@since 6.0
12
+			 *	@ Parameters (array of data)
13
+			 *		-	Section ID - id of the section, should be a slug style text ie: 'custom-section'
14
+			 *		-	Link Text - Visible text for this link ie: 'Custom Section'
15
+			 *		-	Dashicon - class of the icon you would like to use for this link
16
+			 **/
17 17
 			public static function add_edit_form_section_link( $link_array=array() ) {
18 18
 				if( !empty( $link_array ) ) {
19 19
 					$link_data = wp_parse_args( array() , $link_array );
@@ -36,17 +36,17 @@  discard block
 block discarded – undo
36 36
 			}
37 37
 			
38 38
 			/**
39
-			*	Helper functions to help out with extensions (still fleshing out)
40
-			*	@since 6.0
41
-			*	@ Parameters:
42
-			*		-	Section ID - id of the section, should be a slug style text ie: 'custom-section'
43
-			*		-	Class - class file to call function from?
44
-			*		-	Main Callback - call back for main section
45
-			*		-	Main Section Title - main section title
46
-			*		-	Sidebar Callback - callback for the sidebar section
47
-			*		-	Sidebar Title - title of the sidebar section
48
-			*		-	Class - class to reference funtions out of (optiona, if left blank functions should be defined in functions.php (or outside of a class))
49
-			**/
39
+			 *	Helper functions to help out with extensions (still fleshing out)
40
+			 *	@since 6.0
41
+			 *	@ Parameters:
42
+			 *		-	Section ID - id of the section, should be a slug style text ie: 'custom-section'
43
+			 *		-	Class - class file to call function from?
44
+			 *		-	Main Callback - call back for main section
45
+			 *		-	Main Section Title - main section title
46
+			 *		-	Sidebar Callback - callback for the sidebar section
47
+			 *		-	Sidebar Title - title of the sidebar section
48
+			 *		-	Class - class to reference funtions out of (optiona, if left blank functions should be defined in functions.php (or outside of a class))
49
+			 **/
50 50
 			public static function add_edit_form_section( $section_array=array() ) {
51 51
 				if( !empty( $section_array ) ) {
52 52
 					$section_data = wp_parse_args( array() , $section_array );
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 			}
60 60
 			
61 61
 			/**
62
-			*	Check if the custom section is single or two columns (with sidebar)
63
-			*	@since 6.0
64
-			*	@Parameters:
65
-			*		-	Section Data - the array of data associated with the custom field you've set up
66
-			*/
62
+			 *	Check if the custom section is single or two columns (with sidebar)
63
+			 *	@since 6.0
64
+			 *	@Parameters:
65
+			 *		-	Section Data - the array of data associated with the custom field you've set up
66
+			 */
67 67
 			public static function is_custom_section_two_column( $custom_section_data ) {
68 68
 				// print_r( $custom_section_data );
69 69
 				$value = ( isset( $custom_section_data['sidebar_title'] ) && isset( $custom_section_data['sidebar_fields'] ) && !empty( $custom_section_data['sidebar_fields'] ) ) ?  true : false;
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -14,21 +14,21 @@  discard block
 block discarded – undo
14 14
 			*		-	Link Text - Visible text for this link ie: 'Custom Section'
15 15
 			*		-	Dashicon - class of the icon you would like to use for this link
16 16
 			**/
17
-			public static function add_edit_form_section_link( $link_array=array() ) {
18
-				if( !empty( $link_array ) ) {
19
-					$link_data = wp_parse_args( array() , $link_array );
20
-					if( !empty( $link_data['text'] ) && !empty( $link_data['id'] ) ) {
21
-						if( !empty( $link_data['icon'] ) ) {
22
-							if( !isset( $link_data['icon_family'] ) || $link_data['icon_family'] == 'dashicons' || $link_data['icon_family'] == 'dashicon' ) {
23
-								$icon =  '<span class="dashicons dashicons-' . esc_attr__( $link_data['icon'] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
17
+			public static function add_edit_form_section_link( $link_array = array() ) {
18
+				if ( ! empty( $link_array ) ) {
19
+					$link_data = wp_parse_args( array(), $link_array );
20
+					if ( ! empty( $link_data[ 'text' ] ) && ! empty( $link_data[ 'id' ] ) ) {
21
+						if ( ! empty( $link_data[ 'icon' ] ) ) {
22
+							if ( ! isset( $link_data[ 'icon_family' ] ) || $link_data[ 'icon_family' ] == 'dashicons' || $link_data[ 'icon_family' ] == 'dashicon' ) {
23
+								$icon = '<span class="dashicons dashicons-' . esc_attr__( $link_data[ 'icon' ] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
24 24
 							} else {
25
-								$icon =  '<span class="' . esc_attr__( $link_data['icon'] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
25
+								$icon = '<span class="' . esc_attr__( $link_data[ 'icon' ] ) . ' yikes-easy-mailchimp-custom-content-icon"></span>';
26 26
 							}
27 27
 						} else {
28 28
 							$icon = '';
29 29
 						}
30 30
 						$link = '<li class="hidden_setting_list">';
31
-							$link .= '<a class="hidden_setting ' . esc_attr__( $link_data['id'] ) . '" data-attr-container="' . esc_attr__( $link_data['id'] ) . '" onclick="return false;" title="' . esc_attr__( $link_data['text'] ) . '" href="#">' . $icon . esc_attr__( $link_data['text'] ) . '</a>';
31
+							$link .= '<a class="hidden_setting ' . esc_attr__( $link_data[ 'id' ] ) . '" data-attr-container="' . esc_attr__( $link_data[ 'id' ] ) . '" onclick="return false;" title="' . esc_attr__( $link_data[ 'text' ] ) . '" href="#">' . $icon . esc_attr__( $link_data[ 'text' ] ) . '</a>';
32 32
 						$link .= '</li>';
33 33
 						echo $link;
34 34
 					}
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 			*		-	Sidebar Title - title of the sidebar section
48 48
 			*		-	Class - class to reference funtions out of (optiona, if left blank functions should be defined in functions.php (or outside of a class))
49 49
 			**/
50
-			public static function add_edit_form_section( $section_array=array() ) {
51
-				if( !empty( $section_array ) ) {
52
-					$section_data = wp_parse_args( array() , $section_array );
50
+			public static function add_edit_form_section( $section_array = array() ) {
51
+				if ( ! empty( $section_array ) ) {
52
+					$section_data = wp_parse_args( array(), $section_array );
53 53
 					ob_start();
54 54
 					include ( YIKES_MC_PATH . 'admin/partials/helpers/edit-form-hidden-section-template.php' );
55 55
 					$section = ob_get_contents();
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 			*/
67 67
 			public static function is_custom_section_two_column( $custom_section_data ) {
68 68
 				// print_r( $custom_section_data );
69
-				$value = ( isset( $custom_section_data['sidebar_title'] ) && isset( $custom_section_data['sidebar_fields'] ) && !empty( $custom_section_data['sidebar_fields'] ) ) ?  true : false;
69
+				$value = ( isset( $custom_section_data[ 'sidebar_title' ] ) && isset( $custom_section_data[ 'sidebar_fields' ] ) && ! empty( $custom_section_data[ 'sidebar_fields' ] ) ) ?  true : false;
70 70
 				return $value;
71 71
 			}
72 72
 			
Please login to merge, or discard this patch.
admin/partials/helpers/edit-form-hidden-section-template.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -8,28 +8,28 @@  discard block
 block discarded – undo
8 8
 		// grab our global form_data;
9 9
 		global $form_data;
10 10
 	?>
11
-	<label class="hidden-setting-label yikes-easy-mc-hidden" for="form" id=<?php esc_attr_e( $section_data['id'] ); ?>>
11
+	<label class="hidden-setting-label yikes-easy-mc-hidden" for="form" id=<?php esc_attr_e( $section_data[ 'id' ] ); ?>>
12 12
 		<div id="poststuff">
13
-			<div id="post-body" class="metabox-holder <?php if( self::is_custom_section_two_column( $section_data ) ) { ?> columns-2 <?php } else { ?> columns-1 <?php } ?>">
13
+			<div id="post-body" class="metabox-holder <?php if ( self::is_custom_section_two_column( $section_data ) ) { ?> columns-2 <?php } else { ?> columns-1 <?php } ?>">
14 14
 				<div id="post-body-content">
15 15
 					<div class="meta-box-sortables ui-sortable">
16 16
 						<div class="postbox yikes-easy-mc-postbox">
17
-							<h3 class="edit-form-title"><span><?php echo $section_data['main_title']; ?></span></h3>
18
-								<div class="inside <?php esc_attr_e( $section_data['id'] ); ?>-container">
17
+							<h3 class="edit-form-title"><span><?php echo $section_data[ 'main_title' ]; ?></span></h3>
18
+								<div class="inside <?php esc_attr_e( $section_data[ 'id' ] ); ?>-container">
19 19
 									<?php 
20
-										if( isset( $section_data['main_description'] ) && $section_data['main_description'] != '' ) {
20
+										if ( isset( $section_data[ 'main_description' ] ) && $section_data[ 'main_description' ] != '' ) {
21 21
 											?>
22
-												<p><?php echo $section_data['main_description']; ?></p>
22
+												<p><?php echo $section_data[ 'main_description' ]; ?></p>
23 23
 											<?php
24 24
 										}
25
-										$main_field_data = $section_data['main_fields'];
26
-										foreach( $main_field_data as $field ) { 
27
-											if( $field['type'] == 'custom' ) {
25
+										$main_field_data = $section_data[ 'main_fields' ];
26
+										foreach ( $main_field_data as $field ) { 
27
+											if ( $field[ 'type' ] == 'custom' ) {
28 28
 												// execute the custom callback
29
-												$field['callback']();
29
+												$field[ 'callback' ]();
30 30
 											} else {
31 31
 												// include our field files
32
-												include( YIKES_MC_PATH . 'admin/partials/helpers/fields/yikes-mailchimp-' . $field['type'] . '-field.php' );
32
+												include( YIKES_MC_PATH . 'admin/partials/helpers/fields/yikes-mailchimp-' . $field[ 'type' ] . '-field.php' );
33 33
 											}
34 34
 										}
35 35
 									?>
@@ -39,27 +39,27 @@  discard block
 block discarded – undo
39 39
 					</div>
40 40
 					
41 41
 					<!-- check for single/double box -->
42
-					<?php if( self::is_custom_section_two_column( $section_data ) ) { ?>
42
+					<?php if ( self::is_custom_section_two_column( $section_data ) ) { ?>
43 43
 						<!-- begin sidebar -->
44 44
 						<div id="postbox-container-1" class="postbox-container">
45 45
 							<div class="meta-box-sortables">
46 46
 								<div class="postbox yikes-easy-mc-postbox">
47
-									<h3 class="edit-form-title"><span><?php echo $section_data['sidebar_title']; ?></span></h3>
48
-									<div class="inside <?php esc_attr_e( $section_data['id'] ); ?>-sidebar-container"> 
47
+									<h3 class="edit-form-title"><span><?php echo $section_data[ 'sidebar_title' ]; ?></span></h3>
48
+									<div class="inside <?php esc_attr_e( $section_data[ 'id' ] ); ?>-sidebar-container"> 
49 49
 										<?php
50
-											if( isset( $section_data['sidebar_description'] ) && $section_data['sidebar_description'] != '' ) {
50
+											if ( isset( $section_data[ 'sidebar_description' ] ) && $section_data[ 'sidebar_description' ] != '' ) {
51 51
 												?>
52
-													<p><?php echo $section_data['sidebar_description']; ?></p>
52
+													<p><?php echo $section_data[ 'sidebar_description' ]; ?></p>
53 53
 												<?php
54 54
 											}
55
-											$sidebar_field_data = $section_data['sidebar_fields'];
56
-											foreach( $sidebar_field_data as $field ) { 
57
-												if( $field['type'] == 'custom' ) {
55
+											$sidebar_field_data = $section_data[ 'sidebar_fields' ];
56
+											foreach ( $sidebar_field_data as $field ) { 
57
+												if ( $field[ 'type' ] == 'custom' ) {
58 58
 													// execute the custom callback
59
-													$field['callback']();
59
+													$field[ 'callback' ]();
60 60
 												} else {
61 61
 													// include our field files
62
-													include( YIKES_MC_PATH . 'admin/partials/helpers/fields/yikes-mailchimp-' . $field['type'] . '-field.php' );
62
+													include( YIKES_MC_PATH . 'admin/partials/helpers/fields/yikes-mailchimp-' . $field[ 'type' ] . '-field.php' );
63 63
 												}
64 64
 											}
65 65
 										?>
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 											<?php
24 24
 										}
25 25
 										$main_field_data = $section_data['main_fields'];
26
-										foreach( $main_field_data as $field ) { 
26
+										foreach( $main_field_data as $field ) {
27 27
 											if( $field['type'] == 'custom' ) {
28 28
 												// execute the custom callback
29 29
 												$field['callback']();
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 												<?php
54 54
 											}
55 55
 											$sidebar_field_data = $section_data['sidebar_fields'];
56
-											foreach( $sidebar_field_data as $field ) { 
56
+											foreach( $sidebar_field_data as $field ) {
57 57
 												if( $field['type'] == 'custom' ) {
58 58
 													// execute the custom callback
59 59
 													$field['callback']();
Please login to merge, or discard this patch.
admin/partials/upgrade-helpers/upgrade-migrate-options.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,9 +112,11 @@
 block discarded – undo
112 112
 												
113 113
 												// update 'date_format' on 'birthday' and 'date' fields
114 114
 												if( isset( $mailchimp_form['fields'][$new_parent_key]['type'] ) && in_array( $mailchimp_form['fields'][$new_parent_key]['type'], array( 'date', 'birthday' ) ) ) {
115
-													if( $mailchimp_form['fields'][$new_parent_key]['type'] == 'date' ) { // date
115
+													if( $mailchimp_form['fields'][$new_parent_key]['type'] == 'date' ) {
116
+// date
116 117
 														$mailchimp_form['fields'][$new_parent_key]['date_format'] = 'MM/DD'; // mailchimp default (can be altered)
117
-													} else { // birthday 
118
+													} else {
119
+// birthday 
118 120
 														$mailchimp_form['fields'][$new_parent_key]['date_format'] = 'MM/DD/YYYY'; // mailchimp default (can be altered)
119 121
 													}
120 122
 												}
Please login to merge, or discard this patch.
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -9,33 +9,33 @@  discard block
 block discarded – undo
9 9
 	*/
10 10
 		
11 11
 	// enqueue the styles for our migration page..
12
-	wp_enqueue_style( 'yikes_mc_migrate_option_styles' , YIKES_MC_URL . 'admin/css/yikes-inc-easy-mailchimp-migrate-option-styles.css' );
13
-	wp_enqueue_style( 'animate-css' , YIKES_MC_URL . 'admin/css/animate.min.css' );
12
+	wp_enqueue_style( 'yikes_mc_migrate_option_styles', YIKES_MC_URL . 'admin/css/yikes-inc-easy-mailchimp-migrate-option-styles.css' );
13
+	wp_enqueue_style( 'animate-css', YIKES_MC_URL . 'admin/css/animate.min.css' );
14 14
 	
15 15
 	// store our old options
16 16
 	$old_plugin_options = get_option( 'ykseme_storage' );
17 17
 	
18 18
 	$global_error_messages = array(
19
-		'success' => __( $old_plugin_options['single-optin-message'] , 'yikes-inc-easy-mailchimp-extender' ),
20
-		'general-error' => __( "Whoops! It looks like something went wrong. Please try again." , 'yikes-inc-easy-mailchimp-extender' ),
21
-		'email-exists-error' => __( "The email you entered is already a subscriber to this list." , 'yikes-inc-easy-mailchimp-extender' ),
22
-		'success-single-optin' => __( 'Thank you for subscribing!' , 'yikes-inc-easy-mailchimp-extender' ),
19
+		'success' => __( $old_plugin_options[ 'single-optin-message' ], 'yikes-inc-easy-mailchimp-extender' ),
20
+		'general-error' => __( "Whoops! It looks like something went wrong. Please try again.", 'yikes-inc-easy-mailchimp-extender' ),
21
+		'email-exists-error' => __( "The email you entered is already a subscriber to this list.", 'yikes-inc-easy-mailchimp-extender' ),
22
+		'success-single-optin' => __( 'Thank you for subscribing!', 'yikes-inc-easy-mailchimp-extender' ),
23 23
 		'success-resubscribed' => __( 'Thank you for already being a subscriber! Your profile info has been updated.', 'yikes-inc-easy-mailchimp-extender' ),
24 24
 		'update-link' => __( "To update your MailChimp profile, please [link]click to send yourself an update link[/link].", 'yikes-inc-easy-mailchimp-extender' ),
25 25
 		'email-subject' => __( 'MailChimp Profile Update', 'yikes-inc-easy-mailchimp-extender' ),
26 26
 	);
27 27
 	
28 28
 	// if old options are defined...
29
-	if( $old_plugin_options ) {
29
+	if ( $old_plugin_options ) {
30 30
 		
31 31
 		// Verify the NONCE is valid
32
-		check_admin_referer( 'yikes-mc-migrate-options' , 'migrate_options_nonce' );
32
+		check_admin_referer( 'yikes-mc-migrate-options', 'migrate_options_nonce' );
33 33
 		
34 34
 		?>
35 35
 			
36 36
 		<div class="wrap" style="text-align:center;">
37
-			<h3><?php _e( 'Migrating old plugin options' , 'yikes-inc-easy-mailchimp-extender' ); ?><span class="upgrading-ellipse-one">.</span><span class="upgrading-ellipse-two">.</span><span class="upgrading-ellipse-three">.</h3>
38
-			<p><?php _e( 'please be patient while your options are updated and the process has completed' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
37
+			<h3><?php _e( 'Migrating old plugin options', 'yikes-inc-easy-mailchimp-extender' ); ?><span class="upgrading-ellipse-one">.</span><span class="upgrading-ellipse-two">.</span><span class="upgrading-ellipse-three">.</h3>
38
+			<p><?php _e( 'please be patient while your options are updated and the process has completed', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
39 39
 			<!-- empty list, populate when options  get updated -->
40 40
 			<ul id="options-updated" class="yikes-easy-mc-hidden">
41 41
 				<hr />
@@ -49,82 +49,82 @@  discard block
 block discarded – undo
49 49
 				
50 50
 					// loop over our old options, and store them in a new option value
51 51
 					$do_not_migrate_options = array(
52
-						'ssl_verify_peer', 'api_validation' , 'widget_yikes_mc_widget' , 'flavor' , 'single-optin-message' , 'double-optin-message' ,
53
-						'mailchimp-optIn-default-list' , 'version' , 'yks-mailchimp-jquery-datepicker' , 'ssl_verify_peer' , 'optIn-checkbox' , 'yks-mailchimp-optin-checkbox-text',
54
-						'yks-mailchimp-required-text' , 'optin'
52
+						'ssl_verify_peer', 'api_validation', 'widget_yikes_mc_widget', 'flavor', 'single-optin-message', 'double-optin-message',
53
+						'mailchimp-optIn-default-list', 'version', 'yks-mailchimp-jquery-datepicker', 'ssl_verify_peer', 'optIn-checkbox', 'yks-mailchimp-optin-checkbox-text',
54
+						'yks-mailchimp-required-text', 'optin'
55 55
 					);
56 56
 							
57
-					foreach( $old_plugin_options as $option_name => $option_value ) {
57
+					foreach ( $old_plugin_options as $option_name => $option_value ) {
58 58
 												
59
-						if( ! in_array( $option_name , $do_not_migrate_options ) ) {
59
+						if ( ! in_array( $option_name, $do_not_migrate_options ) ) {
60 60
 							// ajax request to update our options one by one..
61 61
 							// if its an array, we need to json encode it
62
-							if( is_array( $option_value ) ) {
62
+							if ( is_array( $option_value ) ) {
63 63
 								
64
-								if( $option_name == 'lists' ) {
64
+								if ( $option_name == 'lists' ) {
65 65
 																	
66
-									if( ! empty( $option_value ) ) {
66
+									if ( ! empty( $option_value ) ) {
67 67
 										$settings = 1;
68 68
 										$form_length = count( $option_value );
69
-										foreach( $option_value as $mailchimp_form ) {
69
+										foreach ( $option_value as $mailchimp_form ) {
70 70
 											// update and pass our placeholder value
71 71
 											reset( $mailchimp_form );
72
-											$form_id = $mailchimp_form['id'];
72
+											$form_id = $mailchimp_form[ 'id' ];
73 73
 											
74
-											$fields = $mailchimp_form['fields'];	
74
+											$fields = $mailchimp_form[ 'fields' ];	
75 75
 											reset( $fields );
76 76
 											$first_field_key = key( $fields );
77 77
 											$array_keys = array_keys( $fields );
78 78
 											
79 79
 											$x = 1;								
80 80
 					
81
-											foreach( $array_keys as $parent_key ) {
81
+											foreach ( $array_keys as $parent_key ) {
82 82
 												
83 83
 												// alter the field keys so they show up after an import
84 84
 												$split_parent_key = explode( '-', $parent_key );
85 85
 
86
-												$new_parent_key = ( isset( $split_parent_key[1] ) ) ? strtoupper( $split_parent_key[1] ) : $parent_key;
86
+												$new_parent_key = ( isset( $split_parent_key[ 1 ] ) ) ? strtoupper( $split_parent_key[ 1 ] ) : $parent_key;
87 87
 
88
-												$mailchimp_form['fields'][$new_parent_key] = $mailchimp_form['fields'][$parent_key];
88
+												$mailchimp_form[ 'fields' ][ $new_parent_key ] = $mailchimp_form[ 'fields' ][ $parent_key ];
89 89
 
90
-												unset( $mailchimp_form['fields'][$parent_key] );			
90
+												unset( $mailchimp_form[ 'fields' ][ $parent_key ] );			
91 91
 										
92 92
 												// update our placeholder key to be 'placeholder'
93
-												$mailchimp_form['fields'][$new_parent_key]['placeholder'] = isset( $mailchimp_form['fields'][$new_parent_key]['placeholder-'.$form_id.'-'.$x] ) ? $mailchimp_form['fields'][$new_parent_key]['placeholder-'.$form_id.'-'.$x] : '';
93
+												$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'placeholder' ] = isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'placeholder-' . $form_id . '-' . $x ] ) ? $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'placeholder-' . $form_id . '-' . $x ] : '';
94 94
 												// update field classes
95
-												$mailchimp_form['fields'][$new_parent_key]['additional-classes'] = isset( $mailchimp_form['fields'][$new_parent_key]['custom-field-class-'.$form_id.'-'.$x] ) ? $mailchimp_form['fields'][$new_parent_key]['custom-field-class-'.$form_id.'-'.$x] : '';
95
+												$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'additional-classes' ] = isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'custom-field-class-' . $form_id . '-' . $x ] ) ? $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'custom-field-class-' . $form_id . '-' . $x ] : '';
96 96
 												// update help field - populate description
97
-												$mailchimp_form['fields'][$new_parent_key]['description'] = isset( $mailchimp_form['fields'][$new_parent_key]['help'] ) ? $mailchimp_form['fields'][$new_parent_key]['help'] : ''; 
97
+												$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'description' ] = isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'help' ] ) ? $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'help' ] : ''; 
98 98
 												// remove the old placeholder structure
99
-												unset( $mailchimp_form['fields'][$new_parent_key]['placeholder-'.$form_id.'-'.$x] );
99
+												unset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'placeholder-' . $form_id . '-' . $x ] );
100 100
 												// remove old custom class structure
101
-												unset( $mailchimp_form['fields'][$new_parent_key]['custom-field-class-'.$form_id.'-'.$x] );
101
+												unset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'custom-field-class-' . $form_id . '-' . $x ] );
102 102
 												// remove old help/description 
103
-												unset( $mailchimp_form['fields'][$new_parent_key]['help'] );
103
+												unset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'help' ] );
104 104
 																							
105 105
 												// check if choices is set, and encode them
106
-												if( isset( $mailchimp_form['fields'][$new_parent_key]['choices'] ) && ! empty( $mailchimp_form['fields'][$new_parent_key]['choices'] ) ) {
107
-													$mailchimp_form['fields'][$new_parent_key]['choices'] = addslashes( addslashes( json_encode( $mailchimp_form['fields'][$new_parent_key]['choices'] ) ) );
106
+												if ( isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'choices' ] ) && ! empty( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'choices' ] ) ) {
107
+													$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'choices' ] = addslashes( addslashes( json_encode( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'choices' ] ) ) );
108 108
 												}	
109 109
 
110 110
 												// update 'default' to 'default-choice' for radio/dropdown
111
-												if( isset( $mailchimp_form['fields'][$new_parent_key]['type'] ) && in_array( $mailchimp_form['fields'][$new_parent_key]['type'], array( 'radio', 'dropdown' ) ) ) {
112
-													$mailchimp_form['fields'][$new_parent_key]['default_choice'] = $mailchimp_form['fields'][$new_parent_key]['default'];
113
-													unset( $mailchimp_form['fields'][$new_parent_key]['default'] );
111
+												if ( isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ] ) && in_array( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ], array( 'radio', 'dropdown' ) ) ) {
112
+													$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'default_choice' ] = $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'default' ];
113
+													unset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'default' ] );
114 114
 												}
115 115
 												
116 116
 												// update 'date_format' on 'birthday' and 'date' fields
117
-												if( isset( $mailchimp_form['fields'][$new_parent_key]['type'] ) && in_array( $mailchimp_form['fields'][$new_parent_key]['type'], array( 'date', 'birthday' ) ) ) {
118
-													if( $mailchimp_form['fields'][$new_parent_key]['type'] == 'date' ) { // date
119
-														$mailchimp_form['fields'][$new_parent_key]['date_format'] = 'MM/DD'; // mailchimp default (can be altered)
117
+												if ( isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ] ) && in_array( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ], array( 'date', 'birthday' ) ) ) {
118
+													if ( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ] == 'date' ) { // date
119
+														$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'date_format' ] = 'MM/DD'; // mailchimp default (can be altered)
120 120
 													} else { // birthday 
121
-														$mailchimp_form['fields'][$new_parent_key]['date_format'] = 'MM/DD/YYYY'; // mailchimp default (can be altered)
121
+														$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'date_format' ] = 'MM/DD/YYYY'; // mailchimp default (can be altered)
122 122
 													}
123 123
 												}
124 124
 												
125 125
 												// update 'phone_format' on 'phone'
126
-												if( isset( $mailchimp_form['fields'][$new_parent_key]['type'] ) && in_array( $mailchimp_form['fields'][$new_parent_key]['type'], array( 'phone' ) ) ) {
127
-													$mailchimp_form['fields'][$new_parent_key]['phone_format'] = 'phone_format '; // phone format
126
+												if ( isset( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ] ) && in_array( $mailchimp_form[ 'fields' ][ $new_parent_key ][ 'type' ], array( 'phone' ) ) ) {
127
+													$mailchimp_form[ 'fields' ][ $new_parent_key ][ 'phone_format' ] = 'phone_format '; // phone format
128 128
 												}
129 129
 												
130 130
 												$x++;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 																								
142 142
 												$.post( ajaxurl, mc_data, function(response) {
143 143
 													jQuery( '#options-updated' ).show();
144
-													jQuery( '#options-updated' ).append( '<li class="animated fadeInDown"><?php echo '<strong>'; ?>' + response.form_name + '<?php echo '</strong> ' . __( "successfully imported." , 'yikes-inc-easy-mailchimp-extender' ); ?></li>' );	
144
+													jQuery( '#options-updated' ).append( '<li class="animated fadeInDown"><?php echo '<strong>'; ?>' + response.form_name + '<?php echo '</strong> ' . __( "successfully imported.", 'yikes-inc-easy-mailchimp-extender' ); ?></li>' );	
145 145
 													if( response.completed_import ) {
146 146
 														setTimeout( function() {
147 147
 															// finished with the loop...lets let the user know....and then redirect them....
@@ -150,13 +150,13 @@  discard block
 block discarded – undo
150 150
 															jQuery( '.upgrading-ellipse-two' ).remove();
151 151
 															jQuery( '.upgrading-ellipse-three' ).remove();
152 152
 															jQuery( '.wrap' ).find( 'h3' ).next().fadeOut();
153
-															jQuery( '#options-updated' ).append( '<li class="animated fadeInDown migration-complete-notification"><em><?php _e( "Migration Complete. Please wait..." , 'yikes-inc-easy-mailchimp-extender' ); ?> </em> <img src="<?php echo esc_url_raw( admin_url( "images/wpspin_light.gif" ) ); ?>" /></li>' );
153
+															jQuery( '#options-updated' ).append( '<li class="animated fadeInDown migration-complete-notification"><em><?php _e( "Migration Complete. Please wait...", 'yikes-inc-easy-mailchimp-extender' ); ?> </em> <img src="<?php echo esc_url_raw( admin_url( "images/wpspin_light.gif" ) ); ?>" /></li>' );
154 154
 															// redirect our user to the main plugin page...
155 155
 															setTimeout( function() {
156 156
 																<?php 
157 157
 																	// migrate options that didnt make it (they were never stored in the 'ykseme_storage' options array)
158
-																	add_option( 'yikes-mc-api-validation' , get_option( 'api_validation' , 'invalid_api_key' ) );
159
-																	add_option( 'yikes-mc-error-messages' , $global_error_messages );
158
+																	add_option( 'yikes-mc-api-validation', get_option( 'api_validation', 'invalid_api_key' ) );
159
+																	add_option( 'yikes-mc-error-messages', $global_error_messages );
160 160
 																	// delete our old options after a successful migration (and some new ones that are no longer needed)
161 161
 																	delete_option( 'widget_yikes_mc_widget' );
162 162
 																	delete_option( 'api_validation' );
@@ -177,26 +177,26 @@  discard block
 block discarded – undo
177 177
 							}
178 178
 							/* Rename our ReCaptcha Options */
179 179
 								/* Public Site Key */
180
-								if( $option_name == 'recaptcha-api-key' ) {
180
+								if ( $option_name == 'recaptcha-api-key' ) {
181 181
 									$option_name = 'recaptcha-site-key';
182 182
 								}
183 183
 								/* Private Key */
184
-								if( $option_name == 'recaptcha-private-api-key'  ) {
184
+								if ( $option_name == 'recaptcha-private-api-key' ) {
185 185
 									$option_name = 'recaptcha-secret-key';
186 186
 								}
187 187
 								/* Change 'recaptcha-setting' to 'recaptcha-status' */
188 188
 								/* Status */
189
-								if( $option_name == 'recaptcha-setting' ) {
189
+								if ( $option_name == 'recaptcha-setting' ) {
190 190
 									$option_name = 'recaptcha-status';
191 191
 								}
192 192
 							/* End  re-name ReCaptcha options */
193 193
 							
194 194
 
195
-							if( is_array( $option_value ) ) {
195
+							if ( is_array( $option_value ) ) {
196 196
 								$option_value = json_encode( $option_value );
197 197
 							}
198 198
 							// do noit migrate the lists option, it's not useful to us
199
-							if( $option_name != 'lists' ) {
199
+							if ( $option_name != 'lists' ) {
200 200
 								?>
201 201
 									var data = {
202 202
 										'action': 'migrate_old_plugin_settings',
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 													
207 207
 									$.post( ajaxurl, data, function(response) {
208 208
 										jQuery( '#options-updated' ).show();
209
-										jQuery( '#options-updated' ).append( '<li class="animated fadeInDown"><?php echo '<strong>' . ucwords( str_replace( '_' , ' ' , str_replace( '-' , ' ' , $option_name ) ) ) . '</strong> ' . __( "successfully imported." , 'yikes-inc-easy-mailchimp-extender' ); ?></li>' );	
209
+										jQuery( '#options-updated' ).append( '<li class="animated fadeInDown"><?php echo '<strong>' . ucwords( str_replace( '_', ' ', str_replace( '-', ' ', $option_name ) ) ) . '</strong> ' . __( "successfully imported.", 'yikes-inc-easy-mailchimp-extender' ); ?></li>' );	
210 210
 									});
211 211
 								<?php
212 212
 								
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 					}, 2000 );
231 231
 			</script>
232 232
 		<?php
233
-			wp_die( '<strong>' . __( 'Old plugin options do not exist. Redirecting you...' , 'yikes-inc-easy-mailchimp-extender' ) . '</strong>' , 500 );
233
+			wp_die( '<strong>' . __( 'Old plugin options do not exist. Redirecting you...', 'yikes-inc-easy-mailchimp-extender' ) . '</strong>', 500 );
234 234
 		?>
235 235
 		</div>
236 236
 		<?php
Please login to merge, or discard this patch.
public/classes/checkbox-integrations/class.registration_form-checkbox.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 	}
25 25
 	
26 26
 	/**
27
-	* Outputs a checkbox
28
-	*/
27
+	 * Outputs a checkbox
28
+	 */
29 29
 	public function output_checkbox() {
30 30
 		echo $this->yikes_get_checkbox();
31 31
 	}
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 * @param int $user_id
37 37
 	 *
38 38
 	 * @return bool|string
39
-	*/
39
+	 */
40 40
 	public function subscribe_from_registration( $user_id ) {
41 41
 		// was sign-up checkbox checked?
42 42
 		if ( $this->was_checkbox_checked( $this->type ) === false ) {
Please login to merge, or discard this 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.
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.