- Adds background color to spacer
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user