- 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:
@@ -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) : '';
|
||||
}
|
||||
|
Reference in New Issue
Block a user