PluginProbe
YayMail – WooCommerce Email Customizer / 4.3.3
YayMail – WooCommerce Email Customizer v4.3.3
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 / element-wrapper.php

element-wrapper.php in YayMail – WooCommerce Email Customizer 4.3.3, at templates/elements/element-wrapper.php

66 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use YayMail\Utils\TemplateHelpers;
4
5 extract( isset( $args ) ? $args : [] );
6
7 if ( empty( $element ) ) {
8 return;
9 }
10
11 if ( ! isset( $content_html ) ) {
12 $content_html = '';
13 }
14
15 if ( empty( $wrapper_style ) ) {
16 $wrapper_style = '';
17 }
18
19 $yaymail_settings = yaymail_settings();
20 $container_direction = yaymail_get_email_direction();
21
22
23 $wrapper_style .= TemplateHelpers::get_style(
24 [
25 'border-spacing' => '0',
26 'width' => '100%',
27 'direction' => $container_direction,
28 'min-width' => '100%',
29 'border-collapse' => 'separate',
30 ]
31 );
32
33 $border_style = isset( $element['data']['border'] ) ? TemplateHelpers::get_border_css_value( $element['data']['border'] ) : '';
34
35 if ( ! empty( $border_style ) && 'button' !== $element['type'] ) {
36 $wrapper_style .= $border_style;
37 }
38
39 $user_custom_classes = isset( $element['data']['custom_css_classes'] ) ? $element['data']['custom_css_classes'] : '';
40 $settings = yaymail_settings();
41
42 if ( ! empty( trim( wp_kses_post( $content_html ) ) ) ) {
43 ?>
44 <div class="yaymail-element yaymail-element-<?php echo esc_attr( $element['id'] ); ?> <?php echo esc_attr( $user_custom_classes ); ?>" data-yaymail-element-type="<?php echo esc_attr( $element['type'] ); ?>" style="width: 100%; margin: 0 auto;" data-yaymail-element-id="<?php echo esc_attr( $element['id'] ); ?>">
45 <table cellpadding="0" cellspacing="0" class="yaymail-element__content" style="<?php echo esc_attr( $wrapper_style ); ?>">
46 <tbody>
47 <tr>
48 <td>
49 <style>
50 .yaymail-element__content p {
51 font-size: 14px;
52 margin: 0px;
53 }
54 </style>
55 <?php
56 yaymail_kses_post_e( $content_html );
57 ?>
58 </td>
59 </tr>
60 </tbody>
61 </table>
62 </div>
63 <?php
64 }//end if
65 ?>
66