PluginProbe
YayMail – WooCommerce Email Customizer / 4.3.2
YayMail – WooCommerce Email Customizer v4.3.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 / src / TemplatePatterns / Patterns / Banner1.php

Banner1.php in YayMail – WooCommerce Email Customizer 4.3.2, at src/TemplatePatterns/Patterns/Banner1.php

124 lines 5.7 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\Button;
6 use YayMail\Elements\Column;
7 use YayMail\Elements\ColumnLayout;
8 use YayMail\Elements\Image;
9 use YayMail\Elements\Text;
10 use YayMail\TemplatePatterns\SectionTemplates\Banner;
11 use YayMail\Utils\SingletonTrait;
12
13 /** */
14 class Banner1 extends BasePattern {
15 use SingletonTrait;
16
17 public const TYPE = 'banner_1';
18
19 public function __construct() {
20 $this->id = uniqid();
21 $this->section = Banner::TYPE;
22 $this->position = 10;
23 $this->name = __( 'Banner 1', 'yaymail' );
24 $this->elements = [
25 ColumnLayout::get_object_data(
26 2,
27 [
28 'inner_background_color' => '#ffffff00',
29 'padding' => [
30 'top' => 0,
31 'right' => 0,
32 'bottom' => 0,
33 'left' => 0,
34 ],
35 'background_image' => [
36 'url' => 'https://images.wpbrandy.com/uploads/yaymail-banner-1-img-1.jpg',
37 'position' => 'custom',
38 'x_position' => 100,
39 'y_position' => 0,
40 'size' => 'contain',
41 ],
42 'children' => [
43 Column::get_object_data(
44 50,
45 [
46 'children' => [
47 Image::get_object_data(
48 [
49 'src' => 'https://images.wpbrandy.com/uploads/yaymail-banner-1-img-2.jpg',
50 'padding' => [
51 'top' => 0,
52 'bottom' => 0,
53 'left' => 0,
54 'right' => 0,
55 ],
56 'width' => 605,
57 'background_color' => '#ffffff00',
58 ]
59 ),
60 ],
61 ]
62 ),
63 Column::get_object_data(
64 50,
65 [
66 'children' => [
67 Text::get_object_data(
68 [
69 'rich_text' => '<p style="text-align: center; margin: 0; font-size: 24px"><span><b>Explore our collections</b></span></p>',
70 'padding' => [
71 'top' => 10,
72 'right' => 0,
73 'bottom' => 10,
74 'left' => 0,
75 ],
76 'text_color' => '#ffffff',
77 'background_color' => '#ffffff00',
78 ]
79 ),
80 Text::get_object_data(
81 [
82 'rich_text' => '<p style="text-align: center; margin: 0; font-size: 16px"><span>New products for July Check \'em out!</span></p>',
83 'padding' => [
84 'top' => 0,
85 'right' => 70,
86 'bottom' => 0,
87 'left' => 70,
88 ],
89 'text_color' => '#ffffff',
90 'background_color' => '#ffffff00',
91 ]
92 ),
93 Button::get_object_data(
94 [
95 'font_size' => 16,
96 'text' => 'Shop Now',
97 'background_color' => '#ffffff00',
98 'text_color' => '#377e62',
99 'button_background_color' => '#ffffff',
100 'padding' => [
101 'top' => 10,
102 'bottom' => 10,
103 'left' => 0,
104 'right' => 0,
105 ],
106 'border_radius' => [
107 'top_left' => '12',
108 'top_right' => '12',
109 'bottom_right' => '12',
110 'bottom_left' => '12',
111 ],
112 ]
113 ),
114 ],
115 ]
116 ),
117 ],
118
119 ]
120 ),
121 ];
122 }
123 }
124