PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.0
YayMail – WooCommerce Email Customizer v4.4.0
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 / src / TemplatePatterns / Patterns / Banner5.php

Banner5.php in YayMail – WooCommerce Email Customizer 4.4.0, at src/TemplatePatterns/Patterns/Banner5.php

94 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace YayMail\TemplatePatterns\Patterns;
3
4 use YayMail\Abstracts\BasePattern;
5 use YayMail\Elements\Column;
6 use YayMail\Elements\ColumnLayout;
7 use YayMail\Elements\Image;
8 use YayMail\Elements\Text;
9 use YayMail\TemplatePatterns\SectionTemplates\Banner;
10 use YayMail\Utils\SingletonTrait;
11
12 /**
13 * Banner5 Elements
14 */
15 class Banner5 extends BasePattern {
16 use SingletonTrait;
17
18 public const TYPE = 'banner_5';
19
20 private function __construct() {
21 $this->id = uniqid();
22 $this->section = Banner::TYPE;
23 $this->position = 50;
24 $this->name = __( 'Banner 5', 'yaymail' );
25 $this->elements = [
26 // TODO: Add element border radius setting + fix border radius of this banner
27 ColumnLayout::get_object_data(
28 2,
29 [
30 'inner_background_color' => '#ffffff00',
31 'background_image' => [
32 'url' => 'https://images.wpbrandy.com/uploads/yaymail-banner-5-img-1-scaled.png',
33 'position' => 'custom',
34 'x_position' => 100,
35 'y_position' => 50,
36 'size' => 'cover',
37 'repeat' => 'no-repeat',
38 ],
39 'background_color' => '#ffffff00',
40 'padding' => [
41 'top' => 0,
42 'bottom' => 0,
43 'left' => 0,
44 'right' => 0,
45 ],
46 'children' => [
47 Column::get_object_data(
48 70,
49 [
50 'children' => [
51 Text::get_object_data(
52 [
53 'rich_text' => '<p style="font-size: 30px; text-align: left; margin: 0px;"><strong><span style="font-size: 36px;"> It\'s time to relax and enjoy using your products! <span style="white-space-collapse: preserve;">🎉</span></span></strong></p>',
54 'background_color' => '#ffffff00',
55 'padding' => [
56 'top' => 20,
57 'bottom' => 20,
58 'right' => 0,
59 'left' => 40,
60 ],
61 'text_color' => '#ffffff',
62 ]
63 ),
64 ],
65 ]
66 ),
67 Column::get_object_data(
68 30,
69 [
70 'children' => [
71 Image::get_object_data(
72 [
73 'src' => 'https://images.wpbrandy.com/uploads/yaymail-banner-5-img-2.png',
74 'padding' => [
75 'top' => 36,
76 'bottom' => 0,
77 'right' => 10,
78 'left' => 10,
79 ],
80 'align' => 'right',
81 'background_color' => '#ffffff00',
82 'width' => 188,
83 ]
84 ),
85 ],
86 ]
87 ),
88 ],
89 ]
90 ),
91 ];
92 }
93 }
94