PluginProbe
YayMail – WooCommerce Email Customizer / 4.3.2
YayMail – WooCommerce Email Customizer v4.3.2
4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 3.4.2 3.4.3 All 55 releases
yaymail / templates / elements / container.php

container.php in YayMail – WooCommerce Email Customizer 4.3.2, at templates/elements/container.php

62 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'ABSPATH' ) || exit;
3
4 use YayMail\Elements\ElementsLoader;
5 use YayMail\Utils\TemplateHelpers;
6
7 /**
8 * $args includes
9 * $element
10 * $render_data
11 * $is_nested
12 */
13 if ( empty( $args['element'] ) ) {
14 return;
15 }
16
17 $element = $args['element'];
18 $data = $element['data'];
19 $direction = isset( $data['direction'] ) ? $data['direction'] : 'vertical';
20
21 if ( 'horizontal' === $direction ) {
22 $args['is_horizontal'] = true;
23 }
24
25 $wrapper_style = TemplateHelpers::get_style(
26 [
27 'background-color' => $data['background_color'],
28 'padding' => TemplateHelpers::get_spacing_value( isset( $data['padding'] ) ? $data['padding'] : [] ),
29 'overflow' => 'hidden',
30 ]
31 );
32
33 $inner_style = TemplateHelpers::get_style(
34 [
35 'width' => '100%',
36 'overflow' => 'hidden',
37 ]
38 );
39
40
41 ob_start();
42 ?>
43
44 <div class="yaymail-inner-customizer-element-container" style="<?php echo esc_attr( $inner_style ); ?>">
45 <table style="width: 100%; background-color: inherit;" cellpadding="0" cellspacing="0" width="100%">
46 <tbody>
47 <?php
48 ElementsLoader::render_elements(
49 $element['children'],
50 $args
51 );
52 ?>
53 </tbody>
54 </table>
55 </div>
56
57
58 <?php
59 $element_content = ob_get_clean();
60
61 TemplateHelpers::wrap_element_content( $element_content, $element, $wrapper_style );
62