AppWelcome.php
1 year ago
Avocado.php
1 year ago
Birds.php
1 year ago
BirthdayCelebration.php
2 months ago
BookStoreWithCoupon.php
1 year ago
BrandingAgencyNews.php
1 year ago
BuddhistTemple.php
1 year ago
Charity.php
1 year ago
CityLocalNews.php
1 year ago
ClearNews.php
1 year ago
Coffee.php
1 year ago
College.php
1 year ago
ComputerRepair.php
1 year ago
ConfirmInterestBeforeDeactivation.php
2 years ago
ConfirmInterestOrUnsubscribe.php
2 years ago
DogFood.php
1 year ago
Drone.php
1 year ago
Engineering.php
1 year ago
Faith.php
1 year ago
FarmersMarket.php
1 year ago
FashionBlog.php
1 year ago
FashionBlogA.php
1 year ago
FashionShop.php
1 year ago
FashionStore.php
1 year ago
FestivalEvent.php
1 year ago
Fitness.php
1 year ago
FlowersWithCoupon.php
1 year ago
FoodBox.php
1 year ago
GiftWelcome.php
1 year ago
Guitarist.php
1 year ago
HealthyFoodBlog.php
1 year ago
Hotels.php
1 year ago
IndustryConference.php
1 year ago
JazzClub.php
1 year ago
KidsClothing.php
1 year ago
LifestyleBlogA.php
1 year ago
LifestyleBlogB.php
1 year ago
Minimal.php
1 year ago
ModularStyleStories.php
1 year ago
Mosque.php
1 year ago
Motor.php
1 year ago
Music.php
1 year ago
NewsDay.php
1 year ago
NewsletterBlank121Column.php
1 year ago
NewsletterBlank12Column.php
1 year ago
NewsletterBlank13Column.php
1 year ago
NewsletterBlank1Column.php
1 year ago
NewspaperTraditional.php
1 year ago
NotSoMedium.php
1 year ago
Painter.php
1 year ago
Phone.php
1 year ago
Photography.php
1 year ago
PieceOfCake.php
1 year ago
Poet.php
1 year ago
PostNotificationsBlank1Column.php
1 year ago
PrimarySchool.php
1 year ago
RealEstate.php
1 year ago
RenewableEnergy.php
1 year ago
Retro.php
1 year ago
RetroComputingMagazine.php
1 year ago
RockBand.php
1 year ago
RssSimpleNews.php
1 year ago
ScienceWeekly.php
1 year ago
Shoes.php
1 year ago
SimpleText.php
2 years ago
Software.php
1 year ago
Sunglasses.php
1 year ago
Synagogue.php
1 year ago
TakeAHike.php
1 year ago
Vlogger.php
1 year ago
WelcomeBlank12Column.php
1 year ago
WelcomeBlank1Column.php
1 year ago
WideStoryLayout.php
1 year ago
WineCity.php
1 year ago
WordPressTheme.php
1 year ago
WorldCup.php
1 year ago
YogaStudio.php
1 year ago
index.php
3 years ago
PieceOfCake.php
449 lines
| 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 PieceOfCake { |
| 9 | |
| 10 | private $template_image_url; |
| 11 | private $social_icon_url; |
| 12 | |
| 13 | public function __construct( |
| 14 | $assets_url |
| 15 | ) { |
| 16 | $this->template_image_url = 'https://ps.w.org/mailpoet/assets/newsletter-templates/piece_of_cake'; |
| 17 | $this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons'; |
| 18 | } |
| 19 | |
| 20 | public function get() { |
| 21 | return [ |
| 22 | 'name' => __("Piece of cake", 'mailpoet'), |
| 23 | 'categories' => json_encode(['standard', 'all']), |
| 24 | 'readonly' => 1, |
| 25 | 'thumbnail' => $this->getThumbnail(), |
| 26 | 'body' => json_encode($this->getBody()), |
| 27 | ]; |
| 28 | } |
| 29 | |
| 30 | private function getBody() { |
| 31 | return [ |
| 32 | 'content' => [ |
| 33 | 'type' => 'container', |
| 34 | 'orientation' => 'vertical', |
| 35 | 'styles' => [ |
| 36 | 'block' => [ |
| 37 | 'backgroundColor' => 'transparent', |
| 38 | ], |
| 39 | ], |
| 40 | 'blocks' => [ |
| 41 | 0 => [ |
| 42 | 'type' => 'container', |
| 43 | 'orientation' => 'horizontal', |
| 44 | 'styles' => [ |
| 45 | 'block' => [ |
| 46 | 'backgroundColor' => '#ffffff', |
| 47 | ], |
| 48 | ], |
| 49 | 'blocks' => [ |
| 50 | 0 => [ |
| 51 | 'type' => 'container', |
| 52 | 'orientation' => 'vertical', |
| 53 | 'styles' => [ |
| 54 | 'block' => [ |
| 55 | 'backgroundColor' => 'transparent', |
| 56 | ], |
| 57 | ], |
| 58 | 'blocks' => [ |
| 59 | 0 => [ |
| 60 | 'type' => 'header', |
| 61 | 'text' => '<p><strong>Open daily from 9am to 9pm | <a href="[link:newsletter_view_in_browser_url]">' . __("View this in your browser.", 'mailpoet') . '</a></strong></p>', |
| 62 | 'styles' => [ |
| 63 | 'block' => [ |
| 64 | 'backgroundColor' => '#ececeb', |
| 65 | ], |
| 66 | 'text' => [ |
| 67 | 'fontColor' => '#606060', |
| 68 | 'fontFamily' => 'Arial', |
| 69 | 'fontSize' => '13px', |
| 70 | 'textAlign' => 'right', |
| 71 | ], |
| 72 | 'link' => [ |
| 73 | 'fontColor' => '#d42b2b', |
| 74 | 'textDecoration' => 'none', |
| 75 | ], |
| 76 | ], |
| 77 | ], |
| 78 | 1 => [ |
| 79 | 'type' => 'spacer', |
| 80 | 'styles' => [ |
| 81 | 'block' => [ |
| 82 | 'backgroundColor' => 'transparent', |
| 83 | 'height' => '30px', |
| 84 | ], |
| 85 | ], |
| 86 | ], |
| 87 | 2 => [ |
| 88 | 'type' => 'image', |
| 89 | 'link' => '', |
| 90 | 'src' => $this->template_image_url . '/Restaurant-Bakery-Logo-1.png', |
| 91 | 'alt' => 'Restaurant-Bakery-Logo-1', |
| 92 | 'fullWidth' => true, |
| 93 | 'width' => '1280px', |
| 94 | 'height' => '180px', |
| 95 | 'styles' => [ |
| 96 | 'block' => [ |
| 97 | 'textAlign' => 'center', |
| 98 | ], |
| 99 | ], |
| 100 | ], |
| 101 | 3 => [ |
| 102 | 'type' => 'spacer', |
| 103 | 'styles' => [ |
| 104 | 'block' => [ |
| 105 | 'backgroundColor' => 'transparent', |
| 106 | 'height' => '30px', |
| 107 | ], |
| 108 | ], |
| 109 | ], |
| 110 | 4 => [ |
| 111 | 'type' => 'image', |
| 112 | 'link' => '', |
| 113 | 'src' => $this->template_image_url . '/Restaurant-Bakery-Header.jpg', |
| 114 | 'alt' => 'Restaurant-Bakery-Header', |
| 115 | 'fullWidth' => true, |
| 116 | 'width' => '1280px', |
| 117 | 'height' => '1600px', |
| 118 | 'styles' => [ |
| 119 | 'block' => [ |
| 120 | 'textAlign' => 'center', |
| 121 | ], |
| 122 | ], |
| 123 | ], |
| 124 | 5 => [ |
| 125 | 'type' => 'spacer', |
| 126 | 'styles' => [ |
| 127 | 'block' => [ |
| 128 | 'backgroundColor' => 'transparent', |
| 129 | 'height' => '40px', |
| 130 | ], |
| 131 | ], |
| 132 | ], |
| 133 | 6 => [ |
| 134 | 'type' => 'text', |
| 135 | 'text' => '<h1 style="text-align: center;"><strong>It\'s our Birthday!</strong></h1>', |
| 136 | ], |
| 137 | 7 => [ |
| 138 | 'type' => 'text', |
| 139 | 'text' => '<h3 style="text-align: center; line-height: 1.4;">To celebrate, we\'re adding a slice of our Birthday cake to every order. Pop in this weekend to use our special offer code and enjoy!</h3>', |
| 140 | ], |
| 141 | 8 => [ |
| 142 | 'type' => 'spacer', |
| 143 | 'styles' => [ |
| 144 | 'block' => [ |
| 145 | 'backgroundColor' => 'transparent', |
| 146 | 'height' => '20px', |
| 147 | ], |
| 148 | ], |
| 149 | ], |
| 150 | ], |
| 151 | ], |
| 152 | ], |
| 153 | ], |
| 154 | 1 => [ |
| 155 | 'type' => 'container', |
| 156 | 'orientation' => 'horizontal', |
| 157 | 'styles' => [ |
| 158 | 'block' => [ |
| 159 | 'backgroundColor' => 'transparent', |
| 160 | ], |
| 161 | ], |
| 162 | 'blocks' => [ |
| 163 | 0 => [ |
| 164 | 'type' => 'container', |
| 165 | 'orientation' => 'vertical', |
| 166 | 'styles' => [ |
| 167 | 'block' => [ |
| 168 | 'backgroundColor' => 'transparent', |
| 169 | ], |
| 170 | ], |
| 171 | 'blocks' => [ |
| 172 | 0 => [ |
| 173 | 'type' => 'spacer', |
| 174 | 'styles' => [ |
| 175 | 'block' => [ |
| 176 | 'backgroundColor' => 'transparent', |
| 177 | 'height' => '20px', |
| 178 | ], |
| 179 | ], |
| 180 | ], |
| 181 | ], |
| 182 | ], |
| 183 | 1 => [ |
| 184 | 'type' => 'container', |
| 185 | 'orientation' => 'vertical', |
| 186 | 'styles' => [ |
| 187 | 'block' => [ |
| 188 | 'backgroundColor' => 'transparent', |
| 189 | ], |
| 190 | ], |
| 191 | 'blocks' => [ |
| 192 | 0 => [ |
| 193 | 'type' => 'text', |
| 194 | 'text' => '<p style="text-align: center; border: 3px dashed #d42b2b; color: #d42b2b; padding: 10px; font-size: 24px;"><strong>HAPPYBDAY</strong></p>', |
| 195 | ], |
| 196 | ], |
| 197 | ], |
| 198 | 2 => [ |
| 199 | 'type' => 'container', |
| 200 | 'orientation' => 'vertical', |
| 201 | 'styles' => [ |
| 202 | 'block' => [ |
| 203 | 'backgroundColor' => 'transparent', |
| 204 | ], |
| 205 | ], |
| 206 | 'blocks' => [ |
| 207 | 0 => [ |
| 208 | 'type' => 'spacer', |
| 209 | 'styles' => [ |
| 210 | 'block' => [ |
| 211 | 'backgroundColor' => 'transparent', |
| 212 | 'height' => '20px', |
| 213 | ], |
| 214 | ], |
| 215 | ], |
| 216 | ], |
| 217 | ], |
| 218 | ], |
| 219 | ], |
| 220 | 2 => [ |
| 221 | 'type' => 'container', |
| 222 | 'orientation' => 'horizontal', |
| 223 | 'styles' => [ |
| 224 | 'block' => [ |
| 225 | 'backgroundColor' => 'transparent', |
| 226 | ], |
| 227 | ], |
| 228 | 'blocks' => [ |
| 229 | 0 => [ |
| 230 | 'type' => 'container', |
| 231 | 'orientation' => 'vertical', |
| 232 | 'styles' => [ |
| 233 | 'block' => [ |
| 234 | 'backgroundColor' => 'transparent', |
| 235 | ], |
| 236 | ], |
| 237 | 'blocks' => [ |
| 238 | 0 => [ |
| 239 | 'type' => 'spacer', |
| 240 | 'styles' => [ |
| 241 | 'block' => [ |
| 242 | 'backgroundColor' => 'transparent', |
| 243 | 'height' => '50px', |
| 244 | ], |
| 245 | ], |
| 246 | ], |
| 247 | ], |
| 248 | ], |
| 249 | ], |
| 250 | ], |
| 251 | 3 => [ |
| 252 | 'type' => 'container', |
| 253 | 'orientation' => 'horizontal', |
| 254 | 'styles' => [ |
| 255 | 'block' => [ |
| 256 | 'backgroundColor' => '#ececeb', |
| 257 | ], |
| 258 | ], |
| 259 | 'blocks' => [ |
| 260 | 0 => [ |
| 261 | 'type' => 'container', |
| 262 | 'orientation' => 'vertical', |
| 263 | 'styles' => [ |
| 264 | 'block' => [ |
| 265 | 'backgroundColor' => 'transparent', |
| 266 | ], |
| 267 | ], |
| 268 | 'blocks' => [ |
| 269 | 0 => [ |
| 270 | 'type' => 'spacer', |
| 271 | 'styles' => [ |
| 272 | 'block' => [ |
| 273 | 'backgroundColor' => 'transparent', |
| 274 | 'height' => '20px', |
| 275 | ], |
| 276 | ], |
| 277 | ], |
| 278 | ], |
| 279 | ], |
| 280 | ], |
| 281 | ], |
| 282 | 4 => [ |
| 283 | 'type' => 'container', |
| 284 | 'orientation' => 'horizontal', |
| 285 | 'styles' => [ |
| 286 | 'block' => [ |
| 287 | 'backgroundColor' => '#ececeb', |
| 288 | ], |
| 289 | ], |
| 290 | 'blocks' => [ |
| 291 | 0 => [ |
| 292 | 'type' => 'container', |
| 293 | 'orientation' => 'vertical', |
| 294 | 'styles' => [ |
| 295 | 'block' => [ |
| 296 | 'backgroundColor' => 'transparent', |
| 297 | ], |
| 298 | ], |
| 299 | 'blocks' => [ |
| 300 | 0 => [ |
| 301 | 'type' => 'text', |
| 302 | 'text' => '<p style="background-color: #ececeb; line-height: 1.3;"><span style="font-weight: 600;"><span style="font-size: 12px; text-align: center;">Add your postal address here.</span></span></p>', |
| 303 | ], |
| 304 | ], |
| 305 | ], |
| 306 | 1 => [ |
| 307 | 'type' => 'container', |
| 308 | 'orientation' => 'vertical', |
| 309 | 'styles' => [ |
| 310 | 'block' => [ |
| 311 | 'backgroundColor' => 'transparent', |
| 312 | ], |
| 313 | ], |
| 314 | 'blocks' => [ |
| 315 | 0 => [ |
| 316 | 'type' => 'social', |
| 317 | 'iconSet' => 'official', |
| 318 | 'icons' => [ |
| 319 | 0 => [ |
| 320 | 'type' => 'socialIcon', |
| 321 | 'iconType' => 'facebook', |
| 322 | 'link' => 'http://www.facebook.com', |
| 323 | 'image' => $this->social_icon_url . '/11-official/Facebook.png', |
| 324 | 'height' => '32px', |
| 325 | 'width' => '32px', |
| 326 | 'text' => 'Facebook', |
| 327 | ], |
| 328 | 1 => [ |
| 329 | 'type' => 'socialIcon', |
| 330 | 'iconType' => 'twitter', |
| 331 | 'link' => 'http://www.twitter.com', |
| 332 | 'image' => $this->social_icon_url . '/11-official/X.png', |
| 333 | 'height' => '32px', |
| 334 | 'width' => '32px', |
| 335 | 'text' => 'Twitter', |
| 336 | ], |
| 337 | 2 => [ |
| 338 | 'type' => 'socialIcon', |
| 339 | 'iconType' => 'youtube', |
| 340 | 'link' => 'http://www.youtube.com', |
| 341 | 'image' => $this->social_icon_url . '/11-official/Youtube.png', |
| 342 | 'height' => '32px', |
| 343 | 'width' => '32px', |
| 344 | 'text' => 'Youtube', |
| 345 | ], |
| 346 | 3 => [ |
| 347 | 'type' => 'socialIcon', |
| 348 | 'iconType' => 'instagram', |
| 349 | 'link' => 'http://instagram.com', |
| 350 | 'image' => $this->social_icon_url . '/11-official/Instagram.png', |
| 351 | 'height' => '32px', |
| 352 | 'width' => '32px', |
| 353 | 'text' => 'Instagram', |
| 354 | ], |
| 355 | ], |
| 356 | ], |
| 357 | ], |
| 358 | ], |
| 359 | 2 => [ |
| 360 | 'type' => 'container', |
| 361 | 'orientation' => 'vertical', |
| 362 | 'styles' => [ |
| 363 | 'block' => [ |
| 364 | 'backgroundColor' => 'transparent', |
| 365 | ], |
| 366 | ], |
| 367 | 'blocks' => [ |
| 368 | 0 => [ |
| 369 | 'type' => 'text', |
| 370 | 'text' => '<p style="text-align: right; line-height: 1.3;"><strong><a href="[link:subscription_unsubscribe_url]" style="color: #d42b2b; text-decoration: none; font-size: 12px; text-align: center;">' . __("Unsubscribe", 'mailpoet') . '</a></strong></p> |
| 371 | <p style="text-align: right; line-height: 1.3;"><strong><a href="[link:subscription_manage_url]" style="color: #d42b2b; text-decoration: none; font-size: 12px; text-align: center;">Manage Subscription</a></strong></p>', |
| 372 | ], |
| 373 | ], |
| 374 | ], |
| 375 | ], |
| 376 | ], |
| 377 | 5 => [ |
| 378 | 'type' => 'container', |
| 379 | 'orientation' => 'horizontal', |
| 380 | 'styles' => [ |
| 381 | 'block' => [ |
| 382 | 'backgroundColor' => '#ececeb', |
| 383 | ], |
| 384 | ], |
| 385 | 'blocks' => [ |
| 386 | 0 => [ |
| 387 | 'type' => 'container', |
| 388 | 'orientation' => 'vertical', |
| 389 | 'styles' => [ |
| 390 | 'block' => [ |
| 391 | 'backgroundColor' => 'transparent', |
| 392 | ], |
| 393 | ], |
| 394 | 'blocks' => [ |
| 395 | 0 => [ |
| 396 | 'type' => 'spacer', |
| 397 | 'styles' => [ |
| 398 | 'block' => [ |
| 399 | 'backgroundColor' => 'transparent', |
| 400 | 'height' => '40px', |
| 401 | ], |
| 402 | ], |
| 403 | ], |
| 404 | ], |
| 405 | ], |
| 406 | ], |
| 407 | ], |
| 408 | ], |
| 409 | ], |
| 410 | 'globalStyles' => [ |
| 411 | 'text' => [ |
| 412 | 'fontColor' => '#606060', |
| 413 | 'fontFamily' => 'Arial', |
| 414 | 'fontSize' => '16px', |
| 415 | ], |
| 416 | 'h1' => [ |
| 417 | 'fontColor' => '#606060', |
| 418 | 'fontFamily' => 'Arial', |
| 419 | 'fontSize' => '30px', |
| 420 | ], |
| 421 | 'h2' => [ |
| 422 | 'fontColor' => '#d42b2b', |
| 423 | 'fontFamily' => 'Arial', |
| 424 | 'fontSize' => '24px', |
| 425 | ], |
| 426 | 'h3' => [ |
| 427 | 'fontColor' => '#606060', |
| 428 | 'fontFamily' => 'Arial', |
| 429 | 'fontSize' => '20px', |
| 430 | ], |
| 431 | 'link' => [ |
| 432 | 'fontColor' => '#d42b2b', |
| 433 | 'textDecoration' => 'underline', |
| 434 | ], |
| 435 | 'wrapper' => [ |
| 436 | 'backgroundColor' => '#ffffff', |
| 437 | ], |
| 438 | 'body' => [ |
| 439 | 'backgroundColor' => '#ececeb', |
| 440 | ], |
| 441 | ], |
| 442 | ]; |
| 443 | } |
| 444 | |
| 445 | private function getThumbnail() { |
| 446 | return $this->template_image_url . '/thumbnail.20190411-1500.jpg'; |
| 447 | } |
| 448 | } |
| 449 |