PluginProbe
YayMail – WooCommerce Email Customizer / trunk
YayMail – WooCommerce Email Customizer vtrunk
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 / space.php

space.php in YayMail – WooCommerce Email Customizer trunk, at templates/elements/space.php

47 lines 1.0 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 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 &nbsp;
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