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
BirthdayCelebration.php
345 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Config\PopulatorData\Templates; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | class BirthdayCelebration { |
| 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/birthday-celebration'; |
| 17 | $this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons'; |
| 18 | } |
| 19 | |
| 20 | public function get() { |
| 21 | return [ |
| 22 | 'name' => __("Birthday Celebration", 'mailpoet'), |
| 23 | 'categories' => json_encode(['woocommerce', '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' => '#fec8c1', |
| 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' => 'header', |
| 61 | 'text' => '<p><a href="[link:newsletter_view_in_browser_url]">' . __("View this in your browser.", 'mailpoet') . '</a></p>', |
| 62 | 'styles' => [ |
| 63 | 'block' => [ |
| 64 | 'backgroundColor' => 'transparent', |
| 65 | ], |
| 66 | 'text' => [ |
| 67 | 'fontColor' => '#888888', |
| 68 | 'fontFamily' => 'Arial', |
| 69 | 'fontSize' => '12px', |
| 70 | 'textAlign' => 'center', |
| 71 | ], |
| 72 | 'link' => [ |
| 73 | 'fontColor' => '#e6527a', |
| 74 | 'textDecoration' => 'underline', |
| 75 | ], |
| 76 | ], |
| 77 | ], |
| 78 | [ |
| 79 | 'type' => 'spacer', |
| 80 | 'styles' => [ |
| 81 | 'block' => [ |
| 82 | 'backgroundColor' => 'transparent', |
| 83 | 'height' => '20px', |
| 84 | ], |
| 85 | ], |
| 86 | ], |
| 87 | [ |
| 88 | 'type' => 'image', |
| 89 | 'link' => '', |
| 90 | 'src' => $this->template_image_url . '/celebration.jpg', |
| 91 | 'alt' => __('Birthday celebration', 'mailpoet'), |
| 92 | 'fullWidth' => true, |
| 93 | 'width' => '1320px', |
| 94 | 'height' => '578px', |
| 95 | 'styles' => [ |
| 96 | 'block' => [ |
| 97 | 'textAlign' => 'center', |
| 98 | ], |
| 99 | ], |
| 100 | ], |
| 101 | [ |
| 102 | 'type' => 'spacer', |
| 103 | 'styles' => [ |
| 104 | 'block' => [ |
| 105 | 'backgroundColor' => 'transparent', |
| 106 | 'height' => '25px', |
| 107 | ], |
| 108 | ], |
| 109 | ], |
| 110 | [ |
| 111 | 'type' => 'text', |
| 112 | 'text' => '<h1 style="text-align: center;"><span style="color: #e6527a;">' . __("Happy Birthday, [subscriber:firstname | default:friend]!", 'mailpoet') . '</span></h1>', |
| 113 | ], |
| 114 | [ |
| 115 | 'type' => 'text', |
| 116 | 'text' => '<p style="text-align: center; font-size: 17px;"><span style="color: #555555;">' . __("It's your special day and we want to celebrate with you!", 'mailpoet') . '</span></p>', |
| 117 | ], |
| 118 | [ |
| 119 | 'type' => 'spacer', |
| 120 | 'styles' => [ |
| 121 | 'block' => [ |
| 122 | 'backgroundColor' => 'transparent', |
| 123 | 'height' => '25px', |
| 124 | ], |
| 125 | ], |
| 126 | ], |
| 127 | [ |
| 128 | 'type' => 'text', |
| 129 | 'text' => '<p style="text-align: center; font-size: 15px;"><span style="color: #555555;">' . __("To make your day even sweeter, here's a special treat just for you.", 'mailpoet') . '</span></p>', |
| 130 | ], |
| 131 | [ |
| 132 | 'type' => 'spacer', |
| 133 | 'styles' => [ |
| 134 | 'block' => [ |
| 135 | 'backgroundColor' => 'transparent', |
| 136 | 'height' => '15px', |
| 137 | ], |
| 138 | ], |
| 139 | ], |
| 140 | [ |
| 141 | 'type' => 'coupon', |
| 142 | 'amount' => 20, |
| 143 | 'amountMax' => 100, |
| 144 | 'discountType' => 'percent', |
| 145 | 'expiryDay' => 14, |
| 146 | 'usageLimit' => '', |
| 147 | 'usageLimitPerUser' => '1', |
| 148 | 'minimumAmount' => '', |
| 149 | 'maximumAmount' => '', |
| 150 | 'emailRestrictions' => '', |
| 151 | 'productIds' => [], |
| 152 | 'excludedProductIds' => [], |
| 153 | 'productCategoryIds' => [], |
| 154 | 'excludedProductCategoryIds' => [], |
| 155 | 'styles' => [ |
| 156 | 'block' => [ |
| 157 | 'backgroundColor' => '#e6527a', |
| 158 | 'borderColor' => '#e6527a', |
| 159 | 'borderWidth' => '0px', |
| 160 | 'borderRadius' => '5px', |
| 161 | 'borderStyle' => 'solid', |
| 162 | 'width' => '240px', |
| 163 | 'lineHeight' => '50px', |
| 164 | 'fontColor' => '#ffffff', |
| 165 | 'fontFamily' => 'Georgia', |
| 166 | 'fontSize' => '24px', |
| 167 | 'fontWeight' => 'bold', |
| 168 | 'textAlign' => 'center', |
| 169 | ], |
| 170 | ], |
| 171 | 'source' => 'createNew', |
| 172 | 'code' => 'XXXX-XXXXXXX-XXXX', |
| 173 | ], |
| 174 | [ |
| 175 | 'type' => 'text', |
| 176 | 'text' => '<p style="text-align: center; font-size: 13px;"><span style="color: #888888;">' . __("Use this code for 20% off your next order.", 'mailpoet') . '</span></p>', |
| 177 | ], |
| 178 | [ |
| 179 | 'type' => 'spacer', |
| 180 | 'styles' => [ |
| 181 | 'block' => [ |
| 182 | 'backgroundColor' => 'transparent', |
| 183 | 'height' => '20px', |
| 184 | ], |
| 185 | ], |
| 186 | ], |
| 187 | [ |
| 188 | 'type' => 'button', |
| 189 | 'text' => __("Shop Now", 'mailpoet'), |
| 190 | 'url' => '[site:homepage_url]', |
| 191 | 'styles' => [ |
| 192 | 'block' => [ |
| 193 | 'backgroundColor' => '#ff6b6b', |
| 194 | 'borderColor' => '#e55a5a', |
| 195 | 'borderWidth' => '0px', |
| 196 | 'borderRadius' => '30px', |
| 197 | 'borderStyle' => 'solid', |
| 198 | 'width' => '260px', |
| 199 | 'lineHeight' => '50px', |
| 200 | 'fontColor' => '#ffffff', |
| 201 | 'fontFamily' => 'Georgia', |
| 202 | 'fontSize' => '18px', |
| 203 | 'fontWeight' => 'bold', |
| 204 | 'textAlign' => 'center', |
| 205 | ], |
| 206 | ], |
| 207 | ], |
| 208 | [ |
| 209 | 'type' => 'spacer', |
| 210 | 'styles' => [ |
| 211 | 'block' => [ |
| 212 | 'backgroundColor' => 'transparent', |
| 213 | 'height' => '30px', |
| 214 | ], |
| 215 | ], |
| 216 | ], |
| 217 | ], |
| 218 | ], |
| 219 | ], |
| 220 | ], |
| 221 | [ |
| 222 | 'type' => 'container', |
| 223 | 'orientation' => 'horizontal', |
| 224 | 'styles' => [ |
| 225 | 'block' => [ |
| 226 | 'backgroundColor' => '#fec8c1', |
| 227 | ], |
| 228 | ], |
| 229 | 'blocks' => [ |
| 230 | [ |
| 231 | 'type' => 'container', |
| 232 | 'orientation' => 'vertical', |
| 233 | 'styles' => [ |
| 234 | 'block' => [ |
| 235 | 'backgroundColor' => 'transparent', |
| 236 | ], |
| 237 | ], |
| 238 | 'blocks' => [ |
| 239 | [ |
| 240 | 'type' => 'social', |
| 241 | 'iconSet' => 'official', |
| 242 | 'icons' => [ |
| 243 | [ |
| 244 | 'type' => 'socialIcon', |
| 245 | 'iconType' => 'facebook', |
| 246 | 'link' => 'http://www.facebook.com', |
| 247 | 'image' => $this->social_icon_url . '/11-official/Facebook.png', |
| 248 | 'height' => '32px', |
| 249 | 'width' => '32px', |
| 250 | 'text' => 'Facebook', |
| 251 | ], |
| 252 | [ |
| 253 | 'type' => 'socialIcon', |
| 254 | 'iconType' => 'twitter', |
| 255 | 'link' => 'http://www.twitter.com', |
| 256 | 'image' => $this->social_icon_url . '/11-official/X.png', |
| 257 | 'height' => '32px', |
| 258 | 'width' => '32px', |
| 259 | 'text' => 'Twitter', |
| 260 | ], |
| 261 | [ |
| 262 | 'type' => 'socialIcon', |
| 263 | 'iconType' => 'instagram', |
| 264 | 'link' => 'http://instagram.com', |
| 265 | 'image' => $this->social_icon_url . '/11-official/Instagram.png', |
| 266 | 'height' => '32px', |
| 267 | 'width' => '32px', |
| 268 | 'text' => 'Instagram', |
| 269 | ], |
| 270 | ], |
| 271 | ], |
| 272 | [ |
| 273 | 'type' => 'spacer', |
| 274 | 'styles' => [ |
| 275 | 'block' => [ |
| 276 | 'backgroundColor' => 'transparent', |
| 277 | 'height' => '20px', |
| 278 | ], |
| 279 | ], |
| 280 | ], |
| 281 | [ |
| 282 | 'type' => 'footer', |
| 283 | '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>', |
| 284 | 'styles' => [ |
| 285 | 'block' => [ |
| 286 | 'backgroundColor' => 'transparent', |
| 287 | ], |
| 288 | 'text' => [ |
| 289 | 'fontColor' => '#888888', |
| 290 | 'fontFamily' => 'Arial', |
| 291 | 'fontSize' => '12px', |
| 292 | 'textAlign' => 'center', |
| 293 | ], |
| 294 | 'link' => [ |
| 295 | 'fontColor' => '#e6527a', |
| 296 | 'textDecoration' => 'none', |
| 297 | ], |
| 298 | ], |
| 299 | ], |
| 300 | ], |
| 301 | ], |
| 302 | ], |
| 303 | ], |
| 304 | ], |
| 305 | ], |
| 306 | 'globalStyles' => [ |
| 307 | 'text' => [ |
| 308 | 'fontColor' => '#555555', |
| 309 | 'fontFamily' => 'Georgia', |
| 310 | 'fontSize' => '15px', |
| 311 | ], |
| 312 | 'h1' => [ |
| 313 | 'fontColor' => '#e6527a', |
| 314 | 'fontFamily' => 'Georgia', |
| 315 | 'fontSize' => '32px', |
| 316 | ], |
| 317 | 'h2' => [ |
| 318 | 'fontColor' => '#e6527a', |
| 319 | 'fontFamily' => 'Georgia', |
| 320 | 'fontSize' => '24px', |
| 321 | ], |
| 322 | 'h3' => [ |
| 323 | 'fontColor' => '#e6527a', |
| 324 | 'fontFamily' => 'Georgia', |
| 325 | 'fontSize' => '22px', |
| 326 | ], |
| 327 | 'link' => [ |
| 328 | 'fontColor' => '#e6527a', |
| 329 | 'textDecoration' => 'underline', |
| 330 | ], |
| 331 | 'wrapper' => [ |
| 332 | 'backgroundColor' => '#fec8c1', |
| 333 | ], |
| 334 | 'body' => [ |
| 335 | 'backgroundColor' => '#fec8c1', |
| 336 | ], |
| 337 | ], |
| 338 | ]; |
| 339 | } |
| 340 | |
| 341 | private function getThumbnail() { |
| 342 | return $this->template_image_url . '/thumbnail.jpg'; |
| 343 | } |
| 344 | } |
| 345 |