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
AppWelcome.php
420 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 AppWelcome { |
| 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/app_welcome'; |
| 17 | $this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons'; |
| 18 | } |
| 19 | |
| 20 | public function get() { |
| 21 | return [ |
| 22 | 'name' => __("App Welcome", 'mailpoet'), |
| 23 | 'categories' => json_encode(['welcome', '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 | [ |
| 42 | 'type' => 'container', |
| 43 | 'orientation' => 'horizontal', |
| 44 | 'styles' => [ |
| 45 | 'block' => [ |
| 46 | 'backgroundColor' => '#eeeeee', |
| 47 | ], |
| 48 | ], |
| 49 | 'blocks' => [ |
| 50 | [ |
| 51 | 'type' => 'container', |
| 52 | 'orientation' => 'vertical', |
| 53 | 'styles' => [ |
| 54 | 'block' => [ |
| 55 | 'backgroundColor' => 'transparent', |
| 56 | ], |
| 57 | ], |
| 58 | 'blocks' => [ |
| 59 | [ |
| 60 | 'type' => 'spacer', |
| 61 | 'styles' => [ |
| 62 | 'block' => [ |
| 63 | 'backgroundColor' => '#eeeeee', |
| 64 | 'height' => '30px', |
| 65 | ], |
| 66 | ], |
| 67 | ], |
| 68 | ], |
| 69 | ], |
| 70 | ], |
| 71 | ], |
| 72 | [ |
| 73 | 'type' => 'container', |
| 74 | 'orientation' => 'horizontal', |
| 75 | 'styles' => [ |
| 76 | 'block' => [ |
| 77 | 'backgroundColor' => '#32b6c6', |
| 78 | ], |
| 79 | ], |
| 80 | 'blocks' => [ |
| 81 | [ |
| 82 | 'type' => 'container', |
| 83 | 'orientation' => 'vertical', |
| 84 | 'styles' => [ |
| 85 | 'block' => [ |
| 86 | 'backgroundColor' => 'transparent', |
| 87 | ], |
| 88 | ], |
| 89 | 'blocks' => [ |
| 90 | [ |
| 91 | 'type' => 'spacer', |
| 92 | 'styles' => [ |
| 93 | 'block' => [ |
| 94 | 'backgroundColor' => 'transparent', |
| 95 | 'height' => '40px', |
| 96 | ], |
| 97 | ], |
| 98 | ], |
| 99 | [ |
| 100 | 'type' => 'image', |
| 101 | 'link' => '', |
| 102 | 'src' => $this->template_image_url . '/App-Signup-Logo-1.png', |
| 103 | 'alt' => 'App-Signup-Logo', |
| 104 | 'fullWidth' => false, |
| 105 | 'width' => '80px', |
| 106 | 'height' => '80px', |
| 107 | 'styles' => [ |
| 108 | 'block' => [ |
| 109 | 'textAlign' => 'center', |
| 110 | ], |
| 111 | ], |
| 112 | ], |
| 113 | [ |
| 114 | 'type' => 'text', |
| 115 | 'text' => '<h1 style="text-align: center; margin: 0;"><strong>Welcome to Appy</strong></h1><p style="text-align: center; margin: 0;"><span style="color: #ffffff;">Let\'s get started!</span></p>', |
| 116 | ], |
| 117 | |
| 118 | [ |
| 119 | 'type' => 'image', |
| 120 | 'link' => '', |
| 121 | 'src' => $this->template_image_url . '/App-Signup-Header.png', |
| 122 | 'alt' => 'App-Signup-Header', |
| 123 | 'fullWidth' => false, |
| 124 | 'width' => '1280px', |
| 125 | 'height' => '500px', |
| 126 | 'styles' => [ |
| 127 | 'block' => [ |
| 128 | 'textAlign' => 'center', |
| 129 | ], |
| 130 | ], |
| 131 | ], |
| 132 | ], |
| 133 | ], |
| 134 | ], |
| 135 | ], |
| 136 | |
| 137 | [ |
| 138 | 'type' => 'container', |
| 139 | 'orientation' => 'horizontal', |
| 140 | 'styles' => [ |
| 141 | 'block' => [ |
| 142 | 'backgroundColor' => '#ffffff', |
| 143 | ], |
| 144 | ], |
| 145 | 'blocks' => [ |
| 146 | [ |
| 147 | 'type' => 'container', |
| 148 | 'orientation' => 'vertical', |
| 149 | 'styles' => [ |
| 150 | 'block' => [ |
| 151 | 'backgroundColor' => 'transparent', |
| 152 | ], |
| 153 | ], |
| 154 | 'blocks' => [ |
| 155 | [ |
| 156 | 'type' => 'spacer', |
| 157 | 'styles' => [ |
| 158 | 'block' => [ |
| 159 | 'backgroundColor' => 'transparent', |
| 160 | 'height' => '40px', |
| 161 | ], |
| 162 | ], |
| 163 | ], |
| 164 | [ |
| 165 | 'type' => 'text', |
| 166 | 'text' => '<p style="text-align: center;">Hi [subscriber:firstname | default:subscriber],</p> |
| 167 | <p style="text-align: center;"></p> |
| 168 | <p style="text-align: center;">In MailPoet, you can write emails in plain text, just like in a regular email. This can make your email newsletters more personal and attention-grabbing.</p> |
| 169 | <p style="text-align: center;"></p> |
| 170 | <p style="text-align: center;">Is this too simple? You can still style your text with basic formatting, like <strong>bold</strong> or <em>italics.</em></p> |
| 171 | <p style="text-align: center;"></p> |
| 172 | <p style="text-align: center;">Finally, you can also add a call-to-action button between 2 blocks of text, like this:</p>', |
| 173 | ], |
| 174 | ], |
| 175 | ], |
| 176 | ], |
| 177 | ], |
| 178 | [ |
| 179 | 'type' => 'container', |
| 180 | 'orientation' => 'horizontal', |
| 181 | 'styles' => [ |
| 182 | 'block' => [ |
| 183 | 'backgroundColor' => '#ffffff', |
| 184 | ], |
| 185 | ], |
| 186 | 'blocks' => [ |
| 187 | [ |
| 188 | 'type' => 'container', |
| 189 | 'orientation' => 'vertical', |
| 190 | 'styles' => [ |
| 191 | 'block' => [ |
| 192 | 'backgroundColor' => 'transparent', |
| 193 | ], |
| 194 | ], |
| 195 | 'blocks' => [ |
| 196 | [ |
| 197 | 'type' => 'spacer', |
| 198 | 'styles' => [ |
| 199 | 'block' => [ |
| 200 | 'backgroundColor' => 'transparent', |
| 201 | 'height' => '23px', |
| 202 | ], |
| 203 | ], |
| 204 | ], |
| 205 | [ |
| 206 | 'type' => 'button', |
| 207 | 'text' => 'Get Started Here', |
| 208 | 'url' => '', |
| 209 | 'styles' => [ |
| 210 | 'block' => [ |
| 211 | 'backgroundColor' => '#32b6c6', |
| 212 | 'borderColor' => '#32b6c6', |
| 213 | 'borderWidth' => '0px', |
| 214 | 'borderRadius' => '40px', |
| 215 | 'borderStyle' => 'solid', |
| 216 | 'width' => '188px', |
| 217 | 'lineHeight' => '50px', |
| 218 | 'fontColor' => '#ffffff', |
| 219 | 'fontFamily' => 'Arial', |
| 220 | 'fontSize' => '18px', |
| 221 | 'fontWeight' => 'normal', |
| 222 | 'textAlign' => 'center', |
| 223 | ], |
| 224 | ], |
| 225 | ], |
| 226 | [ |
| 227 | 'type' => 'spacer', |
| 228 | 'styles' => [ |
| 229 | 'block' => [ |
| 230 | 'backgroundColor' => 'transparent', |
| 231 | 'height' => '35px', |
| 232 | ], |
| 233 | ], |
| 234 | ], |
| 235 | ], |
| 236 | ], |
| 237 | ], |
| 238 | ], |
| 239 | [ |
| 240 | 'type' => 'container', |
| 241 | 'orientation' => 'horizontal', |
| 242 | 'styles' => [ |
| 243 | 'block' => [ |
| 244 | 'backgroundColor' => 'transparent', |
| 245 | ], |
| 246 | ], |
| 247 | 'blocks' => [ |
| 248 | [ |
| 249 | 'type' => 'container', |
| 250 | 'orientation' => 'vertical', |
| 251 | 'styles' => [ |
| 252 | 'block' => [ |
| 253 | 'backgroundColor' => 'transparent', |
| 254 | ], |
| 255 | ], |
| 256 | 'blocks' => [ |
| 257 | [ |
| 258 | 'type' => 'image', |
| 259 | 'link' => '', |
| 260 | 'src' => $this->template_image_url . '/App-Signup-Team.jpg', |
| 261 | 'alt' => 'App-Signup-Team', |
| 262 | 'fullWidth' => true, |
| 263 | 'width' => '1280px', |
| 264 | 'height' => '700px', |
| 265 | 'styles' => [ |
| 266 | 'block' => [ |
| 267 | 'textAlign' => 'center', |
| 268 | ], |
| 269 | ], |
| 270 | ], |
| 271 | ], |
| 272 | ], |
| 273 | ], |
| 274 | ], |
| 275 | [ |
| 276 | 'type' => 'container', |
| 277 | 'orientation' => 'horizontal', |
| 278 | 'styles' => [ |
| 279 | 'block' => [ |
| 280 | 'backgroundColor' => '#eeeeee', |
| 281 | ], |
| 282 | ], |
| 283 | 'blocks' => [ |
| 284 | [ |
| 285 | 'type' => 'container', |
| 286 | 'orientation' => 'vertical', |
| 287 | 'styles' => [ |
| 288 | 'block' => [ |
| 289 | 'backgroundColor' => 'transparent', |
| 290 | ], |
| 291 | ], |
| 292 | 'blocks' => [ |
| 293 | [ |
| 294 | 'type' => 'spacer', |
| 295 | 'styles' => [ |
| 296 | 'block' => [ |
| 297 | 'backgroundColor' => 'transparent', |
| 298 | 'height' => '30px', |
| 299 | ], |
| 300 | ], |
| 301 | ], |
| 302 | [ |
| 303 | 'type' => 'image', |
| 304 | 'link' => '', |
| 305 | 'src' => $this->template_image_url . '/App-Signup-Logo-Footer.png', |
| 306 | 'alt' => 'App-Signup-Logo-Footer', |
| 307 | 'fullWidth' => false, |
| 308 | 'width' => '50px', |
| 309 | 'height' => '50px', |
| 310 | 'styles' => [ |
| 311 | 'block' => [ |
| 312 | 'textAlign' => 'center', |
| 313 | ], |
| 314 | ], |
| 315 | ], |
| 316 | [ |
| 317 | 'type' => 'text', |
| 318 | 'text' => '<p style="text-align: center; font-size: 12px;"><strong>Appy</strong></p> |
| 319 | <p style="text-align: center; font-size: 12px;"><span>Address Line 1</span></p> |
| 320 | <p style="text-align: center; font-size: 12px;"><span>Address Line 2</span></p> |
| 321 | <p style="text-align: center; font-size: 12px;"><span>City</span></p> |
| 322 | <p style="text-align: center; font-size: 12px;"><a href="[link:subscription_unsubscribe_url]">' . __("Unsubscribe", 'mailpoet') . '</a><span> | </span><a href="[link:subscription_manage_url]">' . __("Manage your subscription", 'mailpoet') . '</a></p>', |
| 323 | ], |
| 324 | [ |
| 325 | 'type' => 'social', |
| 326 | 'iconSet' => 'official', |
| 327 | 'icons' => [ |
| 328 | [ |
| 329 | 'type' => 'socialIcon', |
| 330 | 'iconType' => 'facebook', |
| 331 | 'link' => 'http://www.facebook.com', |
| 332 | 'image' => $this->social_icon_url . '/11-official/Facebook.png', |
| 333 | 'height' => '32px', |
| 334 | 'width' => '32px', |
| 335 | 'text' => 'Facebook', |
| 336 | ], |
| 337 | [ |
| 338 | 'type' => 'socialIcon', |
| 339 | 'iconType' => 'twitter', |
| 340 | 'link' => 'http://www.twitter.com', |
| 341 | 'image' => $this->social_icon_url . '/11-official/X.png', |
| 342 | 'height' => '32px', |
| 343 | 'width' => '32px', |
| 344 | 'text' => 'Twitter', |
| 345 | ], |
| 346 | [ |
| 347 | 'type' => 'socialIcon', |
| 348 | 'iconType' => 'youtube', |
| 349 | 'link' => 'http://www.youtube.com', |
| 350 | 'image' => $this->social_icon_url . '/11-official/Youtube.png', |
| 351 | 'height' => '32px', |
| 352 | 'width' => '32px', |
| 353 | 'text' => 'Youtube', |
| 354 | ], |
| 355 | [ |
| 356 | 'type' => 'socialIcon', |
| 357 | 'iconType' => 'instagram', |
| 358 | 'link' => 'http://instagram.com', |
| 359 | 'image' => $this->social_icon_url . '/11-official/Instagram.png', |
| 360 | 'height' => '32px', |
| 361 | 'width' => '32px', |
| 362 | 'text' => 'Instagram', |
| 363 | ], |
| 364 | ], |
| 365 | ], |
| 366 | [ |
| 367 | 'type' => 'spacer', |
| 368 | 'styles' => [ |
| 369 | 'block' => [ |
| 370 | 'backgroundColor' => 'transparent', |
| 371 | 'height' => '40px', |
| 372 | ], |
| 373 | ], |
| 374 | ], |
| 375 | ], |
| 376 | ], |
| 377 | ], |
| 378 | ], |
| 379 | ], |
| 380 | ], |
| 381 | 'globalStyles' => [ |
| 382 | 'text' => [ |
| 383 | 'fontColor' => '#404040', |
| 384 | 'fontFamily' => 'Arial', |
| 385 | 'fontSize' => '15px', |
| 386 | ], |
| 387 | 'h1' => [ |
| 388 | 'fontColor' => '#ffffff', |
| 389 | 'fontFamily' => 'Arial', |
| 390 | 'fontSize' => '26px', |
| 391 | ], |
| 392 | 'h2' => [ |
| 393 | 'fontColor' => '#404040', |
| 394 | 'fontFamily' => 'Arial', |
| 395 | 'fontSize' => '22px', |
| 396 | ], |
| 397 | 'h3' => [ |
| 398 | 'fontColor' => '#32b6c6', |
| 399 | 'fontFamily' => 'Arial', |
| 400 | 'fontSize' => '18px', |
| 401 | ], |
| 402 | 'link' => [ |
| 403 | 'fontColor' => '#32b6c6', |
| 404 | 'textDecoration' => 'underline', |
| 405 | ], |
| 406 | 'wrapper' => [ |
| 407 | 'backgroundColor' => '#ffffff', |
| 408 | ], |
| 409 | 'body' => [ |
| 410 | 'backgroundColor' => '#eeeeee', |
| 411 | ], |
| 412 | ], |
| 413 | ]; |
| 414 | } |
| 415 | |
| 416 | private function getThumbnail() { |
| 417 | return $this->template_image_url . '/thumbnail.20190411-1500.jpg'; |
| 418 | } |
| 419 | } |
| 420 |