PluginProbe
MailPoet – Newsletters, Email Marketing, and Automation / 5.37.0
MailPoet – Newsletters, Email Marketing, and Automation v5.37.0
5.38.0 5.37.0 5.36.1 5.36.0 5.35.1 5.35.0 5.34.3 5.34.2 5.34.1 5.34.0 5.33.1 5.33.0 5.32.0 5.31.0 5.30.0 5.29.0 5.28.1 5.28.0 5.27.0 5.26.0 5.26.1 5.25.0 5.24.0 4.43.0 4.43.1 All 542 releases
mailpoet / lib / Config / PopulatorData / Templates / NewsletterBlank12Column.php
NewsletterBlank12Column.php
326 lines 11.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
2
3 namespace MailPoet\Config\PopulatorData\Templates;
4
5 if (!defined('ABSPATH')) exit;
6
7
8 class NewsletterBlank12Column {
9
10 private $assets_url;
11 private $external_template_image_url;
12 private $template_image_url;
13 private $social_icon_url;
14
15 public function __construct(
16 $assets_url
17 ) {
18 $this->assets_url = $assets_url;
19 $this->external_template_image_url = 'https://ps.w.org/mailpoet/assets/newsletter-templates/newsletter-blank-1-2-column';
20 $this->template_image_url = $this->assets_url . '/img/blank_templates';
21 $this->social_icon_url = $this->assets_url . '/img/newsletter_editor/social-icons';
22 }
23
24 public function get() {
25 return [
26 'name' => __("Newsletter: Blank 1:2 Column", 'mailpoet'),
27 'categories' => json_encode(['standard', 'blank']),
28 'readonly' => 1,
29 'thumbnail' => $this->getThumbnail(),
30 'body' => json_encode($this->getBody()),
31 ];
32 }
33
34 private function getBody() {
35 return [
36 "content" => [
37 "type" => "container",
38 "orientation" => "vertical",
39 "styles" => [
40 "block" => [
41 "backgroundColor" => "transparent",
42 ],
43 ],
44 "blocks" => [
45 [
46 "type" => "container",
47 "orientation" => "horizontal",
48 "styles" => [
49 "block" => [
50 "backgroundColor" => "#f8f8f8",
51 ],
52 ],
53 "blocks" => [
54 [
55 "type" => "container",
56 "orientation" => "vertical",
57 "styles" => [
58 "block" => [
59 "backgroundColor" => "transparent",
60 ],
61 ],
62 "blocks" => [
63 [
64 "type" => "header",
65 "text" => '<a href="[link:newsletter_view_in_browser_url]">' . __("View this in your browser.", 'mailpoet') . '</a>',
66 "styles" => [
67 "block" => [
68 "backgroundColor" => "transparent",
69 ],
70 "text" => [
71 "fontColor" => "#222222",
72 "fontFamily" => "Arial",
73 "fontSize" => "12px",
74 "textAlign" => "center",
75 ],
76 "link" => [
77 "fontColor" => "#6cb7d4",
78 "textDecoration" => "underline",
79 ],
80 ],
81 ],
82 ],
83 ],
84 ],
85 ],
86 [
87 "type" => "container",
88 "orientation" => "horizontal",
89 "styles" => [
90 "block" => [
91 "backgroundColor" => "#ffffff",
92 ],
93 ],
94 "blocks" => [
95 [
96 "type" => "container",
97 "orientation" => "vertical",
98 "styles" => [
99 "block" => [
100 "backgroundColor" => "transparent",
101 ],
102 ],
103 "blocks" => [
104 [
105 "type" => "spacer",
106 "styles" => [
107 "block" => [
108 "backgroundColor" => "transparent",
109 "height" => "30px",
110 ],
111 ],
112 ],
113 [
114 "type" => "image",
115 "link" => "",
116 "src" => $this->template_image_url . "/fake-logo.png",
117 "alt" => __("Fake logo", 'mailpoet'),
118 "fullWidth" => false,
119 "width" => "598px",
120 "height" => "71px",
121 "styles" => [
122 "block" => [
123 "textAlign" => "center",
124 ],
125 ],
126 ],
127 [
128 "type" => "text",
129 "text" => __("<h1 style=\"text-align: center;\"><strong>Let's Get Started!</strong></h1>\n<p>&nbsp;</p>\n<p>It's time to design your newsletter! In the right sidebar, you'll find 4 menu items that will help you customize your newsletter:</p>\n<ol>\n<li>Content</li>\n<li>Columns</li>\n<li>Styles</li>\n<li>Preview</li>\n</ol>", 'mailpoet'),
130 ],
131 [
132 "type" => "divider",
133 "styles" => [
134 "block" => [
135 "backgroundColor" => "transparent",
136 "padding" => "13px",
137 "borderStyle" => "dotted",
138 "borderWidth" => "3px",
139 "borderColor" => "#aaaaaa",
140 ],
141 ],
142 ],
143 ],
144 ],
145 ],
146 ],
147 [
148 "type" => "container",
149 "orientation" => "horizontal",
150 "styles" => [
151 "block" => [
152 "backgroundColor" => "transparent",
153 ],
154 ],
155 "blocks" => [
156 [
157 "type" => "container",
158 "orientation" => "vertical",
159 "styles" => [
160 "block" => [
161 "backgroundColor" => "transparent",
162 ],
163 ],
164 "blocks" => [
165 [
166 "type" => "text",
167 "text" => '<h2>' . __('This template has...', 'mailpoet') . '</h2>',
168 ],
169 [
170 "type" => "text",
171 "text" => __("<p>In the right sidebar, you can add these layout blocks to your email:</p>\n<ul>\n<li>1 column</li>\n<li>2 columns</li>\n<li>3 columns</li>\n</ul>", 'mailpoet'),
172 ],
173 ],
174 ],
175 [
176 "type" => "container",
177 "orientation" => "vertical",
178 "styles" => [
179 "block" => [
180 "backgroundColor" => "transparent",
181 ],
182 ],
183 "blocks" => [
184 [
185 "type" => "text",
186 "text" => '<h2>' . __('... a 2-column layout.', 'mailpoet') . '</h2>',
187 ],
188 [
189 "type" => "text",
190 "text" => __("<p><span style=\"line-height: 25.6px;\">You can change a layout's background color by clicking on the settings icon on the right edge of the Designer. Simply hover over this area to see the Settings (gear) icon.</span></p>", 'mailpoet'),
191 ],
192 ],
193 ],
194 ],
195 ],
196 [
197 "type" => "container",
198 "orientation" => "horizontal",
199 "styles" => [
200 "block" => [
201 "backgroundColor" => "#f8f8f8",
202 ],
203 ],
204 "blocks" => [
205 [
206 "type" => "container",
207 "orientation" => "vertical",
208 "styles" => [
209 "block" => [
210 "backgroundColor" => "transparent",
211 ],
212 ],
213 "blocks" => [
214 [
215 "type" => "divider",
216 "styles" => [
217 "block" => [
218 "backgroundColor" => "transparent",
219 "padding" => "24.5px",
220 "borderStyle" => "solid",
221 "borderWidth" => "3px",
222 "borderColor" => "#aaaaaa",
223 ],
224 ],
225 ],
226 [
227 "type" => "social",
228 "iconSet" => "grey",
229 "icons" => [
230 [
231 "type" => "socialIcon",
232 "iconType" => "facebook",
233 "link" => "http://www.facebook.com",
234 "image" => $this->social_icon_url . "/11-official/Facebook.png",
235 "height" => "32px",
236 "width" => "32px",
237 "text" => "Facebook",
238 ],
239 [
240 "type" => "socialIcon",
241 "iconType" => "twitter",
242 "link" => "http://www.twitter.com",
243 "image" => $this->social_icon_url . "/11-official/X.png",
244 "height" => "32px",
245 "width" => "32px",
246 "text" => "Twitter",
247 ],
248 ],
249 ],
250 [
251 "type" => "divider",
252 "styles" => [
253 "block" => [
254 "backgroundColor" => "transparent",
255 "padding" => "7.5px",
256 "borderStyle" => "solid",
257 "borderWidth" => "3px",
258 "borderColor" => "#aaaaaa",
259 ],
260 ],
261 ],
262 [
263 "type" => "footer",
264 "text" => '<p><a href="[link:subscription_unsubscribe_url]">' . __("Unsubscribe", 'mailpoet') . '</a> | <a href="[link:subscription_manage_url]">' . __("Manage your subscription", 'mailpoet') . '</a><br />' . __("Add your postal address here!", 'mailpoet') . '</p>',
265 "styles" => [
266 "block" => [
267 "backgroundColor" => "transparent",
268 ],
269 "text" => [
270 "fontColor" => "#222222",
271 "fontFamily" => "Arial",
272 "fontSize" => "12px",
273 "textAlign" => "center",
274 ],
275 "link" => [
276 "fontColor" => "#6cb7d4",
277 "textDecoration" => "none",
278 ],
279 ],
280 ],
281 ],
282 ],
283 ],
284 ],
285 ],
286 ],
287 "globalStyles" => [
288 "text" => [
289 "fontColor" => "#000000",
290 "fontFamily" => "Arial",
291 "fontSize" => "16px",
292 ],
293 "h1" => [
294 "fontColor" => "#111111",
295 "fontFamily" => "Trebuchet MS",
296 "fontSize" => "30px",
297 ],
298 "h2" => [
299 "fontColor" => "#222222",
300 "fontFamily" => "Trebuchet MS",
301 "fontSize" => "24px",
302 ],
303 "h3" => [
304 "fontColor" => "#333333",
305 "fontFamily" => "Trebuchet MS",
306 "fontSize" => "22px",
307 ],
308 "link" => [
309 "fontColor" => "#21759B",
310 "textDecoration" => "underline",
311 ],
312 "wrapper" => [
313 "backgroundColor" => "#ffffff",
314 ],
315 "body" => [
316 "backgroundColor" => "#eeeeee",
317 ],
318 ],
319 ];
320 }
321
322 private function getThumbnail() {
323 return $this->external_template_image_url . '/thumbnail.20190411-1500.jpg';
324 }
325 }
326