| 1 |
<?php |
| 2 |
defined( 'ABSPATH' ) || exit; |
| 3 |
|
| 4 |
use YayMail\Utils\TemplateHelpers; |
| 5 |
|
| 6 |
/** |
| 7 |
* $args includes |
| 8 |
* $element |
| 9 |
* $render_data |
| 10 |
* $is_nested |
| 11 |
*/ |
| 12 |
if ( empty( $args['element'] ) ) { |
| 13 |
return; |
| 14 |
} |
| 15 |
|
| 16 |
$element = $args['element']; |
| 17 |
$data = $element['data']; |
| 18 |
|
| 19 |
$wrapper_style = TemplateHelpers::get_style( |
| 20 |
[ |
| 21 |
'background-color' => '#fff', |
| 22 |
'color' => '#636363', |
| 23 |
'padding' => '15px 50px', |
| 24 |
'font-family' => 'Helvetica, Roboto, Arial, sans-serif', |
| 25 |
'font-size' => '13px', |
| 26 |
] |
| 27 |
); |
| 28 |
|
| 29 |
if ( ! empty( $data['rich_text'] ) ) { |
| 30 |
ob_start(); |
| 31 |
?> |
| 32 |
<div style="text-align: initial;"><?php echo wp_kses_post( do_shortcode( $data['rich_text'] ) ); ?></div> |
| 33 |
<?php |
| 34 |
$element_content = ob_get_clean(); |
| 35 |
|
| 36 |
TemplateHelpers::wrap_element_content( $element_content, $element, $wrapper_style ); |
| 37 |
} |
| 38 |
?> |
| 39 |
|