- Adds background color to spacer

This commit is contained in:
Vlad
2016-02-25 11:31:38 -05:00
parent 11e15659ac
commit f9028d28c0

View File

@ -3,9 +3,13 @@ namespace MailPoet\Newsletter\Renderer\Blocks;
class Spacer {
static function render($element) {
$height = $element['styles']['block']['height'];
$background_color = $element['styles']['block']['backgroundColor'];
$template = '
<tr>
<td class="mailpoet_spacer" height="' . (int) $element['styles']['block']['height'] . '" valign="top"></td>
<td class="mailpoet_spacer" ' .
(($background_color !== 'transparent') ? 'bgcolor="' . $background_color . '" ' : ' ') .
'height="' . $height . '" valign="top"></td>
</tr>';
return $template;
}