| 1 |
<?php |
| 2 |
defined( 'ABSPATH' ) || exit; |
| 3 |
use YayMail\Utils\TemplateHelpers; |
| 4 |
|
| 5 |
/** |
| 6 |
* $args includes |
| 7 |
* $element |
| 8 |
* $render_data |
| 9 |
* $is_nested |
| 10 |
*/ |
| 11 |
if ( empty( $args['element'] ) ) { |
| 12 |
return; |
| 13 |
} |
| 14 |
|
| 15 |
$element = $args['element']; |
| 16 |
$data = $element['data']; |
| 17 |
|
| 18 |
$wrapper_style = TemplateHelpers::get_style( |
| 19 |
[ |
| 20 |
'background-color' => $data['background_color'], |
| 21 |
] |
| 22 |
); |
| 23 |
|
| 24 |
$space_style = TemplateHelpers::get_style( |
| 25 |
[ |
| 26 |
'height' => TemplateHelpers::get_dimension_value( $data['height'] ), |
| 27 |
'font-size' => '0', |
| 28 |
'background-color' => $data['background_color'], |
| 29 |
] |
| 30 |
); |
| 31 |
|
| 32 |
ob_start(); |
| 33 |
?> |
| 34 |
<table class="yaymail-customizer-element-space" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse: collapse; width: 100%;"> |
| 35 |
<tbody> |
| 36 |
<tr> |
| 37 |
<td style="<?php echo esc_attr( $space_style ); ?>"> |
| 38 |
|
| 39 |
</td> |
| 40 |
</tr> |
| 41 |
</tbody> |
| 42 |
</table> |
| 43 |
<?php |
| 44 |
$element_content = ob_get_clean(); |
| 45 |
|
| 46 |
TemplateHelpers::wrap_element_content( $element_content, $element, $wrapper_style ); |
| 47 |
|