Completed
Pull Request — staging (#799)
by Viktor
05:05
created
admin/partials/menu/options-sections/general-settings.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 $yikes_mc_api_constant = ( defined( 'YIKES_MC_API_KEY' ) ) ? true : false;
9 9
 ?>
10 10
 
11
-<h3><span><?php _e( 'General Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span><?php echo $api_connection; ?></h3>
11
+<h3><span><?php _e( 'General Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span><?php echo $api_connection; ?></h3>
12 12
 <div class="inside">
13 13
 
14 14
 	<!-- Settings Form -->
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 		<!-- MailChimp API Input Field -->
22 22
 		<label for="yks-mailchimp-api-key">
23 23
 
24
-			<p><?php _e( 'Enter your API key in the field below to connect your site to your MailChimp account.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
24
+			<p><?php _e( 'Enter your API key in the field below to connect your site to your MailChimp account.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
25 25
 
26
-			<p><strong><?php _e( 'MailChimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
26
+			<p><strong><?php _e( 'MailChimp API Key', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
27 27
 
28
-			<input autocomplete="off" <?php if ( $yikes_mc_api_constant ) { echo 'readonly="readonly"'; } if( strlen( yikes_get_mc_api_key() ) > 0 ) { ?> type="password" <?php } else { ?> type="text" <?php } ?> value="<?php echo yikes_get_mc_api_key(); ?>" placeholder="<?php _e( 'MailChimp API Key' , 'yikes-inc-easy-mailchimp-extender' ); ?>" name="yikes-mc-api-key" id="yikes-mc-api-key" class="settings-page-input" />
28
+			<input autocomplete="off" <?php if ( $yikes_mc_api_constant ) { echo 'readonly="readonly"'; } if ( strlen( yikes_get_mc_api_key() ) > 0 ) { ?> type="password" <?php } else { ?> type="text" <?php } ?> value="<?php echo yikes_get_mc_api_key(); ?>" placeholder="<?php _e( 'MailChimp API Key', 'yikes-inc-easy-mailchimp-extender' ); ?>" name="yikes-mc-api-key" id="yikes-mc-api-key" class="settings-page-input" />
29 29
 
30 30
 			<?php if ( $yikes_mc_api_constant ) { ?>
31 31
 				<p class="description"><?php printf( __( "Your MailChimp API key has been defined using the %s constant, in a PHP file.", "yikes-inc-easy-mailchimp-extender" ), '<code>YIKES_MC_API_KEY</code>' ); ?></p>
@@ -34,21 +34,21 @@  discard block
 block discarded – undo
34 34
 			<?php echo $api_error_response; ?>
35 35
 
36 36
 			<?php if ( ! $yikes_mc_api_constant ) { ?>
37
-				<p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
37
+				<p class="description"><small><a href="https://admin.mailchimp.com/account/api" target="_blank" title="<?php _e( 'Get your API key here', 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'Get your API key here', 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
38 38
 			<?php } ?>
39 39
 
40 40
 			<p class="description">Warning: changing your API key will break your current forms.</p>
41 41
 		</label>
42 42
 
43 43
 		<!-- Use Nonce Validation Field -->		
44
-		<p><strong><?php _e( 'Enable nonce validation on this site?' , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
44
+		<p><strong><?php _e( 'Enable nonce validation on this site?', 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
45 45
 		<label for="yikes-mailchimp-use-nonce-yes">
46 46
 			Yes
47
-			<input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-yes" class="settings-page-input" value="1" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ) , '1' ); ?> />
47
+			<input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-yes" class="settings-page-input" value="1" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ), '1' ); ?> />
48 48
 		</label>
49 49
 		<label for="yikes-mailchimp-use-nonce-no">
50 50
 			No
51
-			<input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-no" class="settings-page-input" value="0" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ) , '0' ); ?> />
51
+			<input type="radio" name="yikes-mailchimp-use-nonce" id="yikes-mailchimp-use-nonce-no" class="settings-page-input" value="0" <?php checked( get_option( 'yikes-mailchimp-use-nonce', '1' ), '0' ); ?> />
52 52
 		</label>
53 53
 
54 54
 	<?php submit_button(); ?>
Please login to merge, or discard this patch.
admin/partials/menu/options-sections/import-export-forms.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -3,15 +3,15 @@  discard block
 block discarded – undo
3 3
 $form_interface = yikes_easy_mailchimp_extender_get_form_interface();
4 4
 $all_forms = $form_interface->get_all_forms();
5 5
 ?>
6
-<h3><span><?php _e( 'Import/Export Forms & Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
6
+<h3><span><?php _e( 'Import/Export Forms & Settings', 'yikes-inc-easy-mailchimp-extender' ); ?></span></h3>
7 7
 
8 8
 <div class="inside">
9 9
 
10 10
 	<!-- Export Form -->
11
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-forms' , 'nonce' => wp_create_nonce( 'export-forms' ) ) ) ); ?>" method="post">
12
-		<p><strong><?php _e( "Export Forms" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
11
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-forms', 'nonce' => wp_create_nonce( 'export-forms' ) ) ) ); ?>" method="post">
12
+		<p><strong><?php _e( "Export Forms", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
13 13
 		<p class="description">
14
-			<?php _e( "Select the forms you would like to export. When you click the download button below, Easy Forms for MailChimp will create a CSV file for you to save to your computer. Once you've saved the download file, you can use the Import tool to import the forms to this or any other site." , "yikes-inc-easy-mailchimp-extender" ); ?>
14
+			<?php _e( "Select the forms you would like to export. When you click the download button below, Easy Forms for MailChimp will create a CSV file for you to save to your computer. Once you've saved the download file, you can use the Import tool to import the forms to this or any other site.", "yikes-inc-easy-mailchimp-extender" ); ?>
15 15
 		</p>
16 16
 
17 17
 		<?php if ( empty( $all_forms ) ) { ?>
@@ -20,44 +20,44 @@  discard block
 block discarded – undo
20 20
 			</p>
21 21
 		<?php } else { ?>
22 22
 			<!-- custom list so users can export specific forms -->
23
-			<a class="toggle-custom-lists button-secondary" onclick="jQuery(this).next().slideToggle();return false;"><?php _e( 'Select Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?></a>
23
+			<a class="toggle-custom-lists button-secondary" onclick="jQuery(this).next().slideToggle();return false;"><?php _e( 'Select Forms', 'yikes-inc-easy-mailchimp-extender' ); ?></a>
24 24
 			<ul class="export-custom-forms-list">
25
-				<p class="description"><?php _e( 'Select which forms to export. Leave all checkboxes unchecked to export all of your forms.' , 'yikes-inc-easy-mailchimp-extender' ); ?></p>
26
-				<?php foreach( $all_forms as $id => $form ) { ?>
27
-					<li><label><input type="checkbox" name="yikes_export_forms[]" value="<?php echo (int) $id; ?>"><?php echo esc_html( $form['form_name'] ); ?></label></li>
25
+				<p class="description"><?php _e( 'Select which forms to export. Leave all checkboxes unchecked to export all of your forms.', 'yikes-inc-easy-mailchimp-extender' ); ?></p>
26
+				<?php foreach ( $all_forms as $id => $form ) { ?>
27
+					<li><label><input type="checkbox" name="yikes_export_forms[]" value="<?php echo (int) $id; ?>"><?php echo esc_html( $form[ 'form_name' ] ); ?></label></li>
28 28
 				<?php } ?>
29 29
 			</ul>
30 30
 		<?php } ?>
31 31
 		<!-- check if any of our transients contain data -->
32
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Opt-in Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
32
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Opt-in Forms', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
33 33
 	</form>
34 34
 	
35 35
 	<hr />
36 36
 	
37 37
 	<!-- Export Form -->
38
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-settings' , 'nonce' => wp_create_nonce( 'export-settings' ) ) ) ); ?>" method="post">
39
-		<p><strong><?php _e( "Export Settings" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
38
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-export-settings', 'nonce' => wp_create_nonce( 'export-settings' ) ) ) ); ?>" method="post">
39
+		<p><strong><?php _e( "Export Settings", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
40 40
 		<p class="description">
41
-			<?php _e( "Export YIKES Easy Forms for MailChimp plugin settings." , 'yikes-inc-easy-mailchimp-extender' ); ?>
41
+			<?php _e( "Export YIKES Easy Forms for MailChimp plugin settings.", 'yikes-inc-easy-mailchimp-extender' ); ?>
42 42
 		</p>
43 43
 
44 44
 		<!-- check if any of our transients contain data -->
45
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Plugin Settings' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
45
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Export Plugin Settings', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
46 46
 	</form>
47 47
 	
48 48
 	<hr />
49 49
 	
50 50
 	<!-- Import Form -->
51
-	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-import-forms' , 'nonce' => wp_create_nonce( 'import-forms' ) ) ) ); ?>" method="post" enctype="multipart/form-data">
52
-		<p><strong><?php _e( "Import" , 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
51
+	<form action="<?php echo esc_url_raw( add_query_arg( array( 'action' => 'yikes-easy-mc-import-forms', 'nonce' => wp_create_nonce( 'import-forms' ) ) ) ); ?>" method="post" enctype="multipart/form-data">
52
+		<p><strong><?php _e( "Import", 'yikes-inc-easy-mailchimp-extender' ); ?></strong></p>
53 53
 		<p class="description">
54
-			<?php _e( "Select the Easy Forms for MailChimp export file you would like to import. You can use this field to import your opt-in forms or settings. " , 'yikes-inc-easy-mailchimp-extender' ); ?>
54
+			<?php _e( "Select the Easy Forms for MailChimp export file you would like to import. You can use this field to import your opt-in forms or settings. ", 'yikes-inc-easy-mailchimp-extender' ); ?>
55 55
 		</p>
56 56
 		<label>
57 57
 			<input type="file" name="csv" id="forms_to_import">
58 58
 		</label>
59 59
 		<!-- check if any of our transients contain data -->
60
-		<p><input type="submit" class="button-primary" value="<?php _e( 'Import' , 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
60
+		<p><input type="submit" class="button-primary" value="<?php _e( 'Import', 'yikes-inc-easy-mailchimp-extender' ); ?>" /></p>
61 61
 	</form>
62 62
 	
63 63
 </div> <!-- .inside -->
Please login to merge, or discard this patch.
classes/checkbox-integrations/class.woocommerce_checkout_form-checkbox.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
 		$checkbox_options = get_option( 'optin-checkbox-init', array() );
65 65
 
66 66
 		// Only display the field if a list is set.
67
-		if ( isset( $checkbox_options[ $this->type ] ) && isset( $checkbox_options[ $this->type ]['associated-list'] ) && '-' !== $checkbox_options[ $this->type ]['associated-list'] ) {
67
+		if ( isset( $checkbox_options[ $this->type ] ) && isset( $checkbox_options[ $this->type ][ 'associated-list' ] ) && '-' !== $checkbox_options[ $this->type ][ 'associated-list' ] ) {
68 68
 
69 69
 			if ( $this->is_user_already_subscribed( $this->type ) ) {
70 70
 				return $fields;
71 71
 			}
72 72
 
73
-			$precheck = isset( $checkbox_options[ $this->type ]['precheck'] ) && 'true' === $checkbox_options[ $this->type ]['precheck'] ? '1' : '0';
73
+			$precheck = isset( $checkbox_options[ $this->type ][ 'precheck' ] ) && 'true' === $checkbox_options[ $this->type ][ 'precheck' ] ? '1' : '0';
74 74
 
75 75
 			/**
76 76
 			* Filter where the checkbox goes.
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 				'id'      => 'yikes_mailchimp_checkbox_' . $this->type,
86 86
 				'type'    => 'checkbox',
87 87
 				'class'   => apply_filters( 'yikes-mailchimp-wooco-integration-checkbox-classes', array( 'form-row-wide' ) ),
88
-				'label'   => $checkbox_options[ $this->type ]['label'],
88
+				'label'   => $checkbox_options[ $this->type ][ 'label' ],
89 89
 				'default' => $precheck,
90 90
 			);
91 91
 
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
 			$precheck = isset( $checkbox_options[ $this->type ]['precheck'] ) && 'true' === $checkbox_options[ $this->type ]['precheck'] ? '1' : '0';
73 73
 
74 74
 			/**
75
-			* Filter where the checkbox goes.
76
-			*
77
-			* See this WooCo article for possible values: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
78
-			*
79
-			* @param string | Which set of fields the checkbox should go into
80
-			*/
75
+			 * Filter where the checkbox goes.
76
+			 *
77
+			 * See this WooCo article for possible values: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
78
+			 *
79
+			 * @param string | Which set of fields the checkbox should go into
80
+			 */
81 81
 			$field_placement = apply_filters( 'yikes-mailchimp-wooco-integration-checkbox-placement', 'billing' );
82 82
 
83 83
 			$yikes_checkbox = array(
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
 			);
90 90
 
91 91
 			/**
92
-			* Filter the checkbox data.
93
-			*
94
-			* See this WooCo article for possible values: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
95
-			*
96
-			* @param  array $yikes_checkbox The checkbox's fields.
97
-			* @return array $yikes_checkbox The checkbox's fields.
98
-			*/
92
+			 * Filter the checkbox data.
93
+			 *
94
+			 * See this WooCo article for possible values: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
95
+			 *
96
+			 * @param  array $yikes_checkbox The checkbox's fields.
97
+			 * @return array $yikes_checkbox The checkbox's fields.
98
+			 */
99 99
 			$yikes_checkbox = apply_filters( 'yikes_mailchimp_wooco_integration_checkbox_field', $yikes_checkbox, $checkbox_options[ $this->type ] );
100 100
 
101 101
 			$fields[ $field_placement ][ 'yikes_mailchimp_checkbox_' . $this->type ] = $yikes_checkbox;
Please login to merge, or discard this patch.
class.easy_digital_downloads_checkout_form-checkbox.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,11 +80,11 @@
 block discarded – undo
80 80
 
81 81
 		$user_info  = (array) edd_get_payment_meta_user_info( $payment_id );
82 82
 		$merge_vars = array();
83
-		if ( isset( $user_info['first_name'] ) ) {
84
-			$merge_vars['FNAME'] = $user_info['first_name'];
83
+		if ( isset( $user_info[ 'first_name' ] ) ) {
84
+			$merge_vars[ 'FNAME' ] = $user_info[ 'first_name' ];
85 85
 		}
86
-		if ( isset( $user_info['last_name'] ) ) {
87
-			$merge_vars['LNAME'] = $user_info['last_name'];
86
+		if ( isset( $user_info[ 'last_name' ] ) ) {
87
+			$merge_vars[ 'LNAME' ] = $user_info[ 'last_name' ];
88 88
 		}
89 89
 
90 90
 		// Subscribe the user.
Please login to merge, or discard this patch.
public/classes/checkbox-integrations/class.comment_form-checkbox.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,12 +75,12 @@
 block discarded – undo
75 75
 
76 76
 		// Create merge variables based on comment data.
77 77
 		$merge_vars = array(
78
-			'FNAME'    => $comment_data['comment_author'],
79
-			'OPTIN_IP' => $comment_data['comment_author_IP'],
78
+			'FNAME'    => $comment_data[ 'comment_author' ],
79
+			'OPTIN_IP' => $comment_data[ 'comment_author_IP' ],
80 80
 		);
81 81
 
82 82
 		// Subscribe the user.
83
-		$this->subscribe_user_integration( $comment_data['comment_author_email'], $this->type, $merge_vars );
83
+		$this->subscribe_user_integration( $comment_data[ 'comment_author_email' ], $this->type, $merge_vars );
84 84
 	}
85 85
 }
86 86
 $yikes_easy_mc_comment_checkbox_class = new Yikes_Easy_MC_Comment_Checkbox_Class();
Please login to merge, or discard this patch.
public/classes/checkbox-integrations/class.contact_form_7-checkbox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @return array $data CF7 posted data.
49 49
 	 */
50 50
 	public function alter_cf7_data( $data = array() ) {
51
-		$data['yikes_mailchimp_checkbox'] = $this->was_checkbox_checked( $this->type ) ? __( 'Yes', 'yikes-inc-easy-mailchimp-extender' ) : __( 'No', 'yikes-inc-easy-mailchimp-extender' );
51
+		$data[ 'yikes_mailchimp_checkbox' ] = $this->was_checkbox_checked( $this->type ) ? __( 'Yes', 'yikes-inc-easy-mailchimp-extender' ) : __( 'No', 'yikes-inc-easy-mailchimp-extender' );
52 52
 		return $data;
53 53
 	}
54 54
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		$submission          = WPCF7_Submission::get_instance();
66 66
 		if ( $submission ) {
67 67
 			$data   = $submission->get_posted_data();
68
-			$email  = isset( $data['your-email'] ) ? $data['your-email'] : '';
68
+			$email  = isset( $data[ 'your-email' ] ) ? $data[ 'your-email' ] : '';
69 69
 			$fields = array( 'email' => $email );
70 70
 			$this->subscribe_user_integration( $email, $this->type, apply_filters( 'yikes-mailchimp-contact-form-7', $fields, $data ) );
71 71
 		}
Please login to merge, or discard this patch.
blocks/api/api.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 			wp_send_json_error( '1' );
41 41
 		}
42 42
 
43
-		$form_id = isset( $_POST['form_id'] ) ? filter_var( wp_unslash( $_POST['form_id'] ), FILTER_SANITIZE_NUMBER_INT ) : '';
43
+		$form_id = isset( $_POST[ 'form_id' ] ) ? filter_var( wp_unslash( $_POST[ 'form_id' ] ), FILTER_SANITIZE_NUMBER_INT ) : '';
44 44
 
45 45
 		if ( empty( $form_id ) ) {
46 46
 			wp_send_json_error( '1' );
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
 
76 76
 			$locale   = get_locale();
77 77
 			$locale_a = explode( '_', $locale );
78
-			$locale   = isset( $locale_a[0] ) ? $locale_a[0] : $locale;
78
+			$locale   = isset( $locale_a[ 0 ] ) ? $locale_a[ 0 ] : $locale;
79 79
 			$return   = apply_filters( 'yikes_mailchimp_recaptcha_data', array(
80 80
 				'site_key'   => $site_key,
81 81
 				'secret_key' => $secret_key,
82 82
 				'locale'     => $locale,
83
-			));
83
+			) );
84 84
 
85 85
 			wp_send_json_success( $return );
86 86
 		}
Please login to merge, or discard this patch.
blocks/blocks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	public function register_blocks() {
43 43
 		register_block_type( static::BLOCK_NAMESPACE . static::BLOCK, array(
44 44
 			'render_callback' => array( $this, 'render_block' ),
45
-		));
45
+		) );
46 46
 	}
47 47
 
48 48
 	/**
Please login to merge, or discard this patch.
blocks/easy-forms-block/easy-forms-block.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -65,29 +65,29 @@
 block discarded – undo
65 65
 	 */
66 66
 	public function render_block( $attributes, $content ) {
67 67
 
68
-		if ( ! isset( $attributes['form_id'] ) ) {
68
+		if ( ! isset( $attributes[ 'form_id' ] ) ) {
69 69
 			return;
70 70
 		}
71 71
 
72 72
 		$shortcode_attributes = array(
73
-			'form'                       => $attributes['form_id'],
74
-			'submit'                     => isset( $attributes['submit_button_text'] ) && ! empty( $attributes['submit_button_text'] ) ? $attributes['submit_button_text'] : '',
75
-			'title'                      => isset( $attributes['show_title'] ) && true === $attributes['show_title'] ? '1' : '0',
76
-			'custom_title'               => isset( $attributes['form_title'] ) ? $attributes['form_title'] : '',
77
-			'description'                => isset( $attributes['show_description'] ) && true === $attributes['show_description'] ? '1' : '0',
78
-			'custom_description'         => isset( $attributes['form_description'] ) ? $attributes['form_description'] : '',
79
-			'ajax'                       => isset( $attributes['is_ajax'] ) && true === $attributes['is_ajax'] ? '1' : '0',
80
-			'recaptcha'                  => isset( $attributes['recaptcha'] ) && false === $attributes['recaptcha'] ? '0' : '',
81
-			'recaptcha_lang'             => isset( $attributes['recaptcha_lang'] ) ? $attributes['recaptcha_lang'] : '',
82
-			'recaptcha_type'             => isset( $attributes['recaptcha_type'] ) ? $attributes['recaptcha_type'] : '',
83
-			'recaptcha_theme'            => isset( $attributes['recaptcha_theme'] ) ? $attributes['recaptcha_theme'] : '',
84
-			'recaptcha_size'             => isset( $attributes['recaptcha_size'] ) ? $attributes['recaptcha_size'] : '',
85
-			'recaptcha_data_callback'    => isset( $attributes['recaptcha_verify_callback'] ) ? $attributes['recaptcha_verify_callback'] : '',
86
-			'recaptcha_expired_callback' => isset( $attributes['recaptcha_expired_callback'] ) ? $attributes['recaptcha_expired_callback'] : '',
87
-			'inline'                     => isset( $attributes['inline'] ) && true === $attributes['inline'] ? '1' : '0',
73
+			'form'                       => $attributes[ 'form_id' ],
74
+			'submit'                     => isset( $attributes[ 'submit_button_text' ] ) && ! empty( $attributes[ 'submit_button_text' ] ) ? $attributes[ 'submit_button_text' ] : '',
75
+			'title'                      => isset( $attributes[ 'show_title' ] ) && true === $attributes[ 'show_title' ] ? '1' : '0',
76
+			'custom_title'               => isset( $attributes[ 'form_title' ] ) ? $attributes[ 'form_title' ] : '',
77
+			'description'                => isset( $attributes[ 'show_description' ] ) && true === $attributes[ 'show_description' ] ? '1' : '0',
78
+			'custom_description'         => isset( $attributes[ 'form_description' ] ) ? $attributes[ 'form_description' ] : '',
79
+			'ajax'                       => isset( $attributes[ 'is_ajax' ] ) && true === $attributes[ 'is_ajax' ] ? '1' : '0',
80
+			'recaptcha'                  => isset( $attributes[ 'recaptcha' ] ) && false === $attributes[ 'recaptcha' ] ? '0' : '',
81
+			'recaptcha_lang'             => isset( $attributes[ 'recaptcha_lang' ] ) ? $attributes[ 'recaptcha_lang' ] : '',
82
+			'recaptcha_type'             => isset( $attributes[ 'recaptcha_type' ] ) ? $attributes[ 'recaptcha_type' ] : '',
83
+			'recaptcha_theme'            => isset( $attributes[ 'recaptcha_theme' ] ) ? $attributes[ 'recaptcha_theme' ] : '',
84
+			'recaptcha_size'             => isset( $attributes[ 'recaptcha_size' ] ) ? $attributes[ 'recaptcha_size' ] : '',
85
+			'recaptcha_data_callback'    => isset( $attributes[ 'recaptcha_verify_callback' ] ) ? $attributes[ 'recaptcha_verify_callback' ] : '',
86
+			'recaptcha_expired_callback' => isset( $attributes[ 'recaptcha_expired_callback' ] ) ? $attributes[ 'recaptcha_expired_callback' ] : '',
87
+			'inline'                     => isset( $attributes[ 'inline' ] ) && true === $attributes[ 'inline' ] ? '1' : '0',
88 88
 		);
89 89
 
90 90
 		// We want to run process_mailchimp_shortcode() but we need to return the plaintext shortcode or Gutenberg will autop() the shortcode content.
91
-		return '[yikes-mailchimp form="' . $shortcode_attributes['form'] . '" submit="' . $shortcode_attributes['submit'] . '" title="' . $shortcode_attributes['title'] . '" custom_title="' . $shortcode_attributes['custom_title'] . '" description="' . $shortcode_attributes['description'] . '" custom_description="' . $shortcode_attributes['custom_description'] . '" ajax="' . $shortcode_attributes['ajax'] . '" recaptcha="' . $shortcode_attributes['recaptcha'] . '"  recaptcha_lang="' . $shortcode_attributes['recaptcha_lang'] . '" recaptcha_type="' . $shortcode_attributes['recaptcha_type'] . '" recaptcha_theme="' . $shortcode_attributes['recaptcha_theme'] . '" recaptcha_size="' . $shortcode_attributes['recaptcha_size'] . '" recaptcha_data_callback="' . $shortcode_attributes['recaptcha_data_callback'] . '" recaptcha_expired_callback="' . $shortcode_attributes['recaptcha_expired_callback'] . '" inline="' . $shortcode_attributes['inline'] . '"]';
91
+		return '[yikes-mailchimp form="' . $shortcode_attributes[ 'form' ] . '" submit="' . $shortcode_attributes[ 'submit' ] . '" title="' . $shortcode_attributes[ 'title' ] . '" custom_title="' . $shortcode_attributes[ 'custom_title' ] . '" description="' . $shortcode_attributes[ 'description' ] . '" custom_description="' . $shortcode_attributes[ 'custom_description' ] . '" ajax="' . $shortcode_attributes[ 'ajax' ] . '" recaptcha="' . $shortcode_attributes[ 'recaptcha' ] . '"  recaptcha_lang="' . $shortcode_attributes[ 'recaptcha_lang' ] . '" recaptcha_type="' . $shortcode_attributes[ 'recaptcha_type' ] . '" recaptcha_theme="' . $shortcode_attributes[ 'recaptcha_theme' ] . '" recaptcha_size="' . $shortcode_attributes[ 'recaptcha_size' ] . '" recaptcha_data_callback="' . $shortcode_attributes[ 'recaptcha_data_callback' ] . '" recaptcha_expired_callback="' . $shortcode_attributes[ 'recaptcha_expired_callback' ] . '" inline="' . $shortcode_attributes[ 'inline' ] . '"]';
92 92
 	}
93 93
 }
Please login to merge, or discard this patch.