| 1 |
<?php |
| 2 |
|
| 3 |
$obj_template_data = $args['obj_template_data'] ?? null; |
| 4 |
$iframe_preview = $args['iframe_preview'] ?? false; |
| 5 |
$body_inline_styles = ''; |
| 6 |
if ( $obj_template_data->is_preview() && !$iframe_preview ) { |
| 7 |
?> |
| 8 |
<div class="sue-pro-wrap"> |
| 9 |
<div class="sue-pro-upgrade-banner" style="margin-bottom: 40px;"> |
| 10 |
<div class="sue-banner-text"> |
| 11 |
<h3><?php |
| 12 |
esc_attr_e( 'You are using the free version', 'send-users-email' ); |
| 13 |
?></h3> |
| 14 |
<p><?php |
| 15 |
esc_attr_e( 'Upgrade to PRO to preview and use prebuilt templates — or use your own HTML template.', 'send-users-email' ); |
| 16 |
?></p> |
| 17 |
</div> |
| 18 |
<a class="btn-upgrade" href="<?php |
| 19 |
echo esc_url( sue_fs()->get_upgrade_url() ); |
| 20 |
?>" role="button"> |
| 21 |
<?php |
| 22 |
esc_attr_e( 'Upgrade to PRO', 'send-users-email' ); |
| 23 |
?> |
| 24 |
</a> |
| 25 |
</div> |
| 26 |
|
| 27 |
<h3 class="sue-plain-text-heading"><?php |
| 28 |
esc_attr_e( 'Email Plain Text Preview:', 'send-users-email' ); |
| 29 |
?></h3> |
| 30 |
</div> |
| 31 |
<?php |
| 32 |
} |
| 33 |
?> |
| 34 |
|
| 35 |
|
| 36 |
<?php |
| 37 |
/** |
| 38 |
* @var $logo |
| 39 |
* @var $styles |
| 40 |
* @var $title |
| 41 |
* @var $tagline |
| 42 |
* @var $email_body |
| 43 |
* @var $footer |
| 44 |
* @var $social |
| 45 |
*/ |
| 46 |
?> |
| 47 |
<!DOCTYPE html> |
| 48 |
<html lang="en" dir="auto" class="email-content"> |
| 49 |
<head> |
| 50 |
<title><?php |
| 51 |
bloginfo( 'name' ); |
| 52 |
?></title> |
| 53 |
<meta charset="UTF-8"/> |
| 54 |
|
| 55 |
<style type="text/css"> |
| 56 |
body { |
| 57 |
font-family: sans-serif; |
| 58 |
} |
| 59 |
p { |
| 60 |
font-family: sans-serif; |
| 61 |
} |
| 62 |
.sue-logo td { |
| 63 |
text-align: center; |
| 64 |
} |
| 65 |
|
| 66 |
.sue-logo img { |
| 67 |
max-height: 75px; |
| 68 |
} |
| 69 |
|
| 70 |
.sue-title { |
| 71 |
text-align: center; |
| 72 |
} |
| 73 |
|
| 74 |
.sue-tagline { |
| 75 |
text-align: center; |
| 76 |
} |
| 77 |
|
| 78 |
.sue-footer td { |
| 79 |
text-align: center; |
| 80 |
padding-top: 30px; |
| 81 |
} |
| 82 |
|
| 83 |
.sue-footer-social td { |
| 84 |
text-align: center; |
| 85 |
padding-top: 30px; |
| 86 |
} |
| 87 |
|
| 88 |
.aligncenter { |
| 89 |
display: block; |
| 90 |
margin-left: auto !important; |
| 91 |
margin-right: auto !important; |
| 92 |
} |
| 93 |
|
| 94 |
.alignleft { |
| 95 |
float: left; |
| 96 |
margin-inline-start: 0; |
| 97 |
margin-inline-end: 2em; |
| 98 |
} |
| 99 |
|
| 100 |
.alignright { |
| 101 |
float: right; |
| 102 |
margin-inline-start: 2em; |
| 103 |
margin-inline-end: 0; |
| 104 |
} |
| 105 |
</style> |
| 106 |
|
| 107 |
<?php |
| 108 |
if ( $obj_template_data && $obj_template_data->get_email_styles() ) { |
| 109 |
?> |
| 110 |
<style> |
| 111 |
<?php |
| 112 |
echo stripslashes_deep( wp_strip_all_tags( $obj_template_data->get_email_styles() ) ); |
| 113 |
?> |
| 114 |
</style> |
| 115 |
<?php |
| 116 |
} |
| 117 |
?> |
| 118 |
|
| 119 |
</head> |
| 120 |
|
| 121 |
<?php |
| 122 |
?> |
| 123 |
<body class="sue-email-template-" style="<?php |
| 124 |
echo $body_inline_styles; |
| 125 |
?>"> |
| 126 |
<?php |
| 127 |
?> |
| 128 |
|
| 129 |
<table class="sue-main-table"> |
| 130 |
<?php |
| 131 |
if ( $obj_template_data && $obj_template_data->get_email_logo() ) { |
| 132 |
?> |
| 133 |
<tr class="sue-logo"> |
| 134 |
<td> |
| 135 |
<img src="<?php |
| 136 |
echo esc_url_raw( $obj_template_data->get_email_logo() ); |
| 137 |
?>" alt="<?php |
| 138 |
bloginfo( 'name' ); |
| 139 |
?>"/> |
| 140 |
</td> |
| 141 |
</tr> |
| 142 |
<?php |
| 143 |
} |
| 144 |
?> |
| 145 |
|
| 146 |
<?php |
| 147 |
if ( $obj_template_data && $obj_template_data->get_email_title() || $obj_template_data && $obj_template_data->get_email_tagline() ) { |
| 148 |
?> |
| 149 |
<tr class="sue-title-tagline"> |
| 150 |
<td> |
| 151 |
<?php |
| 152 |
if ( $obj_template_data && $obj_template_data->get_email_title() ) { |
| 153 |
?> |
| 154 |
<h2 class="sue-title"><?php |
| 155 |
echo esc_html( stripslashes_deep( $obj_template_data->get_email_title() ) ); |
| 156 |
?></h2> |
| 157 |
<?php |
| 158 |
} |
| 159 |
?> |
| 160 |
|
| 161 |
<?php |
| 162 |
if ( $obj_template_data && $obj_template_data->get_email_tagline() ) { |
| 163 |
?> |
| 164 |
<h5 class="sue-tagline"><?php |
| 165 |
echo esc_html( stripslashes_deep( $obj_template_data->get_email_tagline() ) ); |
| 166 |
?></h5> |
| 167 |
<?php |
| 168 |
} |
| 169 |
?> |
| 170 |
</td> |
| 171 |
</tr> |
| 172 |
<?php |
| 173 |
} |
| 174 |
?> |
| 175 |
|
| 176 |
<tr class="sue-email-body"> |
| 177 |
<td> |
| 178 |
<?php |
| 179 |
if ( $obj_template_data && $obj_template_data->get_email_body() ) { |
| 180 |
?> |
| 181 |
<?php |
| 182 |
echo $obj_template_data->get_email_body(); |
| 183 |
?> |
| 184 |
<?php |
| 185 |
} |
| 186 |
?> |
| 187 |
</td> |
| 188 |
</tr> |
| 189 |
|
| 190 |
<?php |
| 191 |
if ( $obj_template_data && $obj_template_data->get_email_footer() ) { |
| 192 |
?> |
| 193 |
<tr class="sue-footer"> |
| 194 |
<td> |
| 195 |
<?php |
| 196 |
echo stripslashes_deep( $obj_template_data->get_email_footer() ); |
| 197 |
?> |
| 198 |
</td> |
| 199 |
</tr> |
| 200 |
<?php |
| 201 |
} |
| 202 |
?> |
| 203 |
|
| 204 |
<?php |
| 205 |
if ( $obj_template_data && !empty( $obj_template_data->get_email_social_links() ) ) { |
| 206 |
?> |
| 207 |
<tr class="sue-footer-social"> |
| 208 |
<td> |
| 209 |
<?php |
| 210 |
$obj_template_data->display_social_links(); |
| 211 |
?> |
| 212 |
</td> |
| 213 |
</tr> |
| 214 |
<?php |
| 215 |
} |
| 216 |
?> |
| 217 |
</table> |
| 218 |
|
| 219 |
</body> |
| 220 |
</html> |
| 221 |
|