Completed
Pull Request — master (#811)
by
unknown
09:59 queued 07:34
created
public/class-yikes-inc-easy-mailchimp-extender-public.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 		new YIKES_Inc_Easy_MailChimp_Public_Ajax();
57 57
 
58 58
 		// Include our error logging class
59
-		add_action( 'init' , array( $this , 'load_error_logging_class' ) , 1 );
59
+		add_action( 'init', array( $this, 'load_error_logging_class' ), 1 );
60 60
 		// load our checkbox classes
61
-		add_action( 'init' , array( $this , 'load_checkbox_integration_classes' ) , 1 );
61
+		add_action( 'init', array( $this, 'load_checkbox_integration_classes' ), 1 );
62 62
 		// custom front end filter
63 63
 		add_action( 'init', array( $this, 'yikes_custom_frontend_content_filter' ) );
64 64
 		// Process non-ajax forms in the header
@@ -93,15 +93,15 @@  discard block
 block discarded – undo
93 93
 	**/
94 94
 	public function load_checkbox_integration_classes() {
95 95
 		// store our options
96
-		$integrations = get_option( 'optin-checkbox-init' , array() );
97
-		if( ! empty( $integrations ) && is_array( $integrations ) ) {
96
+		$integrations = get_option( 'optin-checkbox-init', array() );
97
+		if ( ! empty( $integrations ) && is_array( $integrations ) ) {
98 98
 			// load our mail integrations class
99 99
 			require_once YIKES_MC_PATH . 'public/classes/checkbox-integrations.php';
100 100
 			// loop over selected classes and load them up!
101
-			foreach( $integrations as $integration => $value ) {
102
-				if( isset( $value['value'] ) && $value['value'] == 'on' ) {
101
+			foreach ( $integrations as $integration => $value ) {
102
+				if ( isset( $value[ 'value' ] ) && $value[ 'value' ] == 'on' ) {
103 103
 					// load our class extensions
104
-					require_once YIKES_MC_PATH . 'public/classes/checkbox-integrations/class.'.$integration.'-checkbox.php';
104
+					require_once YIKES_MC_PATH . 'public/classes/checkbox-integrations/class.' . $integration . '-checkbox.php';
105 105
 				}
106 106
 			}
107 107
 		}
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @since 6.0.0
116 116
 	 */
117 117
 	public function load_error_logging_class() {
118
-		if( get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
118
+		if ( get_option( 'yikes-mailchimp-debug-status', '' ) == '1' ) {
119 119
 			// if error logging is enabled we should include our error logging class
120 120
 			require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
121 121
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging;
@@ -128,19 +128,19 @@  discard block
 block discarded – undo
128 128
 	*	@since 6.0.3.4
129 129
 	*/
130 130
 	public function yikes_process_non_ajax_forms( $form_submitted ) {
131
-		global $wpdb,$post;
132
-		$form_id = ( ! empty( $_POST['yikes-mailchimp-submitted-form'] ) ) ? (int) $_POST['yikes-mailchimp-submitted-form'] : false; // store form id
133
-		if( $form_id ) {
131
+		global $wpdb, $post;
132
+		$form_id = ( ! empty( $_POST[ 'yikes-mailchimp-submitted-form' ] ) ) ? (int) $_POST[ 'yikes-mailchimp-submitted-form' ] : false; // store form id
133
+		if ( $form_id ) {
134 134
 			$form_settings = self::yikes_retrieve_form_settings( $form_id );
135
-			if( isset( $_POST ) && !empty( $_POST ) && isset( $form_id ) && $form_settings['submission_settings']['ajax'] == 0 ) {
136
-				if( $_POST['yikes-mailchimp-submitted-form'] == $form_id ) { // ensure we only process the form that was submitted
135
+			if ( isset( $_POST ) && ! empty( $_POST ) && isset( $form_id ) && $form_settings[ 'submission_settings' ][ 'ajax' ] == 0 ) {
136
+				if ( $_POST[ 'yikes-mailchimp-submitted-form' ] == $form_id ) { // ensure we only process the form that was submitted
137 137
 
138 138
 					// Lets include our form processing file
139 139
 					include_once( YIKES_MC_PATH . 'public/partials/shortcodes/process/process_form_submission.php' );
140
-					if( $form_settings['submission_settings']['redirect_on_submission'] == '1' ) {
141
-						if( $form_submitted == 1 ) {
140
+					if ( $form_settings[ 'submission_settings' ][ 'redirect_on_submission' ] == '1' ) {
141
+						if ( $form_submitted == 1 ) {
142 142
 							// decode our settings
143
-							$redirect_page = ( 'custom_url' != $form_settings['submission_settings']['redirect_page'] ) ? get_permalink( (int) $form_settings['submission_settings']['redirect_page'] ) : $form_settings['submission_settings']['custom_redirect_url'];
143
+							$redirect_page = ( 'custom_url' != $form_settings[ 'submission_settings' ][ 'redirect_page' ] ) ? get_permalink( (int) $form_settings[ 'submission_settings' ][ 'redirect_page' ] ) : $form_settings[ 'submission_settings' ][ 'custom_redirect_url' ];
144 144
 							wp_redirect( apply_filters( 'yikes-mailchimp-redirect-url', esc_url( $redirect_page ), $form_id, $post ) );
145 145
 							exit;
146 146
 						}
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public static function yikes_retrieve_form_settings( $form_id ) {
170 170
 		// if no form id, abort
171
-		if( ! $form_id ) {
171
+		if ( ! $form_id ) {
172 172
 			return array();
173 173
 		}
174 174
 
@@ -197,13 +197,13 @@  discard block
 block discarded – undo
197 197
 			return;
198 198
 		}
199 199
 		// trim trailing period
200
-		if ( isset( $form_settings['error_messages']['update-link'] ) && ! empty( $form_settings['error_messages']['update-link'] ) ) {
201
-			$response_text = $form_settings['error_messages']['update-link'];
200
+		if ( isset( $form_settings[ 'error_messages' ][ 'update-link' ] ) && ! empty( $form_settings[ 'error_messages' ][ 'update-link' ] ) ) {
201
+			$response_text = $form_settings[ 'error_messages' ][ 'update-link' ];
202 202
 			// extract the link text
203 203
 			preg_match( '/\[link].*?\[\/link\]/', $response_text, $link_text );
204 204
 			if ( $link_text && ! empty( $link_text ) ) {
205 205
 				// Extract the custom link text ([link]*[/link])
206
-				$custom_link_text = str_replace( '[/link]', '', str_replace( '[link]', '', str_replace( 'click to send yourself an update link', $link_text[0], $link ) ) );
206
+				$custom_link_text = str_replace( '[/link]', '', str_replace( '[link]', '', str_replace( 'click to send yourself an update link', $link_text[ 0 ], $link ) ) );
207 207
 				// Replace the link text, with our custom link text
208 208
 				$response_text = str_replace( $link_text, $custom_link_text, $response_text );
209 209
 			}
@@ -232,8 +232,8 @@  discard block
 block discarded – undo
232 232
 		}
233 233
 
234 234
 		// trim trailing period
235
-		if ( isset( $form_settings['error_messages']['already-subscribed'] ) && ! empty( $form_settings['error_messages']['already-subscribed'] ) ) {
236
-			$response_text = str_replace( '[email]', $email, $form_settings['error_messages']['already-subscribed'] );
235
+		if ( isset( $form_settings[ 'error_messages' ][ 'already-subscribed' ] ) && ! empty( $form_settings[ 'error_messages' ][ 'already-subscribed' ] ) ) {
236
+			$response_text = str_replace( '[email]', $email, $form_settings[ 'error_messages' ][ 'already-subscribed' ] );
237 237
 		}
238 238
 		// Return our new string
239 239
 		return $response_text;
Please login to merge, or discard this patch.
admin/partials/dashboard-widgets/templates/stats-list-template.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 /* The template file for displaying our stats in the Admin dashboard widget */
3 3
 
4 4
 if ( isset( $list_data ) ) {
5
-	if ( isset( $list_data['id'] ) ) {
5
+	if ( isset( $list_data[ 'id' ] ) ) {
6 6
 
7 7
 	// When a user selects a list from the dropdown, capture the array value here
8 8
 	$list = $list_data;
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
 		// Get the list IDs, capture the first list ID
14 14
 		$first_list_id = '';
15 15
 		$list_ids = array_keys( $list_data );
16
-		if ( is_array( $list_ids ) && isset( $list_ids[0] ) ) {
17
-			$first_list_id = $list_ids[0];
16
+		if ( is_array( $list_ids ) && isset( $list_ids[ 0 ] ) ) {
17
+			$first_list_id = $list_ids[ 0 ];
18 18
 		}
19 19
 
20 20
 		// Set our $list value to the first list in the list_data array
21
-		if ( isset( $list_data[ $first_list_id ] ) && is_array( $list_data[ $first_list_id ] ) && isset( $list_data[ $first_list_id ]['id'] ) ) {
21
+		if ( isset( $list_data[ $first_list_id ] ) && is_array( $list_data[ $first_list_id ] ) && isset( $list_data[ $first_list_id ][ 'id' ] ) ) {
22 22
 			$list = $list_data[ $first_list_id ];
23 23
 		}
24 24
 	}
@@ -31,36 +31,36 @@  discard block
 block discarded – undo
31 31
 
32 32
 ?>
33 33
 <section id="yikes-easy-mc-widget-stat-holder">
34
-	<h3><?php echo $list['name']; ?> <small><a href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $list['id'] . '' ) ); ?>" title="<?php _e( 'view List' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'view list' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></h3>
34
+	<h3><?php echo $list[ 'name' ]; ?> <small><a href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-view-list&list-id=' . $list[ 'id' ] . '' ) ); ?>" title="<?php _e( 'view List', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'view list', 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></h3>
35 35
 	
36 36
 	<table class="yikes-easy-mc-stats-table">
37 37
 		<thead class="yikes-easy-mc-hidden">
38 38
 			<tr>
39
-				<th><?php _e( 'Subscribers' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
40
-				<th><?php _e( 'Unsubscribed' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
41
-				<th><?php _e( 'New Since Send' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>	
42
-				<th><?php _e( 'Avg. Sub. Rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></th>
39
+				<th><?php _e( 'Subscribers', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
40
+				<th><?php _e( 'Unsubscribed', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
41
+				<th><?php _e( 'New Since Send', 'yikes-inc-easy-mailchimp-extender' ); ?></th>	
42
+				<th><?php _e( 'Avg. Sub. Rate', 'yikes-inc-easy-mailchimp-extender' ); ?></th>
43 43
 			</tr>
44 44
 		</thead>
45 45
 		<tbody>
46 46
 			<tr class="yikes-easy-mc-table-stats-tr yikes-easy-mc-table-stats-tr-first">
47
-				<td title="<?php _e( 'Number of active subscribers.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
48
-					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['member_count']; ?></p>
49
-						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'subscribers' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
47
+				<td title="<?php _e( 'Number of active subscribers.', 'yikes-inc-easy-mailchimp-extender' ); ?>">
48
+					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list[ 'stats' ][ 'member_count' ]; ?></p>
49
+						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'subscribers', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
50 50
 				</td>
51
-				<td title="<?php _e( 'Number of users who have unsusbscribed.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
52
-					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['unsubscribe_count']; ?></p>
53
-						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'unsubscribed' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
51
+				<td title="<?php _e( 'Number of users who have unsusbscribed.', 'yikes-inc-easy-mailchimp-extender' ); ?>">
52
+					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list[ 'stats' ][ 'unsubscribe_count' ]; ?></p>
53
+						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'unsubscribed', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
54 54
 				</td>
55 55
 			</tr>
56 56
 			<tr class="yikes-easy-mc-table-stats-tr  yikes-easy-mc-table-stats-tr-second">
57
-				<td title="<?php _e( 'Number of new subscribers since the last campaign was sent.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
58
-					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['member_count_since_send']; ?></p>
59
-						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'new since send' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
57
+				<td title="<?php _e( 'Number of new subscribers since the last campaign was sent.', 'yikes-inc-easy-mailchimp-extender' ); ?>">
58
+					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list[ 'stats' ][ 'member_count_since_send' ]; ?></p>
59
+						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'new since send', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
60 60
 				</td>
61
-				<td title="<?php _e( 'Average number of subscribers per month.' , 'yikes-inc-easy-mailchimp-extender' ); ?>">
62
-					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list['stats']['avg_sub_rate']; ?></p>
63
-						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'avg. sub. rate' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
61
+				<td title="<?php _e( 'Average number of subscribers per month.', 'yikes-inc-easy-mailchimp-extender' ); ?>">
62
+					<p class="yikes-easy-mc-dashboard-stat"><?php echo $list[ 'stats' ][ 'avg_sub_rate' ]; ?></p>
63
+						<p class="yikes-easy-mc-stat-list-label"><?php _e( 'avg. sub. rate', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
64 64
 				</td>
65 65
 			</tr>
66 66
 		</tbody>
Please login to merge, or discard this patch.
includes/third-party-integrations/third-party-init.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 		// required..*
18 18
 		include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
19 19
 		/* Visual Composer */
20
-		if( is_plugin_active( 'js_composer/js_composer.php' ) ) {
20
+		if ( is_plugin_active( 'js_composer/js_composer.php' ) ) {
21 21
 			new YIKES_MailChimp_Visual_Composer_Extension();
22 22
 		}
23 23
 	}
Please login to merge, or discard this patch.
includes/class-yikes-inc-easy-mailchimp-extender-uninstall.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 		if ( function_exists( 'is_multisite' ) && is_multisite() ) {
9 9
 			// users can only unisntall a plugin from the network dashboard page
10 10
 			// Get all blog ids
11
-			$blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
11
+			$blogids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
12 12
 			foreach ( $blogids as $blog_id ) {
13 13
 				switch_to_blog( $blog_id );
14 14
 				self::_uninstall_yikes_easy_mailchimp( $wpdb );
@@ -28,15 +28,15 @@  discard block
 block discarded – undo
28 28
 	 * @since    6.0.0
29 29
 	 */
30 30
 	static function _uninstall_yikes_easy_mailchimp( $wpdb ) {
31
-		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
31
+		require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
32 32
 
33 33
 		/* Clean up and delete our custom table from the databse */
34
-		$table = $wpdb->prefix."yikes_easy_mc_forms";
34
+		$table = $wpdb->prefix . "yikes_easy_mc_forms";
35 35
 		$sql = 'DROP TABLE IF EXISTS ' . $table;
36 36
 
37 37
 		//Delete any options thats stored also?
38 38
 		$wpdb->query( $sql );
39
-		dbDelta($sql);
39
+		dbDelta( $sql );
40 40
 
41 41
 		/* Clear All Transient Data */
42 42
 		delete_transient( 'yikes-easy-mailchimp-list-data' );
Please login to merge, or discard this patch.
includes/add_ons/eu-compliance.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
 	<div class="addon-footer-wrap give-clearfix">
34 34
 		<a href="<?php echo esc_attr( $permalink ); ?>" title="<?php echo esc_attr( $add_on_title ); ?>" class="button-secondary" target="_blank">
35
-			<?php esc_attr_e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?>
35
+			<?php esc_attr_e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?>
36 36
 		<span class="dashicons dashicons-external"></span></a>
37 37
 	</div>
38 38
 
Please login to merge, or discard this patch.
includes/add_ons/incentives.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
 	<div class="addon-footer-wrap give-clearfix">
34 34
 		<a href="<?php echo esc_attr( $permalink ); ?>" title="<?php echo esc_attr( $add_on_title ); ?>" class="button-secondary" target="_blank">
35
-			<?php esc_attr_e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?>
35
+			<?php esc_attr_e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?>
36 36
 		<span class="dashicons dashicons-external"></span></a>
37 37
 	</div>
38 38
 
Please login to merge, or discard this patch.
includes/add_ons/customizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
 	<div class="addon-footer-wrap give-clearfix">
34 34
 		<a href="<?php echo esc_attr( $permalink ); ?>" title="<?php echo esc_attr( $add_on_title ); ?>" class="button-secondary" target="_blank">
35
-			<?php esc_attr_e( 'View Add-on' , 'yikes-inc-easy-mailchimp-extender' ); ?>
35
+			<?php esc_attr_e( 'View Add-on', 'yikes-inc-easy-mailchimp-extender' ); ?>
36 36
 		<span class="dashicons dashicons-external"></span></a>
37 37
 	</div>
38 38
 
Please login to merge, or discard this patch.
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/free-support.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@  discard block
 block discarded – undo
5 5
 	<div id="col-left">
6 6
 
7 7
 		<div class="col-wrap">
8
-			<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>
8
+			<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>
9 9
 			<div class="inside">
10 10
 				<p><?php _e( 'Use your WordPress.org username to submit support requests on the WordPress Directory support forum.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
11
-				<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' ); ?>" >
11
+				<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' ); ?>" >
12 12
 				<a href="https://wordpress.org/support/plugin/yikes-inc-easy-mailchimp-extender" target="_blank" class="button-secondary support-page-button"><?php _e( 'Submit a New WordPress.org Support Request', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
13 13
 			</div>
14 14
 		</div>
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 						printf( '<h2>' . esc_attr__( 'Popular Knowledge Base Articles', 'yikes-inc-easy-mailchimp-extender' ) . '</h2>' );
61 61
 						printf( '<ol>' );
62 62
 						foreach ( $knowledge_base_links as $kb_link ) {
63
-							echo wp_kses_post( '<li><a href="' . esc_url( $kb_link['href'] ) . '" title="' . esc_attr( $kb_link['title'] ) . '" target="_blank">' . esc_attr( $kb_link['title'] ) . '</a></li>' );
63
+							echo wp_kses_post( '<li><a href="' . esc_url( $kb_link[ 'href' ] ) . '" title="' . esc_attr( $kb_link[ 'title' ] ) . '" target="_blank">' . esc_attr( $kb_link[ 'title' ] ) . '</a></li>' );
64 64
 						}
65 65
 						printf( '</ol>' );
66 66
 					}
Please login to merge, or discard this patch.