Completed
Push — staging ( 69b5b7...e62b8b )
by Evan
06:26
created
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 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/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.
admin/partials/helpers/fields/yikes-mailchimp-file-field.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,33 +5,33 @@
 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
 	// This will enqueue the Media Uploader script
10 10
 	wp_enqueue_media();
11 11
 	// And let's not forget the script we wrote earlier
12 12
 	wp_enqueue_script( 'yikes-mailchimp-file-field-script', plugin_dir_url( __FILE__ ) . 'js/yikes-mc-file-upload.js', array( 'jquery' ), '1.0', false );
13 13
 	// print_r( $field_data );
14
-	wp_localize_script( 'yikes-mailchimp-file-field-script' , 'additional_data' , array(
14
+	wp_localize_script( 'yikes-mailchimp-file-field-script', 'additional_data', array(
15 15
 		'wp_includes_image_url' => includes_url() . 'images/media/'
16 16
 	) );
17 17
 	$i = 1;
18 18
 	// create an single item array when nothing is stored yet, loop for one field 
19
-	$field_data['incentive-attachment'] = ( isset( $field_data['incentive-attachment'] ) && !empty( $field_data['incentive-attachment'] ) )  ? $field_data['incentive-attachment'] : array( '' );
19
+	$field_data[ 'incentive-attachment' ] = ( isset( $field_data[ 'incentive-attachment' ] ) && ! empty( $field_data[ 'incentive-attachment' ] ) ) ? $field_data[ 'incentive-attachment' ] : array( '' );
20 20
 ?>
21 21
 	
22 22
 	<div class="yikes-mailchimp-file-field">
23
-		<label for="image_url" class="widefat"><strong><?php echo $field['label']; ?></strong></label>
24
-		<?php foreach( $field_data['incentive-attachment'] as $attachment ) { ?>
25
-			<input type="text" name="custom-field[<?php echo $field['id']; ?>][<?php echo $i; ?>]" id="custom-field[<?php echo $field['id']; ?>][<?php echo $i; ?>]" class="file-attachment" value="<?php echo isset( $field_data[$field['id']][$i] ) ? $field_data[$field['id']][$i] : ''; ?>">
26
-			<input type="button" name="upload-btn" id="upload-btn" class="button-secondary" data-attr-position="<?php echo $i; ?>" value="<?php _e( 'Upload File' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
23
+		<label for="image_url" class="widefat"><strong><?php echo $field[ 'label' ]; ?></strong></label>
24
+		<?php foreach ( $field_data[ 'incentive-attachment' ] as $attachment ) { ?>
25
+			<input type="text" name="custom-field[<?php echo $field[ 'id' ]; ?>][<?php echo $i; ?>]" id="custom-field[<?php echo $field[ 'id' ]; ?>][<?php echo $i; ?>]" class="file-attachment" value="<?php echo isset( $field_data[ $field[ 'id' ] ][ $i ] ) ? $field_data[ $field[ 'id' ] ][ $i ] : ''; ?>">
26
+			<input type="button" name="upload-btn" id="upload-btn" class="button-secondary" data-attr-position="<?php echo $i; ?>" value="<?php _e( 'Upload File', 'yikes-inc-easy-mailchimp-extender' ); ?>">
27 27
 			<div class="file-container">
28 28
 				<p class="file-remove-wrapper">
29
-					<a href="#" class="remove-file-button" data-attr-position="<?php echo $i; ?>"><?php _e( 'Remove File' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
29
+					<a href="#" class="remove-file-button" data-attr-position="<?php echo $i; ?>"><?php _e( 'Remove File', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
30 30
 				</p>
31 31
 			</div>
32 32
 		<?php $i++; } ?>
33
-		<?php if( isset( $field['repeat'] ) ) { ?>
33
+		<?php if ( isset( $field[ 'repeat' ] ) ) { ?>
34 34
 			<a href="#" class="button-secondary add-new-incentive-attachment" data-attr-position="<?php echo $i; ?>"><span class="dashicons dashicons-plus"></span></a>
35 35
 		<?php } ?>
36
-		<p class="description"><?php echo $field['description']; ?></p>
36
+		<p class="description"><?php echo $field[ 'description' ]; ?></p>
37 37
 	</div>
38 38
\ No newline at end of file
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.