PluginProbe
YayMail – WooCommerce Email Customizer / 3.2.2
YayMail – WooCommerce Email Customizer v3.2.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 / includes / Templates / Elements / YayMail / ElementText.php

ElementText.php in YayMail – WooCommerce Email Customizer 3.2.2, at includes/Templates/Elements/YayMail/ElementText.php

42 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <table
2 width="<?php esc_attr_e( $general_attrs['tableWidth'], 'woocommerce' ); ?>"
3 cellspacing="0"
4 cellpadding="0"
5 border="0"
6 align="center"
7 style="height:100%;display: table; background-color: <?php echo esc_attr( $attrs['backgroundColor'] ); ?>; <?php echo ! $isInColumns ? esc_attr( 'min-width:' . $general_attrs['tableWidth'] . 'px' ) : esc_attr( 'width: 100%' ); ?>;"
8 class="web-main-row"
9 id="web<?php echo esc_attr( $id ); ?>"
10 >
11 <tbody>
12 <tr>
13 <td
14 id="web-<?php echo esc_attr( $id ); ?>el-text"
15 class="web-el-text"
16 align="left"
17 style='font-size: 13px; line-height: 22px; word-break: break-word;
18 <?php echo 'font-family: ' . wp_kses_post( $attrs['family'] ); ?>;
19 <?php echo esc_attr( 'padding: ' . $attrs['paddingTop'] . 'px ' . $attrs['paddingRight'] . 'px ' . $attrs['paddingBottom'] . 'px ' . $attrs['paddingLeft'] . 'px;' ); ?>
20 <?php echo esc_attr( 'color: ' . $attrs['textColor'] ); ?>;
21 '
22 >
23 <div class="element-text-content" style="min-height: 10px; text-align: <?php echo esc_attr( isset( $attrs['textAlign'] ) ? $attrs['textAlign'] : '' ); ?>">
24 <?php
25 $preg = '/<h[0-9] ([a-z0-9A-Z="-: ;]+)>/';
26 preg_match( $preg, $attrs['content'], $h );
27
28 if ( isset( $h[0] ) && ! empty( $h[0] ) ) {
29 $newh = substr( $h[0], 0, -2 );
30 $newh[10] = '\'';
31 $newh .= ';font-family: ' . wp_kses_post( $attrs['family'] ) . ';\'>';
32 $attrs['content'] = str_replace( $h, $newh, $attrs['content'] );
33 }
34 echo wp_kses_post( $attrs['content'] );
35
36 ?>
37 </div>
38 </td>
39 </tr>
40 </tbody>
41 </table>
42