PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.5
YayMail – WooCommerce Email Customizer v4.4.5
4.4.6 4.4.5 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 All 57 releases
← All changes | templates/elements/container.php +36 -0 4.4.1 → 4.4.5 View file →
@@ -29,8 +29,44 @@
29 29 'overflow' => 'hidden',
30 30 ]
31 31 );
32 32
33 +if ( isset( $data['background_image'], $data['background_image']['url'] ) ) {
34 + $background_image = $data['background_image'];
35 + // Calculate background-position
36 + $background_position = str_replace( '_', ' ', $background_image['position'] );
37 + if ( ! isset( $background_image['position'] ) || 'default' === $background_image['position'] ) {
38 + $background_position = 'unset';
39 + } elseif ( 'custom' === $background_image['position'] ) {
40 + $background_position = "{$background_image['x_position']}% {$background_image['y_position']}%";
41 + }
42 +
43 + // Calculate background-repeat
44 + if ( ! isset( $background_image['repeat'] ) || 'default' === $background_image['repeat'] ) {
45 + $background_repeat = 'unset';
46 + } else {
47 + $background_repeat = $background_image['repeat'];
48 + }
49 +
50 + // Calculate background-size
51 + $background_size = $background_image['size'];
52 +
53 + if ( 'default' === $background_size ) {
54 + $background_size = 'unset';
55 + } elseif ( 'custom' === $background_size ) {
56 + $background_size = "{$background_image['custom_size']}%";
57 + }
58 +
59 + $wrapper_style .= TemplateHelpers::get_style(
60 + [
61 + 'background-image' => "url({$background_image['url']})",
62 + 'background-position' => $background_position,
63 + 'background-repeat' => $background_repeat,
64 + 'background-size' => $background_size,
65 + ]
66 + );
67 +}//end if
68 +
33 69 $inner_style = TemplateHelpers::get_style(
34 70 [
35 71 'width' => '100%',
36 72 'overflow' => 'hidden',