AbandonedCartContent.php
1 year ago
AutomatedLatestContentBlock.php
3 years ago
Button.php
1 year ago
Coupon.php
3 years ago
Divider.php
2 years ago
DynamicProductsBlock.php
11 months ago
Footer.php
2 months ago
Header.php
2 months ago
Image.php
3 years ago
Placeholder.php
4 years ago
Renderer.php
2 months ago
Social.php
2 months ago
Spacer.php
3 years ago
Text.php
2 months ago
index.php
3 years ago
Spacer.php
23 lines
| 1 | <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing |
| 2 | |
| 3 | namespace MailPoet\Newsletter\Renderer\Blocks; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\Newsletter\Renderer\EscapeHelper as EHelper; |
| 9 | |
| 10 | class Spacer { |
| 11 | public function render($element) { |
| 12 | $height = (int)$element['styles']['block']['height']; |
| 13 | $backgroundColor = EHelper::escapeHtmlAttr($element['styles']['block']['backgroundColor']); |
| 14 | $template = ' |
| 15 | <tr> |
| 16 | <td class="mailpoet_spacer" ' . |
| 17 | (($backgroundColor !== 'transparent') ? 'bgcolor="' . $backgroundColor . '" ' : '') . |
| 18 | 'height="' . $height . '" valign="top"></td> |
| 19 | </tr>'; |
| 20 | return $template; |
| 21 | } |
| 22 | } |
| 23 |