Completed
Pull Request — master (#808)
by
unknown
07:45 queued 05:21
created
admin/partials/helpers/fields/yikes-mailchimp-text-field.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,16 +5,16 @@
 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
-	if ( is_string( $form_data['custom_fields'] ) ) {
9
-		$field_data = json_decode( $form_data['custom_fields'] , true );
10
-	} elseif ( is_array( $form_data['custom_fields'] ) ) {
11
-		$field_data = $form_data['custom_fields'];
8
+	if ( is_string( $form_data[ 'custom_fields' ] ) ) {
9
+		$field_data = json_decode( $form_data[ 'custom_fields' ], true );
10
+	} elseif ( is_array( $form_data[ 'custom_fields' ] ) ) {
11
+		$field_data = $form_data[ 'custom_fields' ];
12 12
 	}
13 13
 ?>
14 14
 <label class="custom-field-section">
15
-	<strong><?php echo $field['label']; ?></strong>
16
-	<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'] : ''; ?>">
17
-	<?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
18
-	<p class="description"><?php echo $field['description']; ?></p>
15
+	<strong><?php echo $field[ 'label' ]; ?></strong>
16
+	<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' ] : ''; ?>">
17
+	<?php if ( isset( $field[ 'description' ] ) && $field[ 'description' ] != '' ) { ?>
18
+	<p class="description"><?php echo $field[ 'description' ]; ?></p>
19 19
 	<?php } ?>
20 20
 </label>
21 21
\ 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   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,16 +5,16 @@
 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
-	if ( is_string( $form_data['custom_fields'] ) ) {
9
-		$field_data = json_decode( $form_data['custom_fields'] , true );
10
-	} elseif ( is_array( $form_data['custom_fields'] ) ) {
11
-		$field_data = $form_data['custom_fields'];
8
+	if ( is_string( $form_data[ 'custom_fields' ] ) ) {
9
+		$field_data = json_decode( $form_data[ 'custom_fields' ], true );
10
+	} elseif ( is_array( $form_data[ 'custom_fields' ] ) ) {
11
+		$field_data = $form_data[ 'custom_fields' ];
12 12
 	}
13 13
 ?>
14 14
 <label class="custom-field-section">
15
-	<strong><?php echo $field['label']; ?></strong>
16
-	<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 ); ?>>
17
-	<?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
18
-	<p class="description"><?php echo $field['description']; ?></p>
15
+	<strong><?php echo $field[ 'label' ]; ?></strong>
16
+	<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 ); ?>>
17
+	<?php if ( isset( $field[ 'description' ] ) && $field[ 'description' ] != '' ) { ?>
18
+	<p class="description"><?php echo $field[ 'description' ]; ?></p>
19 19
 	<?php } ?>
20 20
 </label>
Please login to merge, or discard this patch.
admin/partials/helpers/fields/yikes-mailchimp-file-field.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@  discard block
 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
-	if ( is_string( $form_data['custom_fields'] ) ) {
9
-		$field_data = json_decode( $form_data['custom_fields'] , true );
10
-	} elseif ( is_array( $form_data['custom_fields'] ) ) {
11
-		$field_data = $form_data['custom_fields'];
8
+	if ( is_string( $form_data[ 'custom_fields' ] ) ) {
9
+		$field_data = json_decode( $form_data[ 'custom_fields' ], true );
10
+	} elseif ( is_array( $form_data[ 'custom_fields' ] ) ) {
11
+		$field_data = $form_data[ 'custom_fields' ];
12 12
 	}
13 13
 	 
14 14
 	// This will enqueue the Media Uploader script
@@ -16,27 +16,27 @@  discard block
 block discarded – undo
16 16
 	// And let's not forget the script we wrote earlier
17 17
 	wp_enqueue_script( 'yikes-mailchimp-file-field-script', plugin_dir_url( __FILE__ ) . 'js/yikes-mc-file-upload.js', array( 'jquery' ), '1.0', false );
18 18
 	// print_r( $field_data );
19
-	wp_localize_script( 'yikes-mailchimp-file-field-script' , 'additional_data' , array(
19
+	wp_localize_script( 'yikes-mailchimp-file-field-script', 'additional_data', array(
20 20
 		'wp_includes_image_url' => includes_url() . 'images/media/'
21 21
 	) );
22 22
 	$i = 1;
23 23
 	// create an single item array when nothing is stored yet, loop for one field 
24
-	$field_data['incentive-attachment'] = ( isset( $field_data['incentive-attachment'] ) && !empty( $field_data['incentive-attachment'] ) )  ? $field_data['incentive-attachment'] : array( '' );
24
+	$field_data[ 'incentive-attachment' ] = ( isset( $field_data[ 'incentive-attachment' ] ) && ! empty( $field_data[ 'incentive-attachment' ] ) ) ? $field_data[ 'incentive-attachment' ] : array( '' );
25 25
 ?>
26 26
 	
27 27
 	<div class="yikes-mailchimp-file-field">
28
-		<label for="image_url" class="widefat"><strong><?php echo $field['label']; ?></strong></label>
29
-		<?php foreach( $field_data['incentive-attachment'] as $attachment ) { ?>
30
-			<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] : ''; ?>">
31
-			<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' ); ?>">
28
+		<label for="image_url" class="widefat"><strong><?php echo $field[ 'label' ]; ?></strong></label>
29
+		<?php foreach ( $field_data[ 'incentive-attachment' ] as $attachment ) { ?>
30
+			<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 ] : ''; ?>">
31
+			<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' ); ?>">
32 32
 			<div class="file-container">
33 33
 				<p class="file-remove-wrapper">
34
-					<a href="#" class="remove-file-button" data-attr-position="<?php echo $i; ?>"><?php _e( 'Remove File' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
34
+					<a href="#" class="remove-file-button" data-attr-position="<?php echo $i; ?>"><?php _e( 'Remove File', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
35 35
 				</p>
36 36
 			</div>
37 37
 		<?php $i++; } ?>
38
-		<?php if( isset( $field['repeat'] ) ) { ?>
38
+		<?php if ( isset( $field[ 'repeat' ] ) ) { ?>
39 39
 			<a href="#" class="button-secondary add-new-incentive-attachment" data-attr-position="<?php echo $i; ?>"><span class="dashicons dashicons-plus"></span></a>
40 40
 		<?php } ?>
41
-		<p class="description"><?php echo $field['description']; ?></p>
41
+		<p class="description"><?php echo $field[ 'description' ]; ?></p>
42 42
 	</div>
43 43
\ 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   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@
 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
-	if ( is_string( $form_data['custom_fields'] ) ) {
10
-		$field_data = json_decode( $form_data['custom_fields'] , true );
11
-	} elseif ( is_array( $form_data['custom_fields'] ) ) {
12
-		$field_data = $form_data['custom_fields'];
9
+	if ( is_string( $form_data[ 'custom_fields' ] ) ) {
10
+		$field_data = json_decode( $form_data[ 'custom_fields' ], true );
11
+	} elseif ( is_array( $form_data[ 'custom_fields' ] ) ) {
12
+		$field_data = $form_data[ 'custom_fields' ];
13 13
 	}
14 14
 	
15
-	$content = ( isset( $field_data[$field['id']] ) ) ? $field_data[$field['id']] : ( isset( $field['default'] ) ? $field['default'] : '' );
16
-	$wysiwyg_id = 'custom-field['.$field['id'].']';
15
+	$content = ( isset( $field_data[ $field[ 'id' ] ] ) ) ? $field_data[ $field[ 'id' ] ] : ( isset( $field[ 'default' ] ) ? $field[ 'default' ] : '' );
16
+	$wysiwyg_id = 'custom-field[' . $field[ 'id' ] . ']';
17 17
 ?>
18 18
 
19 19
 <div class="yikes-mailchimp-wysiwyg-field">
20
-    <label for="image_url" class="widefat"><strong><?php echo $field['label']; ?></strong></label>
21
-    <?php wp_editor( $content, $field['id'], array( 'textarea_name' => $wysiwyg_id ) ); ?>
22
-    <p class="description"><?php echo $field['description']; ?></p>
20
+    <label for="image_url" class="widefat"><strong><?php echo $field[ 'label' ]; ?></strong></label>
21
+    <?php wp_editor( $content, $field[ 'id' ], array( 'textarea_name' => $wysiwyg_id ) ); ?>
22
+    <p class="description"><?php echo $field[ 'description' ]; ?></p>
23 23
 </div>
Please login to merge, or discard this patch.
admin/partials/helpers/fields/yikes-mailchimp-radio-field.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,26 +5,26 @@
 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
-	if ( is_string( $form_data['custom_fields'] ) ) {
9
-		$field_data = json_decode( $form_data['custom_fields'] , true );
10
-	} elseif ( is_array( $form_data['custom_fields'] ) ) {
11
-		$field_data = $form_data['custom_fields'];
8
+	if ( is_string( $form_data[ 'custom_fields' ] ) ) {
9
+		$field_data = json_decode( $form_data[ 'custom_fields' ], true );
10
+	} elseif ( is_array( $form_data[ 'custom_fields' ] ) ) {
11
+		$field_data = $form_data[ 'custom_fields' ];
12 12
 	}
13 13
 ?>
14 14
 <div class="custom-field-section">
15 15
 	<!-- title -->
16
-	<strong><?php echo $field['label']; ?></strong>
16
+	<strong><?php echo $field[ 'label' ]; ?></strong>
17 17
 	<!-- radio buttons -->
18 18
 	<section class="custom-radio-holder">
19
-		<?php foreach( $field['options'] as $value => $label ) { ?>
19
+		<?php foreach ( $field[ 'options' ] as $value => $label ) { ?>
20 20
 			<label class="custom-radio-label">
21
-				<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 ); } ?>>
21
+				<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 ); } ?>>
22 22
 				<?php echo $label; ?>
23 23
 			</label>
24 24
 		<?php } ?>
25 25
 	</section>
26 26
 	<!-- description -->
27
-	<?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?>
28
-		<p class="description"><?php echo $field['description']; ?></p>
27
+	<?php if ( isset( $field[ 'description' ] ) && $field[ 'description' ] != '' ) { ?>
28
+		<p class="description"><?php echo $field[ 'description' ]; ?></p>
29 29
 	<?php } ?>
30 30
 </div>
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
includes/api/class-yikes-inc-easy-mailchimp-api-manager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 
97 97
 		$this->api_key = $api_key;
98 98
 		$parts         = $this->get_api_key_parts();
99
-		$this->key     = $parts['key'];
100
-		$this->dc      = $parts['dc'];
99
+		$this->key     = $parts[ 'key' ];
100
+		$this->dc      = $parts[ 'dc' ];
101 101
 	}
102 102
 
103 103
 	/**
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
 		$parts = explode( '-', $this->api_key );
123 123
 
124 124
 		return array(
125
-			'key' => $parts[0],
126
-			'dc'  => isset( $parts[1] ) ? $parts[1] : '',
125
+			'key' => $parts[ 0 ],
126
+			'dc'  => isset( $parts[ 1 ] ) ? $parts[ 1 ] : '',
127 127
 		);
128 128
 	}
129 129
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	 * @return Yikes_Inc_Easy_MailChimp_API
168 168
 	 */
169 169
 	public function get_api( $version = '' ) {
170
-		$version = $version ?: $this->get_default_api_version();
170
+		$version = $version ? : $this->get_default_api_version();
171 171
 
172 172
 		if ( ! array_key_exists( $version, $this->api ) || null === $this->api[ $version ] ) {
173 173
 			$this->api[ $version ] = new Yikes_Inc_Easy_MailChimp_API( $this->get_datacenter(), $this->get_api_key(), $version );
Please login to merge, or discard this patch.
public/partials/shortcodes/yikes-mailchimp-subscriber-count.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 		return '';
27 27
 	}
28 28
 
29
-	$form    = ( ! empty( $attributes['form'] ) ) ? str_replace( '&quot;', '', $attributes['form'] ) : false;
30
-	$list_id = ( ! empty( $attributes['list'] ) ) ? $attributes['list'] : false;
29
+	$form    = ( ! empty( $attributes[ 'form' ] ) ) ? str_replace( '&quot;', '', $attributes[ 'form' ] ) : false;
30
+	$list_id = ( ! empty( $attributes[ 'list' ] ) ) ? $attributes[ 'list' ] : false;
31 31
 
32 32
 	/* If no list ID was passed into the shortcode - bail */
33 33
 	if ( ! $list_id && ! $form ) {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 			return '';
53 53
 		}
54 54
 
55
-		$list_id = sanitize_key( $form_data['list_id'] ); // associated list id (users who fill out the form will be subscribed to this list)
55
+		$list_id = sanitize_key( $form_data[ 'list_id' ] ); // associated list id (users who fill out the form will be subscribed to this list)
56 56
 	}
57 57
 
58 58
 	// object buffer
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	}
72 72
 
73 73
 	/* type cast the returned value as an integer */
74
-	echo (int) apply_filters( 'yikes-mailchimp-subscriber-count-value', $list_data['stats']['member_count'] );
74
+	echo (int) apply_filters( 'yikes-mailchimp-subscriber-count-value', $list_data[ 'stats' ][ 'member_count' ] );
75 75
 
76 76
 	return ob_get_clean();
77 77
 
Please login to merge, or discard this patch.
admin/partials/menu/options.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@  discard block
 block discarded – undo
5 5
 */
6 6
 
7 7
 	/* Get and Store Option Values */
8
-	if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) === 'valid_api_key' ) {
9
-		$api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the MailChimp API" , "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
8
+	if ( get_option( 'yikes-mc-api-validation', 'invalid_api_key' ) === 'valid_api_key' ) {
9
+		$api_connection = '<span id="connection-container" class="api-connected" title="' . __( "Your site is currently connected to the MailChimp API", "yikes-inc-easy-mailchimp-extender" ) . '"><span class="dashicons dashicons-yes yikes-mc-api-connected"></span> ' . __( "Connected", 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
10 10
 		$api_error_response = '';
11 11
 	} else {
12
-		$api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span>  ' . __( "Not Connected" , 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
-		if( get_option( 'yikes-mc-api-invalid-key-response' , '' ) != '' ) {
14
-			$api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response' , '' ) . '</small></p>';
12
+		$api_connection = '<span id="connection-container" class="api-not-connected"><span class="dashicons dashicons-no-alt yikes-mc-api-not-connected"></span>  ' . __( "Not Connected", 'yikes-inc-easy-mailchimp-extender' ) . '</span>';
13
+		if ( get_option( 'yikes-mc-api-invalid-key-response', '' ) != '' ) {
14
+			$api_error_response = '<p><small><i class="dashicons dashicons-no-alt"></i> ' . get_option( 'yikes-mc-api-invalid-key-response', '' ) . '</small></p>';
15 15
 		} else {
16 16
 			$api_error_response = '';
17 17
 		}
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 	* @since 6.2.2
24 24
 	*
25 25
 	*/
26
-	if ( isset( $_REQUEST['section'] ) ) {
27
-		$_REQUEST['section'] = preg_replace('/[^\w-]/', '', strip_tags ( $_REQUEST['section'] ) );
26
+	if ( isset( $_REQUEST[ 'section' ] ) ) {
27
+		$_REQUEST[ 'section' ] = preg_replace( '/[^\w-]/', '', strip_tags( $_REQUEST[ 'section' ] ) );
28 28
 	}
29 29
 ?>
30 30
 	<!-- Actual Settings Form
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
 	<div class="wrap">
33 33
 
34 34
 		<!-- Freddie Logo -->
35
-		<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - MailChimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
35
+		<img src="<?php echo YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png'; ?>" alt="<?php _e( 'Freddie - MailChimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
36 36
 
37
-		<h1>Easy Forms for MailChimp | <?php if ( isset( $_REQUEST['section'] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST['section'] ) ); } else { echo __( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
37
+		<h1>Easy Forms for MailChimp | <?php if ( isset( $_REQUEST[ 'section' ] ) ) { echo ucwords( str_replace( '-', ' ', $_REQUEST[ 'section' ] ) ); } else { echo __( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ); } ?></h1>
38 38
 
39 39
 		<!-- Settings Page Description -->
40
-		<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Manage the overall settings for Easy forms for MailChimp.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
40
+		<p class="yikes-easy-mc-about-text about-text"><?php _e( 'Manage the overall settings for Easy forms for MailChimp.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
41 41
 		<?php
42 42
 			/* Success Messages on Options Updated */
43
-			if( isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ) {
43
+			if ( isset( $_REQUEST[ 'settings-updated' ] ) && $_REQUEST[ 'settings-updated' ] == 'true' ) {
44 44
 				?>
45 45
 				<div class="updated manage-form-admin-notice">
46 46
 					<p><?php _e( 'Settings successfully updated.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 				<?php
49 49
 			}
50 50
 			/* MailChimp API Cleared Successfully message */
51
-			if( isset( $_REQUEST['transient-cleared'] ) && $_REQUEST['transient-cleared'] == 'true' ) {
51
+			if ( isset( $_REQUEST[ 'transient-cleared' ] ) && $_REQUEST[ 'transient-cleared' ] == 'true' ) {
52 52
 				?>
53 53
 				<div class="updated manage-form-admin-notice">
54 54
 					<p><?php _e( 'MailChimp API Cache successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 			}
58 58
 			/* Error Log Clear Messages */
59 59
 				/* Success Messages on Options Updated */
60
-				if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'true' ) {
60
+				if ( isset( $_REQUEST[ 'error-log-cleared' ] ) && $_REQUEST[ 'error-log-cleared' ] == 'true' ) {
61 61
 					?>
62 62
 					<div class="updated manage-form-admin-notice">
63 63
 						<p><?php _e( 'Error log successfully cleared.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 					<?php
66 66
 				}
67 67
 				/* MailChimp API Cleared Successfully message */
68
-				if( isset( $_REQUEST['error-log-cleared'] ) && $_REQUEST['error-log-cleared'] == 'false' ) {
68
+				if ( isset( $_REQUEST[ 'error-log-cleared' ] ) && $_REQUEST[ 'error-log-cleared' ] == 'false' ) {
69 69
 					?>
70 70
 					<div class="error manage-form-admin-notice">
71 71
 						<p><?php _e( "Whoops! We've encountered an error while trying to clear the error log. Please refresh the page and try again. If the error persists please get in touch with the YIKES Inc. support team.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
@@ -74,28 +74,28 @@  discard block
 block discarded – undo
74 74
 				}
75 75
 
76 76
 				/* Display a success message if our error log was sucessfully created, or display an error if not */
77
-				if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'true' ) {
77
+				if ( isset( $_GET[ 'error_log_created' ] ) && $_GET[ 'error_log_created' ] == 'true' ) {
78 78
 					?>
79 79
 					<div class="updated">
80 80
 						<p><?php _e( 'Error log successfully created. You may now start logging errors.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
81 81
 					</div>
82 82
 					<?php
83
-				} else if( isset( $_GET['error_log_created'] ) && $_GET['error_log_created'] == 'false' ) {
83
+				} else if ( isset( $_GET[ 'error_log_created' ] ) && $_GET[ 'error_log_created' ] == 'false' ) {
84 84
 					?>
85 85
 					<div class="error">
86
-						<p><?php echo esc_attr( urldecode( $_GET['error_message'] ) , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
86
+						<p><?php echo esc_attr( urldecode( $_GET[ 'error_message' ] ), 'yikes-inc-easy-mailchimp-extender' ); ?></p>
87 87
 					</div>
88 88
 					<?php
89 89
 				}
90 90
 
91 91
 				/* Display a success message if the user successfully imported some forms */
92
-				if( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-forms'] ) && $_GET['import-forms'] == 'true' ) {
92
+				if ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'import-export-forms' && isset( $_GET[ 'import-forms' ] ) && $_GET[ 'import-forms' ] == 'true' ) {
93 93
 					?>
94 94
 					<div class="updated">
95 95
 						<p><?php printf( __( 'Opt-in forms successfully imported. <a href="%s" title="View Forms">View Forms</a>', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
96 96
 					</div>
97 97
 					<?php
98
-				} elseif( isset( $_GET['section'] ) && $_GET['section'] == 'import-export-forms' && isset( $_GET['import-settings'] ) && $_GET['import-settings'] == 'true' ) {
98
+				} elseif ( isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] == 'import-export-forms' && isset( $_GET[ 'import-settings' ] ) && $_GET[ 'import-settings' ] == 'true' ) {
99 99
 					?>
100 100
 					<div class="updated">
101 101
 						<p><?php printf( __( 'YIKES Easy Forms for MailChimp settings successfully imported.', 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ) ); ?></p>
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
 
117 117
 						<div class="postbox yikes-easy-mc-postbox">
118 118
 
119
-							<?php if( !isset( $_REQUEST['section'] ) || $_REQUEST['section'] == '' ) {
119
+							<?php if ( ! isset( $_REQUEST[ 'section' ] ) || $_REQUEST[ 'section' ] == '' ) {
120 120
 								include YIKES_MC_PATH . 'admin/partials/menu/options-sections/general-settings.php';
121 121
 							} else {
122
-								if( isset( $_REQUEST['addon'] ) && $_REQUEST['addon'] == 'true' ) {
123
-									include apply_filters( 'yikes-mailchimp-'.$_REQUEST['section'].'-options-path' , '' );
122
+								if ( isset( $_REQUEST[ 'addon' ] ) && $_REQUEST[ 'addon' ] == 'true' ) {
123
+									include apply_filters( 'yikes-mailchimp-' . $_REQUEST[ 'section' ] . '-options-path', '' );
124 124
 								} else {
125 125
 									// White list a set of files that are allowed to be included here
126 126
 									$file_base = 'admin/partials/menu/options-sections/';
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
 										$file_base . 'recaptcha-settings.php',
134 134
 									);
135 135
 									// Ensure the included file is allowed and whitelisted above, before including it
136
-									if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php', $acceptable_files ) ) {
137
-										include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST['section'] . '.php';
136
+									if ( 0 === validate_file( 'admin/partials/menu/options-sections/' . $_REQUEST[ 'section' ] . '.php', $acceptable_files ) ) {
137
+										include YIKES_MC_PATH . 'admin/partials/menu/options-sections/' . $_REQUEST[ 'section' ] . '.php';
138 138
 									} else {
139 139
 										wp_die( esc_attr__( 'Invalid file. If this error persists, please contact support.', 'yikes-inc-easy-mailchimp' ) );
140 140
 									}
Please login to merge, or discard this patch.
admin/partials/menu/add-ons.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
 <div class="wrap">
8 8
 
9 9
 	<!-- Freddie Logo -->
10
-	<img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - MailChimp Mascot' , 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
10
+	<img src="<?php echo esc_url( YIKES_MC_URL . 'includes/images/MailChimp_Assets/Freddie_60px.png' ); ?>" alt="<?php esc_attr_e( 'Freddie - MailChimp Mascot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-mc-freddie-logo" />
11 11
 
12
-	<h1>Easy Forms for MailChimp | <?php echo esc_attr__( 'Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="https://yikesplugins.com/plugins/?plugins=MailChimp" target="_blank" class="button-primary coming-soon-button" title="<?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_attr_e( 'View All Add-Ons' , 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1>
12
+	<h1>Easy Forms for MailChimp | <?php echo esc_attr__( 'Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?> &nbsp; <a href="https://yikesplugins.com/plugins/?plugins=MailChimp" target="_blank" class="button-primary coming-soon-button" title="<?php esc_attr_e( 'View All Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php esc_attr_e( 'View All Add-Ons', 'yikes-inc-easy-mailchimp-extender' ); ?> <span class="dashicons dashicons-external"></span></a></h1>
13 13
 
14 14
 	<!-- Addons Page Description -->
15
-	<p class="yikes-easy-mc-about-text about-text"><?php esc_attr_e( "Below you'll find all free and paid add-ons available for Easy Forms for MailChimp. Each add-on extends the functionality of the free plugin." , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
15
+	<p class="yikes-easy-mc-about-text about-text"><?php esc_attr_e( "Below you'll find all free and paid add-ons available for Easy Forms for MailChimp. Each add-on extends the functionality of the free plugin.", 'yikes-inc-easy-mailchimp-extender' ); ?></p>
16 16
 
17 17
 	<!-- Add-On Container -->
18 18
 	<section id="add-ons">
Please login to merge, or discard this patch.