- Adds background color to spacer
This commit is contained in:
@ -3,9 +3,13 @@ namespace MailPoet\Newsletter\Renderer\Blocks;
|
|||||||
|
|
||||||
class Spacer {
|
class Spacer {
|
||||||
static function render($element) {
|
static function render($element) {
|
||||||
|
$height = $element['styles']['block']['height'];
|
||||||
|
$background_color = $element['styles']['block']['backgroundColor'];
|
||||||
$template = '
|
$template = '
|
||||||
<tr>
|
<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>';
|
</tr>';
|
||||||
return $template;
|
return $template;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user