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

Feature: Single Send Enhancements #153

Merged
merged 13 commits into from
Jun 24, 2024
Prev Previous commit
Next Next commit
Change preview markup to work with SendGrid
Add in a todo that will allow for different markup as each provider requirements vary
efuller committed Jun 21, 2024
commit bea44c0b320dbfaa950774ba90b5ebbd60cba937
10 changes: 7 additions & 3 deletions single-nb_newsletter.php
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
newrelic_disable_autorum();
}

$wp_newsletter_builder_preview = get_post_meta( get_the_ID(), 'nb_newsletter_preview', true );
$wp_newsletter_builder_preview = get_post_meta( get_queried_object_id(), 'nb_newsletter_preview', true );
efuller marked this conversation as resolved.
Show resolved Hide resolved
?>
<!doctype html>

@@ -35,8 +35,12 @@
<!--[if !mso]><!-->
<body class="main">
<!--<![endif]-->
<?php if ( ! empty( $wp_newsletter_builder_preview ) ) : ?>
<div style="display:none;"><?php echo esc_html( $wp_newsletter_builder_preview ); ?></div>
<?php
/**
* TODO: Add in a way to allow for custom preview markup as each provider has different requirements.
*/
if ( ! empty( $wp_newsletter_builder_preview ) ) : ?>
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;"><?php echo esc_html( $wp_newsletter_builder_preview ); ?></span>
<?php endif; ?>
<table class="wrapper" cellpadding="0" cellspacing="0" role="presentation">
<tbody>