Completed
Push — staging ( 112ef9...7a9dad )
by Evan
63:44 queued 43:40
created
admin/partials/menu/options-sections/recaptcha-settings.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@  discard block
 block discarded – undo
12 12
 
13 13
 ?>
14 14
 
15
-<h3><span><?php _e( 'reCAPTCHA Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
15
+<h3><span><?php _e( 'reCAPTCHA Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
16 16
 
17 17
 <div class="inside">
18 18
 	
19 19
 	<p>
20
-		<?php _e( 'reCAPTCHA is a free CAPTCHA service, from Google, that helps protect your site against spam, malicious registrations and other forms of attacks where computers try to disguise themselves as a human. reCAPTCHA will help prevent spammers and bots from submitting data through your MailChimp forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?>
20
+		<?php _e( 'reCAPTCHA is a free CAPTCHA service, from Google, that helps protect your site against spam, malicious registrations and other forms of attacks where computers try to disguise themselves as a human. reCAPTCHA will help prevent spammers and bots from submitting data through your MailChimp forms.', 'yikes-inc-easy-mailchimp-extender' ); ?>
21 21
 	</p>
22 22
 	
23 23
 	<p>
24
-		<?php echo '<a href="https://www.google.com/recaptcha/admin" target="_blank" title="' . __( 'Get your reCAPTCHA API Key' , 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Get Your reCAPTCHA API Key' , 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; ?>
24
+		<?php echo '<a href="https://www.google.com/recaptcha/admin" target="_blank" title="' . __( 'Get your reCAPTCHA API Key', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'Get Your reCAPTCHA API Key', 'yikes-inc-easy-mailchimp-extender' ) . '</a>'; ?>
25 25
 	</p>
26 26
 	
27 27
 	<!-- Settings Form -->
@@ -29,21 +29,21 @@  discard block
 block discarded – undo
29 29
 		
30 30
 		<?php settings_fields( 'yikes_inc_easy_mc_recaptcha_settings_page' ); ?>
31 31
 		
32
-			<label for="yikes-mc-recaptcha-setting"><strong><?php _e( 'Enable reCAPTCHA Protection' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
33
-				<input type="checkbox" name="yikes-mc-recaptcha-status" class="recaptcha-setting-checkbox" value="1" <?php checked( get_option( 'yikes-mc-recaptcha-status' , '' ) , '1' ); ?>>
32
+			<label for="yikes-mc-recaptcha-setting"><strong><?php _e( 'Enable reCAPTCHA Protection', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
33
+				<input type="checkbox" name="yikes-mc-recaptcha-status" class="recaptcha-setting-checkbox" value="1" <?php checked( get_option( 'yikes-mc-recaptcha-status', '' ), '1' ); ?>>
34 34
 			</label>
35 35
 			
36
-			<label for="yikes-mc-recaptcha-api-key"><strong><?php _e( 'reCAPTCHA Site Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
37
-				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-site-key" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-site-key' , '' ) ); ?>">
36
+			<label for="yikes-mc-recaptcha-api-key"><strong><?php _e( 'reCAPTCHA Site Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
37
+				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-site-key" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-site-key', '' ) ); ?>">
38 38
 			</label>
39 39
 			
40
-			<label for="yikes-mc-recaptcha-private-api-key"><strong><?php _e( 'reCAPTCHA Secret Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
41
-				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-secret-key" id="" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-secret-key' , '' ) ); ?>">
40
+			<label for="yikes-mc-recaptcha-private-api-key"><strong><?php _e( 'reCAPTCHA Secret Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
41
+				<input type="text" class="widefat recaptcha-setting-checkbox" name="yikes-mc-recaptcha-secret-key" id="" value="<?php echo esc_attr( get_option( 'yikes-mc-recaptcha-secret-key', '' ) ); ?>">
42 42
 			</label>
43 43
 			
44
-			<a href="#" onclick="jQuery(this).next().slideToggle();return false;" class="recaptcha-preview-link"><?php _e( 'View reCAPTCHA Preview' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
44
+			<a href="#" onclick="jQuery(this).next().slideToggle();return false;" class="recaptcha-preview-link"><?php _e( 'View reCAPTCHA Preview', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
45 45
 				<span class="recaptcha-preview-container">
46
-					<img src="<?php echo YIKES_MC_URL . 'includes/images/recaptcha/recaptcha-demo.gif'; ?>" alt="<?php _e( 'reCAPTCHA Preview' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="recaptcha-demo-gif">
46
+					<img src="<?php echo YIKES_MC_URL . 'includes/images/recaptcha/recaptcha-demo.gif'; ?>" alt="<?php _e( 'reCAPTCHA Preview', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="recaptcha-demo-gif">
47 47
 				</span>
48 48
 			
49 49
 			
Please login to merge, or discard this patch.
partials/menu/options-sections/templates/integration-interest-groups.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 // print_r( $interest_groupings );
4 4
 
5
-$integration_options = get_option( 'optin-checkbox-init' , '' );	
5
+$integration_options = get_option( 'optin-checkbox-init', '' );	
6 6
 
7 7
 // print_r( $integration_options );
8 8
 
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 /*
12 12
 * Confirm the interest groups is an array and not empty or else bail
13 13
 */
14
-if( isset( $interest_groupings['error'] ) ) {
15
-	echo '<p class="description no-interest-groupings-enabled-message">' . $interest_groupings['error'] . '</p>';
14
+if ( isset( $interest_groupings[ 'error' ] ) ) {
15
+	echo '<p class="description no-interest-groupings-enabled-message">' . $interest_groupings[ 'error' ] . '</p>';
16 16
 	return;
17 17
 }
18 18
 
@@ -25,30 +25,30 @@  discard block
 block discarded – undo
25 25
 /*
26 26
 *	Loop over interest groups
27 27
 */
28
-foreach( $interest_groupings as $interest_group ) {
28
+foreach ( $interest_groupings as $interest_group ) {
29 29
 	
30
-	$interest_group_id = $interest_group['id'];
31
-	$interest_group_type = ( isset( $interest_group['form_field'] ) ) ? $interest_group['form_field'] : '';
32
-	$interest_groups_fields = ( isset( $interest_group['groups'] ) ) ? $interest_group['groups'] : false; // if not set return false
33
-	$selected_interest_groups = ( isset( $integration_options[$integration_type]['interest-groups'] ) ) ? $integration_options[$integration_type]['interest-groups'] : array();
30
+	$interest_group_id = $interest_group[ 'id' ];
31
+	$interest_group_type = ( isset( $interest_group[ 'form_field' ] ) ) ? $interest_group[ 'form_field' ] : '';
32
+	$interest_groups_fields = ( isset( $interest_group[ 'groups' ] ) ) ? $interest_group[ 'groups' ] : false; // if not set return false
33
+	$selected_interest_groups = ( isset( $integration_options[ $integration_type ][ 'interest-groups' ] ) ) ? $integration_options[ $integration_type ][ 'interest-groups' ] : array();
34 34
 	?>
35 35
 	<section class="interest-group-section">
36
-		<strong class="interest-group-section-title"><?php echo ucwords( $interest_group['name'] ); ?></strong>
36
+		<strong class="interest-group-section-title"><?php echo ucwords( $interest_group[ 'name' ] ); ?></strong>
37 37
 	<?php
38 38
 	/*
39 39
 	*	Loop over the interest group types, and return the appropriate type
40 40
 	*/	
41
-	switch( $interest_group_type ) {
41
+	switch ( $interest_group_type ) {
42 42
 	
43 43
 		default:
44 44
 		case 'hidden':
45 45
 		case 'checkboxes':
46
-			if( $interest_groups_fields ) {
47
-				foreach( $interest_groups_fields as $field ) {
46
+			if ( $interest_groups_fields ) {
47
+				foreach ( $interest_groups_fields as $field ) {
48 48
 				?>
49 49
 					<label>
50
-						<input type="checkbox" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field['name']; ?>" <?php if( isset( $selected_interest_groups[$interest_group_id] ) ) {  if( in_array( $field['name'], $selected_interest_groups[$interest_group_id] ) ) { ?> checked="checked" <?php } } ?>>
51
-						<?php echo $field['name']; ?>
50
+						<input type="checkbox" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field[ 'name' ]; ?>" <?php if ( isset( $selected_interest_groups[ $interest_group_id ] ) ) {  if ( in_array( $field[ 'name' ], $selected_interest_groups[ $interest_group_id ] ) ) { ?> checked="checked" <?php } } ?>>
51
+						<?php echo $field[ 'name' ]; ?>
52 52
 					</label>
53 53
 				<?php
54 54
 				}
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
 			break;
57 57
 			
58 58
 		case 'radio':
59
-			if( $interest_groups_fields ) {
59
+			if ( $interest_groups_fields ) {
60 60
 				$x = 1; //  used to decide which is pre-checked
61
-				foreach( $interest_groups_fields as $field ) {
61
+				foreach ( $interest_groups_fields as $field ) {
62 62
 				?>
63 63
 					<label>
64
-						<input type="radio" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field['name']; ?>" <?php if( isset( $selected_interest_groups[$interest_group_id] ) ) {  if( in_array( $field['name'], $selected_interest_groups[$interest_group_id] ) ) { ?> checked="checked" <?php } } elseif( $x == 1 ) { ?> checked="checked" <?php }?>>
65
-						<?php echo $field['name']; ?>
64
+						<input type="radio" name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]" value="<?php echo $field[ 'name' ]; ?>" <?php if ( isset( $selected_interest_groups[ $interest_group_id ] ) ) {  if ( in_array( $field[ 'name' ], $selected_interest_groups[ $interest_group_id ] ) ) { ?> checked="checked" <?php } } elseif ( $x == 1 ) { ?> checked="checked" <?php }?>>
65
+						<?php echo $field[ 'name' ]; ?>
66 66
 					</label>
67 67
 				<?php
68 68
 					$x++;
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
 			break;
72 72
 			
73 73
 		case 'dropdown':
74
-			if( $interest_groups_fields ) {
74
+			if ( $interest_groups_fields ) {
75 75
 				?><select name="optin-checkbox-init[<?php echo $integration_type; ?>][interest-groups][<?php echo $interest_group_id; ?>][]"><?php
76
-				foreach( $interest_groups_fields as $field ) {
76
+				foreach ( $interest_groups_fields as $field ) {
77 77
 				?>
78
-					<option  value="<?php echo $field['name']; ?>" <?php if( isset( $selected_interest_groups[$interest_group_id] ) ) {  if( in_array( $field['name'], $selected_interest_groups[$interest_group_id] ) ) { ?> selected="selected" <?php } } ?>>
79
-						<?php echo $field['name']; ?>
78
+					<option  value="<?php echo $field[ 'name' ]; ?>" <?php if ( isset( $selected_interest_groups[ $interest_group_id ] ) ) {  if ( in_array( $field[ 'name' ], $selected_interest_groups[ $interest_group_id ] ) ) { ?> selected="selected" <?php } } ?>>
79
+						<?php echo $field[ 'name' ]; ?>
80 80
 					</option>
81 81
 				<?php
82 82
 				}
Please login to merge, or discard this patch.
admin/partials/menu/support.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,17 +10,17 @@  discard block
 block discarded – undo
10 10
 
11 11
 	<div id="yikes-mailchimp-logo" class="support-page"></div>
12 12
 	
13
-	<h1><?php _e( 'Support' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
14
-	<strong><?php _e( "You've got questions? We have answers!" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
15
-	<?php if( get_option( 'yikes-easy-mc-active-addons' , array() ) == array() ) { ?>
16
-		<p><?php _e( 'Users of the free version of YIKES Inc. Easy Forms for MailChimp are limited to two methods of support. We respond to support requests for the free version of the plugin once a week.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
17
-		<p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support, <a href="%s" target="_blank" title="' . __( 'check them out', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'check them out', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!' , 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p>
13
+	<h1><?php _e( 'Support', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
14
+	<strong><?php _e( "You've got questions? We have answers!", 'yikes-inc-easy-mailchimp-extender' ); ?></strong>
15
+	<?php if ( get_option( 'yikes-easy-mc-active-addons', array() ) == array() ) { ?>
16
+		<p><?php _e( 'Users of the free version of YIKES Inc. Easy Forms for MailChimp are limited to two methods of support. We respond to support requests for the free version of the plugin once a week.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
17
+		<p><?php printf( __( 'Purchasers of our paid add-ons qualify for premium support, <a href="%s" target="_blank" title="' . __( 'check them out', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'check them out', 'yikes-inc-easy-mailchimp-extender' ) . '</a>!', 'yikes-inc-easy-mailchimp-extender' ), esc_url( 'https://yikesplugins.com/' ) ); ?></p>
18 18
 	<?php } else { ?>
19
-		<p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
-		<p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:[email protected]'>[email protected]</a> and a ticket will be created." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
19
+		<p><?php _e( "It looks like you are one of our premium users! Fill out the form below to submit a priority support request.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
20
+		<p><?php _e( "If you have any problems with the form, send an email to <a href='mailto:[email protected]'>[email protected]</a> and a ticket will be created.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
21 21
 	<?php } ?>
22 22
 
23
-		<p><?php printf( __( 'Before submitting a support request, visit our %s.' , 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help.' ); ?></p>
23
+		<p><?php printf( __( 'Before submitting a support request, visit our %s.', 'yikes-inc-easy-mailchimp-extender' ), '<a target="_blank" href="' . esc_url( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) . '" title="' . __( 'Knowledge Base', 'yikes-inc-easy-mailchimp-extender' ) . '">' . __( 'knowledge base', 'yikes-inc-easy-mailchimp-extender' ) . '</a> where we have step-by-step guides and troubleshooting help.' ); ?></p>
24 24
 
25 25
 	<hr />
26 26
 	
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
 		<div id="col-right">
30 30
 
31 31
 			<div class="col-wrap">
32
-				<h1><span class="github-octocat"></span><?php _e( 'Github Issue Tracker' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
32
+				<h1><span class="github-octocat"></span><?php _e( 'Github Issue Tracker', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
33 33
 				<div class="inside">
34 34
 					<p><?php _e( 'The fastest way to receive free support is to submit a new issue to our GitHub issue tracker. ', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
35
-					<img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/github-issue-screenshot.png" title="<?php esc_attr_e( 'Github Issue Tracker Screenshot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" >
35
+					<img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/github-issue-screenshot.png" title="<?php esc_attr_e( 'Github Issue Tracker Screenshot', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
36 36
 					<a href="https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/issues" target="_blank" class="button-secondary support-page-button"><?php _e( 'Submit New github.org Issue', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
37 37
 				</div>
38 38
 			</div>
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
 		<div id="col-left">
45 45
 
46 46
 			<div class="col-wrap">
47
-				<h1><span class="dashicons dashicons-wordpress-alt support-page-wordpress-font"></span>&nbsp;<?php _e( 'WordPress.org Plugin Directory' , 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
47
+				<h1><span class="dashicons dashicons-wordpress-alt support-page-wordpress-font"></span>&nbsp;<?php _e( 'WordPress.org Plugin Directory', 'yikes-inc-easy-mailchimp-extender' ); ?></h1>
48 48
 				<div class="inside">
49 49
 					<p><?php _e( 'Use your WordPress.org username to submit support requests on the WordPress Directory support forum.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
50
-					<img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/wordpress-issue-screenshot.png" title="<?php esc_attr_e( 'WordPress.org Issue Tracker Screenshot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" >
50
+					<img class="support-page-logo" src="<?php echo YIKES_MC_URL; ?>includes/images/Support_Page/wordpress-issue-screenshot.png" title="<?php esc_attr_e( 'WordPress.org Issue Tracker Screenshot', 'yikes-inc-easy-mailchimp-extender' ); ?>" >
51 51
 					<a href="https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender" target="_blank" class="button-secondary support-page-button"><?php _e( 'Submit New WordPress.org Support Request', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
52 52
 				</div>
53 53
 			</div>
Please login to merge, or discard this patch.
admin/partials/helpers/init.php 1 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/fields/yikes-mailchimp-text-field.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
 	*	For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6 6
 	* 	@since 6.0
7 7
 	*/
8
-	$field_data = json_decode( $form_data['custom_fields'] , true ); 
8
+	$field_data = json_decode( $form_data[ 'custom_fields' ], true ); 
9 9
 ?>
10 10
 <label class="custom-field-section">
11
-	<strong><?php echo $field['label']; ?></strong>
12
-	<input type="text" class="widefat" name="custom-field[<?php echo $field['id']; ?>]" id="custom-field" value="<?php echo isset( $field_data[$field['id']] ) ? $field_data[$field['id']] : ''; ?>" placeholder="<?php echo isset( $field['placeholder'] ) ? $field['placeholder'] : ''; ?>">
13
-	<?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
14
-	<p class="description"><?php echo $field['description']; ?></p>
11
+	<strong><?php echo $field[ 'label' ]; ?></strong>
12
+	<input type="text" class="widefat" name="custom-field[<?php echo $field[ 'id' ]; ?>]" id="custom-field" value="<?php echo isset( $field_data[ $field[ 'id' ] ] ) ? $field_data[ $field[ 'id' ] ] : ''; ?>" placeholder="<?php echo isset( $field[ 'placeholder' ] ) ? $field[ 'placeholder' ] : ''; ?>">
13
+	<?php if ( isset( $field[ 'description' ] ) && $field[ 'description' ] != '' ) { ?>
14
+	<p class="description"><?php echo $field[ 'description' ]; ?></p>
15 15
 	<?php } ?>
16 16
 </label>
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
admin/partials/helpers/fields/yikes-mailchimp-select-field.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -5,21 +5,21 @@
 block discarded – undo
5 5
 	*	For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6 6
 	* 	@since 6.0
7 7
 	*/
8
-	$field_data = json_decode( $form_data['custom_fields'] , true ); 
8
+	$field_data = json_decode( $form_data[ 'custom_fields' ], true ); 
9 9
 ?>
10 10
 <div class="custom-field-section">
11 11
 	<!-- title -->
12
-	<strong><?php echo $field['label']; ?></strong>
12
+	<strong><?php echo $field[ 'label' ]; ?></strong>
13 13
 	
14 14
 	<!-- Dropdown -->
15
-	<select class="custom-select-field" name="custom-field[<?php echo $field['id']; ?>]">
16
-		<?php foreach( $field['options'] as $value => $label ) { ?>
17
-			<option value="<?php echo $value; ?>" <?php if( isset( $field_data[$field['id']] ) ) { selected( $field_data[$field['id']] , $value ); } ?>><?php echo $label; ?></option>
15
+	<select class="custom-select-field" name="custom-field[<?php echo $field[ 'id' ]; ?>]">
16
+		<?php foreach ( $field[ 'options' ] as $value => $label ) { ?>
17
+			<option value="<?php echo $value; ?>" <?php if ( isset( $field_data[ $field[ 'id' ] ] ) ) { selected( $field_data[ $field[ 'id' ] ], $value ); } ?>><?php echo $label; ?></option>
18 18
 		<?php } ?>
19 19
 	</select>
20 20
 	
21 21
 	<!-- description -->
22
-	<?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
23
-		<p class="description"><?php echo $field['description']; ?></p>
22
+	<?php if ( isset( $field[ 'description' ] ) && $field[ 'description' ] != '' ) { ?>
23
+		<p class="description"><?php echo $field[ 'description' ]; ?></p>
24 24
 	<?php } ?>
25 25
 </div>
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
admin/partials/helpers/fields/yikes-mailchimp-wysiwyg-field.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@
 block discarded – undo
6 6
 	*	For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
7 7
 	* 	@since 6.0
8 8
 	*/
9
-	$field_data = json_decode( $form_data['custom_fields'] , true ); 
10
-	$content = ( isset( $field_data[$field['id']] ) ) ? $field_data[$field['id']] : ( isset( $field['default'] ) ? $field['default'] : '' );
11
-	$wysiwyg_id = 'custom-field['.$field['id'].']';
9
+	$field_data = json_decode( $form_data[ 'custom_fields' ], true ); 
10
+	$content = ( isset( $field_data[ $field[ 'id' ] ] ) ) ? $field_data[ $field[ 'id' ] ] : ( isset( $field[ 'default' ] ) ? $field[ 'default' ] : '' );
11
+	$wysiwyg_id = 'custom-field[' . $field[ 'id' ] . ']';
12 12
 ?>
13 13
 
14 14
 <div class="yikes-mailchimp-wysiwyg-field">
15
-    <label for="image_url" class="widefat"><strong><?php echo $field['label']; ?></strong></label>
16
-    <?php wp_editor( $content, $field['id'], array( 'textarea_name' => $wysiwyg_id ) ); ?>
17
-    <p class="description"><?php echo $field['description']; ?></p>
15
+    <label for="image_url" class="widefat"><strong><?php echo $field[ 'label' ]; ?></strong></label>
16
+    <?php wp_editor( $content, $field[ 'id' ], array( 'textarea_name' => $wysiwyg_id ) ); ?>
17
+    <p class="description"><?php echo $field[ 'description' ]; ?></p>
18 18
 </div>
Please login to merge, or discard this patch.
admin/partials/helpers/fields/yikes-mailchimp-radio-field.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,22 +5,22 @@
 block discarded – undo
5 5
 	*	For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6 6
 	* 	@since 6.0
7 7
 	*/
8
-	$field_data = json_decode( $form_data['custom_fields'] , true ); 
8
+	$field_data = json_decode( $form_data[ 'custom_fields' ], true ); 
9 9
 ?>
10 10
 <div class="custom-field-section">
11 11
 	<!-- title -->
12
-	<strong><?php echo $field['label']; ?></strong>
12
+	<strong><?php echo $field[ 'label' ]; ?></strong>
13 13
 	<!-- radio buttons -->
14 14
 	<section class="custom-radio-holder">
15
-		<?php foreach( $field['options'] as $value => $label ) { ?>
15
+		<?php foreach ( $field[ 'options' ] as $value => $label ) { ?>
16 16
 			<label class="custom-radio-label">
17
-				<input type="radio" name="custom-field[<?php echo $field['id']; ?>][]" id="custom-field" value="<?php echo $value; ?>" <?php if( isset( $field_data[$field['id']] ) ) { checked( $field_data[$field['id']] , $value ); } ?>>
17
+				<input type="radio" name="custom-field[<?php echo $field[ 'id' ]; ?>][]" id="custom-field" value="<?php echo $value; ?>" <?php if ( isset( $field_data[ $field[ 'id' ] ] ) ) { checked( $field_data[ $field[ 'id' ] ], $value ); } ?>>
18 18
 				<?php echo $label; ?>
19 19
 			</label>
20 20
 		<?php } ?>
21 21
 	</section>
22 22
 	<!-- description -->
23
-	<?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
24
-		<p class="description"><?php echo $field['description']; ?></p>
23
+	<?php if ( isset( $field[ 'description' ] ) && $field[ 'description' ] != '' ) { ?>
24
+		<p class="description"><?php echo $field[ 'description' ]; ?></p>
25 25
 	<?php } ?>
26 26
 </div>
27 27
\ No newline at end of file
Please login to merge, or discard this patch.
admin/partials/helpers/fields/yikes-mailchimp-checkbox-field.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
 	*	For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/]
6 6
 	* 	@since 6.0
7 7
 	*/
8
-	$field_data = json_decode( $form_data['custom_fields'] , true ); 
8
+	$field_data = json_decode( $form_data[ 'custom_fields' ], true ); 
9 9
 ?>
10 10
 <label class="custom-field-section">
11
-	<strong><?php echo $field['label']; ?></strong>
12
-	<input type="checkbox" class="widefat" name="custom-field[<?php echo $field['id']; ?>]" id="custom-field" value="1" <?php checked( isset( $field_data[$field['id']] ) ? $field_data[$field['id']] : 0, 1, true ); ?>>
13
-	<?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
14
-	<p class="description"><?php echo $field['description']; ?></p>
11
+	<strong><?php echo $field[ 'label' ]; ?></strong>
12
+	<input type="checkbox" class="widefat" name="custom-field[<?php echo $field[ 'id' ]; ?>]" id="custom-field" value="1" <?php checked( isset( $field_data[ $field[ 'id' ] ] ) ? $field_data[ $field[ 'id' ] ] : 0, 1, true ); ?>>
13
+	<?php if ( isset( $field[ 'description' ] ) && $field[ 'description' ] != '' ) { ?>
14
+	<p class="description"><?php echo $field[ 'description' ]; ?></p>
15 15
 	<?php } ?>
16 16
 </label>
17 17
\ No newline at end of file
Please login to merge, or discard this patch.