Files
piratepoet/lib/Newsletter/Renderer/Blocks/Social.php
Pavel Dohnal ff4d5be38a Add a non breaking space
Instead of a normal space that has been removed by outlook I added a non breaking space

[MAILPOET-1827]
2019-03-27 09:45:21 -04:00

36 lines
1.1 KiB
PHP

<?php
namespace MailPoet\Newsletter\Renderer\Blocks;
class Social {
static function render($element) {
$icons_block = '';
if (is_array($element['icons'])) {
foreach ($element['icons'] as $index => $icon) {
if (empty($icon['image'])) {
continue;
}
$icons_block .= '<a
href="' . $icon['link'] . '" style="text-decoration:none!important;"
><img
src="' . $icon['image'] . '"
width="' . (int)$icon['width'] . '"
height="' . (int)$icon['height'] . '"
style="width:' . $icon['width'] . ';height:' . $icon['width'] . ';-ms-interpolation-mode:bicubic;border:0;display:inline;outline:none;"
alt="' . $icon['iconType'] . '"
></a>&nbsp;';
}
}
$alignment = isset($element['styles']['block']['textAlign']) ? $element['styles']['block']['textAlign'] : 'center';
if (!empty($icons_block)) {
$template = '
<tr>
<td class="mailpoet_padded_side mailpoet_padded_bottom" valign="top" align="'. $alignment . '">
' . $icons_block . '
</td>
</tr>';
return $template;
}
}
}