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
PostNotificationsBlank1Column.php
352 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 PostNotificationsBlank1Column { |
| 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/post-notifications-blank-1-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' => __("Post Notifications: Blank 1 Column", 'mailpoet'), |
| 27 | 'categories' => json_encode(['notification', '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", |
| 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>Check Out Our New Blog Posts! </strong></h1>\n<p> </p>\n<p>MailPoet can <span style=\"line-height: 1.6em; background-color: inherit;\"><em>automatically</em> </span><span style=\"line-height: 1.6em; background-color: inherit;\">send your new blog posts to your subscribers.</span></p>\n<p><span style=\"line-height: 1.6em; background-color: inherit;\"></span></p>\n<p><span style=\"line-height: 1.6em; background-color: inherit;\">Below, you'll find three recent posts, which are displayed automatically, thanks to the <em>Automatic Latest Content</em> widget, which can be found in the right sidebar, under <em>Content</em>.</span></p>\n<p><span style=\"line-height: 1.6em; background-color: inherit;\"></span></p>\n<p><span style=\"line-height: 1.6em; background-color: inherit;\">To edit the settings and styles of your post, simply click on a post below.</span></p>", '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 | "type" => "spacer", |
| 145 | "styles" => [ |
| 146 | "block" => [ |
| 147 | "backgroundColor" => "transparent", |
| 148 | "height" => "40px", |
| 149 | ], |
| 150 | ], |
| 151 | ], |
| 152 | ], |
| 153 | ], |
| 154 | ], |
| 155 | ], |
| 156 | [ |
| 157 | "type" => "automatedLatestContentLayout", |
| 158 | "withLayout" => true, |
| 159 | "amount" => "3", |
| 160 | "contentType" => "post", |
| 161 | "terms" => [], |
| 162 | "inclusionType" => "include", |
| 163 | "displayType" => "excerpt", |
| 164 | "titleFormat" => "h3", |
| 165 | "titleAlignment" => "left", |
| 166 | "titleIsLink" => false, |
| 167 | "imageFullWidth" => false, |
| 168 | "featuredImagePosition" => "alternate", |
| 169 | "showAuthor" => "no", |
| 170 | "authorPrecededBy" => __("Author:", 'mailpoet'), |
| 171 | "showCategories" => "no", |
| 172 | "categoriesPrecededBy" => __("Categories:", 'mailpoet'), |
| 173 | "readMoreType" => "button", |
| 174 | "readMoreText" => "Read more", |
| 175 | "readMoreButton" => [ |
| 176 | "type" => "button", |
| 177 | "text" => __("Read the post", 'mailpoet'), |
| 178 | "url" => "[postLink]", |
| 179 | "styles" => [ |
| 180 | "block" => [ |
| 181 | "backgroundColor" => "#2ea1cd", |
| 182 | "borderColor" => "#0074a2", |
| 183 | "borderWidth" => "1px", |
| 184 | "borderRadius" => "5px", |
| 185 | "borderStyle" => "solid", |
| 186 | "width" => "160px", |
| 187 | "lineHeight" => "30px", |
| 188 | "fontColor" => "#ffffff", |
| 189 | "fontFamily" => "Verdana", |
| 190 | "fontSize" => "16px", |
| 191 | "fontWeight" => "normal", |
| 192 | "textAlign" => "center", |
| 193 | ], |
| 194 | ], |
| 195 | ], |
| 196 | "sortBy" => "newest", |
| 197 | "showDivider" => true, |
| 198 | "divider" => [ |
| 199 | "type" => "divider", |
| 200 | "styles" => [ |
| 201 | "block" => [ |
| 202 | "backgroundColor" => "transparent", |
| 203 | "padding" => "13px", |
| 204 | "borderStyle" => "solid", |
| 205 | "borderWidth" => "3px", |
| 206 | "borderColor" => "#aaaaaa", |
| 207 | ], |
| 208 | ], |
| 209 | ], |
| 210 | "backgroundColor" => "#ffffff", |
| 211 | "backgroundColorAlternate" => "#eeeeee", |
| 212 | ], |
| 213 | [ |
| 214 | "type" => "container", |
| 215 | "orientation" => "horizontal", |
| 216 | "styles" => [ |
| 217 | "block" => [ |
| 218 | "backgroundColor" => "#f8f8f8", |
| 219 | ], |
| 220 | ], |
| 221 | "blocks" => [ |
| 222 | [ |
| 223 | "type" => "container", |
| 224 | "orientation" => "vertical", |
| 225 | "styles" => [ |
| 226 | "block" => [ |
| 227 | "backgroundColor" => "transparent", |
| 228 | ], |
| 229 | ], |
| 230 | "blocks" => [ |
| 231 | [ |
| 232 | "type" => "spacer", |
| 233 | "styles" => [ |
| 234 | "block" => [ |
| 235 | "backgroundColor" => "transparent", |
| 236 | "height" => "40px", |
| 237 | ], |
| 238 | ], |
| 239 | ], |
| 240 | [ |
| 241 | "type" => "divider", |
| 242 | "styles" => [ |
| 243 | "block" => [ |
| 244 | "backgroundColor" => "transparent", |
| 245 | "padding" => "24.5px", |
| 246 | "borderStyle" => "solid", |
| 247 | "borderWidth" => "3px", |
| 248 | "borderColor" => "#aaaaaa", |
| 249 | ], |
| 250 | ], |
| 251 | ], |
| 252 | [ |
| 253 | "type" => "social", |
| 254 | "iconSet" => "grey", |
| 255 | "icons" => [ |
| 256 | [ |
| 257 | "type" => "socialIcon", |
| 258 | "iconType" => "facebook", |
| 259 | "link" => "http://www.facebook.com", |
| 260 | "image" => $this->social_icon_url . "/11-official/Facebook.png", |
| 261 | "height" => "32px", |
| 262 | "width" => "32px", |
| 263 | "text" => "Facebook", |
| 264 | ], |
| 265 | [ |
| 266 | "type" => "socialIcon", |
| 267 | "iconType" => "twitter", |
| 268 | "link" => "http://www.twitter.com", |
| 269 | "image" => $this->social_icon_url . "/11-official/X.png", |
| 270 | "height" => "32px", |
| 271 | "width" => "32px", |
| 272 | "text" => "Twitter", |
| 273 | ], |
| 274 | ], |
| 275 | ], |
| 276 | [ |
| 277 | "type" => "divider", |
| 278 | "styles" => [ |
| 279 | "block" => [ |
| 280 | "backgroundColor" => "transparent", |
| 281 | "padding" => "7.5px", |
| 282 | "borderStyle" => "solid", |
| 283 | "borderWidth" => "3px", |
| 284 | "borderColor" => "#aaaaaa", |
| 285 | ], |
| 286 | ], |
| 287 | ], |
| 288 | [ |
| 289 | "type" => "footer", |
| 290 | "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>', |
| 291 | "styles" => [ |
| 292 | "block" => [ |
| 293 | "backgroundColor" => "transparent", |
| 294 | ], |
| 295 | "text" => [ |
| 296 | "fontColor" => "#222222", |
| 297 | "fontFamily" => "Arial", |
| 298 | "fontSize" => "12px", |
| 299 | "textAlign" => "center", |
| 300 | ], |
| 301 | "link" => [ |
| 302 | "fontColor" => "#6cb7d4", |
| 303 | "textDecoration" => "none", |
| 304 | ], |
| 305 | ], |
| 306 | ], |
| 307 | ], |
| 308 | ], |
| 309 | ], |
| 310 | ], |
| 311 | ], |
| 312 | ], |
| 313 | "globalStyles" => [ |
| 314 | "text" => [ |
| 315 | "fontColor" => "#000000", |
| 316 | "fontFamily" => "Arial", |
| 317 | "fontSize" => "16px", |
| 318 | ], |
| 319 | "h1" => [ |
| 320 | "fontColor" => "#111111", |
| 321 | "fontFamily" => "Trebuchet MS", |
| 322 | "fontSize" => "30px", |
| 323 | ], |
| 324 | "h2" => [ |
| 325 | "fontColor" => "#222222", |
| 326 | "fontFamily" => "Trebuchet MS", |
| 327 | "fontSize" => "24px", |
| 328 | ], |
| 329 | "h3" => [ |
| 330 | "fontColor" => "#333333", |
| 331 | "fontFamily" => "Trebuchet MS", |
| 332 | "fontSize" => "22px", |
| 333 | ], |
| 334 | "link" => [ |
| 335 | "fontColor" => "#21759B", |
| 336 | "textDecoration" => "underline", |
| 337 | ], |
| 338 | "wrapper" => [ |
| 339 | "backgroundColor" => "#ffffff", |
| 340 | ], |
| 341 | "body" => [ |
| 342 | "backgroundColor" => "#eeeeee", |
| 343 | ], |
| 344 | ], |
| 345 | ]; |
| 346 | } |
| 347 | |
| 348 | private function getThumbnail() { |
| 349 | return $this->external_template_image_url . '/thumbnail.20190411-1500.jpg'; |
| 350 | } |
| 351 | } |
| 352 |