Skip to content

Commit dd812f2

Browse files
committed
Update markup.php for the PR #130 and removed leftover code.
1 parent 75ad39b commit dd812f2

File tree

1 file changed

+4
-35
lines changed

1 file changed

+4
-35
lines changed

includes/blocks/mailchimp/markup.php

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ function ( $single_list ) {
4343
$sub_heading = $attributes['sub_header'] ?? '';
4444
$submit_text = $attributes['submit_text'] ?? __( 'Subscribe', 'mailchimp' );
4545
$merge_fields = get_option( 'mailchimp_sf_merge_fields_' . $list_id );
46-
$igs = get_option( 'mailchimp_sf_interest_groups_' . $list_id );
47-
$interest_groups_visibility = $attributes['interest_groups_visibility'] ?? array();
4846
$show_unsubscribe_link = $attributes['show_unsubscribe_link'] ?? get_option( 'mc_use_unsub_link' ) === 'on';
4947
$unsubscribe_link_text = $attributes['unsubscribe_link_text'] ?? __( 'unsubscribe from list', 'mailchimp' );
5048
$update_existing_subscribers = ( $attributes['update_existing_subscribers'] ?? get_option( 'mc_update_existing' ) === 'on' ) ? 'yes' : 'no';
@@ -192,8 +190,8 @@ function ( $single_list ) {
192190
}
193191
?>
194192
<div id="mc_signup">
195-
<form method="post" action="#mc_signup" id="mc_signup_form">
196-
<input type="hidden" id="mc_submit_type" name="mc_submit_type" value="html" />
193+
<form method="post" action="#mc_signup" id="mc_signup_form" class="mc_signup_form">
194+
<input type="hidden" id="mc_submit_type" class="mc_submit_type" name="mc_submit_type" value="html" />
197195
<input type="hidden" name="mcsf_action" value="mc_submit_signup_form" />
198196
<input type="hidden" name="mailchimp_sf_list_id" value="<?php echo esc_attr( $list_id ); ?>" />
199197
<input type="hidden" name="mailchimp_sf_update_existing_subscribers" value="<?php echo esc_attr( $update_existing_subscribers ); ?>" />
@@ -203,7 +201,7 @@ function ( $single_list ) {
203201
wp_nonce_field( 'mc_submit_signup_form', '_mc_submit_signup_form_nonce', false );
204202
?>
205203
<div class="mc_form_inside">
206-
<div id="mc_message">
204+
<div class="mc_message_wrapper" id="mc_message">
207205
<?php echo wp_kses_post( mailchimp_sf_global_msg() ); ?>
208206
</div>
209207

@@ -219,35 +217,6 @@ function ( $single_list ) {
219217
*/
220218
echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
221219

222-
// Show our Interest groups fields if we have them, and they're set to on
223-
if ( is_array( $igs ) && ! empty( $igs ) ) {
224-
foreach ( $igs as $ig ) {
225-
if ( is_array( $ig ) && isset( $ig['id'] ) ) {
226-
if ( ( $igs && isset( $interest_groups_visibility[ $ig['id'] ] ) && 'on' === $interest_groups_visibility[ $ig['id'] ] ) ) {
227-
if ( 'hidden' !== $ig['type'] ) {
228-
?>
229-
<div class="mc_interests_header">
230-
<?php echo esc_html( $ig['title'] ); ?>
231-
</div><!-- /mc_interests_header -->
232-
<div class="mc_interest">
233-
<?php
234-
} else {
235-
?>
236-
<div class="mc_interest" style="display: none;">
237-
<?php
238-
}
239-
?>
240-
241-
<?php
242-
mailchimp_interest_group_field( $ig );
243-
?>
244-
</div><!-- /mc_interest -->
245-
<?php
246-
}
247-
}
248-
}
249-
}
250-
251220
// Show an explanation of the * if there's more than one field
252221
if ( $show_required_indicator ) {
253222
?>
@@ -258,7 +227,7 @@ function ( $single_list ) {
258227
}
259228
?>
260229
<div class="mc_signup_submit">
261-
<input type="submit" name="mc_signup_submit" id="mc_signup_submit" value="<?php echo esc_attr( $submit_text ); ?>" class="button" />
230+
<input type="submit" name="mc_signup_submit" class="mc_signup_submit_button" id="mc_signup_submit" value="<?php echo esc_attr( $submit_text ); ?>" class="button" />
262231
</div><!-- /mc_signup_submit -->
263232

264233
<?php

0 commit comments

Comments
 (0)