Refactors Newsletters as per @badshark's comments

This commit is contained in:
MrCasual
2015-09-21 13:18:01 -04:00
parent 692e69d567
commit 01b5416882
23 changed files with 462 additions and 413 deletions

View File

@@ -0,0 +1,28 @@
<?php namespace MailPoet\Newsletter\Renderer\Blocks;
class Social {
static function render($element) {
$iconsBlock = '';
if(is_array($element['icons'])) {
foreach ($element['icons'] as $icon) {
$iconsBlock .= '
<a href="' . $icon['link'] . '">
<img src="' . $icon['image'] . '" width = "32" height = "32" style="width: 32px; height: 32px;" alt="' . $icon['iconType'] . '">
</a>
<img src="http://mp3.mailpoet.net/spacer.gif" width = "10" height = "1" style=" width: 10px; height: 1px;">';
}
}
$template = '
<tr>
<td class="mailpoet_col mailpoet_social" valign="top">
<div class="mailpoet_social-icon mailpoet_padded">' . $iconsBlock . ' </div>
</td>
</tr>';
return $template;
}
}