- Made all rendering classes dynamic except for single blocks

This commit is contained in:
MrCasual
2015-09-11 14:31:12 -04:00
parent 7e4bd0d044
commit 42d659472e
11 changed files with 72 additions and 52 deletions

View File

@@ -5,6 +5,8 @@ use MailPoet\Newsletter\Blocks\Renderer as BlocksRenderer;
class Button {
static function render($element) {
$blocksRenderer = new Renderer();
$template = '
<tr>
<td class="mailpoet_col mailpoet_button mailpoet_padded" valign = "top" >
@@ -32,7 +34,7 @@ class Button {
<![endif]-->
<a class="mailpoet_button"
href="' . $element['url'] . '"
style="display:inline-block;text-align:center;text-decoration:none;-webkit-text-size-adjust:none;mso-hide:all;' . BlocksRenderer::getBlockStyles($element, array('textAlign')) . '"> ' . $element['text'] . '
style="display:inline-block;text-align:center;text-decoration:none;-webkit-text-size-adjust:none;mso-hide:all;' . $blocksRenderer->getBlockStyles($element, array('textAlign')) . '"> ' . $element['text'] . '
</a>
</td>
</tr>