- Updates button height calculation

- Removes background color when it's set to "transparent"
- Removes second line break from paragraphs
- Introduces other changes based on Becks's testing
- Updates unit tests
This commit is contained in:
Vlad
2016-03-31 15:23:30 -04:00
parent 4486f9c5b0
commit 4f30158722
8 changed files with 51 additions and 31 deletions

View File

@@ -1,10 +1,12 @@
<?php
namespace MailPoet\Newsletter\Renderer\Blocks;
use MailPoet\Newsletter\Renderer\StylesHelper;
class Renderer {
function render($data, $column_count) {
$block_content = '';
array_map(function ($block) use (&$block_content, &$columns, $column_count) {
array_map(function($block) use (&$block_content, &$columns, $column_count) {
$block_content .= $this->createElementFromBlockType($block, $column_count);
if(isset($block['blocks'])) {
$block_content = $this->render($block, $column_count);
@@ -18,6 +20,7 @@ class Renderer {
}
function createElementFromBlockType($block, $column_count) {
$block = StylesHelper::setTextAlign($block);
$block_class = __NAMESPACE__ . '\\' . ucfirst($block['type']);
return (class_exists($block_class)) ? $block_class::render($block, $column_count) : '';
}