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 / logo.php

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

37 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 'word-break' => 'break-word',
21 'text-align' => $data['align'],
22 'background-color' => $data['background_color'],
23 'padding' => TemplateHelpers::get_spacing_value( isset( $data['padding'] ) ? $data['padding'] : [] ),
24 ]
25 );
26
27 ob_start();
28 ?>
29 <a href="<?php echo esc_url( do_shortcode( $data['url'] ) ); ?>" target="_blank" rel="noreferrer">
30 <img alt="<?php echo esc_attr( $data['alt'] ?? '' ); ?>" src="<?php echo esc_url( $data['src'] ); ?>" style="max-width: 100%; width: <?php echo esc_attr( TemplateHelpers::get_dimension_value( $data['width'] ) ); ?>" />
31 </a>
32 <?php
33 $element_content = ob_get_clean();
34
35 TemplateHelpers::wrap_element_content( $element_content, $element, $wrapper_style );
36
37