Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure consistent header and sub header spacing between block and shortcode output #41

Merged
merged 4 commits into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions mailchimp_widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ function mailchimp_sf_signup_form( $args = array() ) {

// See if we have valid Merge Vars
if ( ! is_array( $mv ) ) {
echo wp_kses_post( $before_widget );
if ( ! empty( $before_widget ) ) {
echo wp_kses_post( $before_widget );
} else {
echo '<div class="mc_container">';
}
?>
<div class="mc_error_msg">
<?php
Expand All @@ -39,12 +43,21 @@ function mailchimp_sf_signup_form( $args = array() ) {
?>
</div>
<?php
echo wp_kses_post( $after_widget );
if ( ! empty( $after_widget ) ) {
echo wp_kses_post( $after_widget );
}

if ( empty( $before_widget ) ) {
echo '</div>';
}

return;
}

if ( ! empty( $before_widget ) ) {
echo wp_kses_post( $before_widget );
} else {
echo '<div class="mc_container">';
}

$header = get_option( 'mc_header_content' );
Expand Down Expand Up @@ -72,7 +85,7 @@ function mailchimp_sf_signup_form( $args = array() ) {
}
#mc_subheader {
line-height: 1.25em;
margin-bottom: 18px;
margin: 18px 0;
}
.mc_merge_var {
margin-bottom: 1.0em;
Expand Down Expand Up @@ -275,6 +288,10 @@ function mailchimp_sf_signup_form( $args = array() ) {
if ( ! empty( $after_widget ) ) {
echo wp_kses_post( $after_widget );
}

if ( empty( $before_widget ) ) {
echo '</div>';
}
}

/**
Expand Down
Loading