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
SimpleText.php
210 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 SimpleText { |
| 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/simple-text'; |
| 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' => __("Simple Text", '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" => "#ffffff", |
| 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" => "spacer", |
| 65 | "styles" => [ |
| 66 | "block" => [ |
| 67 | "backgroundColor" => "transparent", |
| 68 | "height" => "30px", |
| 69 | ], |
| 70 | ], |
| 71 | ], |
| 72 | [ |
| 73 | "type" => "image", |
| 74 | "link" => "", |
| 75 | "src" => $this->template_image_url . "/fake-logo.png", |
| 76 | "alt" => __("Fake logo", 'mailpoet'), |
| 77 | "fullWidth" => false, |
| 78 | "width" => "598px", |
| 79 | "height" => "71px", |
| 80 | "styles" => [ |
| 81 | "block" => [ |
| 82 | "textAlign" => "center", |
| 83 | ], |
| 84 | ], |
| 85 | ], |
| 86 | [ |
| 87 | "type" => "text", |
| 88 | "text" => __("<p style=\"text-align: left;\">Hi [subscriber:firstname | default:subscriber],</p>\n<p style=\"text-align: left;\"></p>\n<p style=\"text-align: left;\">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>\n<p style=\"text-align: left;\"></p>\n<p style=\"text-align: left;\">Is this too simple? You can still style your text with basic formatting, like <strong>bold</strong> or <em>italics.</em></p>\n<p style=\"text-align: left;\"></p>\n<p style=\"text-align: left;\">Finally, you can also add a call-to-action button between 2 blocks of text, like this:</p>", 'mailpoet'), |
| 89 | ], |
| 90 | ], |
| 91 | ], |
| 92 | ], |
| 93 | ], |
| 94 | [ |
| 95 | "type" => "container", |
| 96 | "orientation" => "horizontal", |
| 97 | "styles" => [ |
| 98 | "block" => [ |
| 99 | "backgroundColor" => "#ffffff", |
| 100 | ], |
| 101 | ], |
| 102 | "blocks" => [ |
| 103 | [ |
| 104 | "type" => "container", |
| 105 | "orientation" => "vertical", |
| 106 | "styles" => [ |
| 107 | "block" => [ |
| 108 | "backgroundColor" => "transparent", |
| 109 | ], |
| 110 | ], |
| 111 | "blocks" => [ |
| 112 | [ |
| 113 | "type" => "spacer", |
| 114 | "styles" => [ |
| 115 | "block" => [ |
| 116 | "backgroundColor" => "transparent", |
| 117 | "height" => "23px", |
| 118 | ], |
| 119 | ], |
| 120 | ], |
| 121 | [ |
| 122 | "type" => "button", |
| 123 | "text" => __("It's time to take action!", 'mailpoet'), |
| 124 | "url" => "", |
| 125 | "styles" => [ |
| 126 | "block" => [ |
| 127 | "backgroundColor" => "#2ea1cd", |
| 128 | "borderColor" => "#0074a2", |
| 129 | "borderWidth" => "1px", |
| 130 | "borderRadius" => "5px", |
| 131 | "borderStyle" => "solid", |
| 132 | "width" => "288px", |
| 133 | "lineHeight" => "40px", |
| 134 | "fontColor" => "#ffffff", |
| 135 | "fontFamily" => "Verdana", |
| 136 | "fontSize" => "16px", |
| 137 | "fontWeight" => "normal", |
| 138 | "textAlign" => "left", |
| 139 | ], |
| 140 | ], |
| 141 | ], |
| 142 | [ |
| 143 | "type" => "text", |
| 144 | "text" => __("<p>Thanks for reading. See you soon!</p>\n<p> </p>\n<p><strong><em>The MailPoet Team</em></strong></p>", 'mailpoet'), |
| 145 | ], |
| 146 | [ |
| 147 | "type" => "footer", |
| 148 | "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>', |
| 149 | "styles" => [ |
| 150 | "block" => [ |
| 151 | "backgroundColor" => "transparent", |
| 152 | ], |
| 153 | "text" => [ |
| 154 | "fontColor" => "#222222", |
| 155 | "fontFamily" => "Arial", |
| 156 | "fontSize" => "12px", |
| 157 | "textAlign" => "left", |
| 158 | ], |
| 159 | "link" => [ |
| 160 | "fontColor" => "#6cb7d4", |
| 161 | "textDecoration" => "none", |
| 162 | ], |
| 163 | ], |
| 164 | ], |
| 165 | ], |
| 166 | ], |
| 167 | ], |
| 168 | ], |
| 169 | ], |
| 170 | ], |
| 171 | "globalStyles" => [ |
| 172 | "text" => [ |
| 173 | "fontColor" => "#000000", |
| 174 | "fontFamily" => "Arial", |
| 175 | "fontSize" => "15px", |
| 176 | ], |
| 177 | "h1" => [ |
| 178 | "fontColor" => "#111111", |
| 179 | "fontFamily" => "Trebuchet MS", |
| 180 | "fontSize" => "30px", |
| 181 | ], |
| 182 | "h2" => [ |
| 183 | "fontColor" => "#222222", |
| 184 | "fontFamily" => "Trebuchet MS", |
| 185 | "fontSize" => "24px", |
| 186 | ], |
| 187 | "h3" => [ |
| 188 | "fontColor" => "#333333", |
| 189 | "fontFamily" => "Trebuchet MS", |
| 190 | "fontSize" => "22px", |
| 191 | ], |
| 192 | "link" => [ |
| 193 | "fontColor" => "#21759B", |
| 194 | "textDecoration" => "underline", |
| 195 | ], |
| 196 | "wrapper" => [ |
| 197 | "backgroundColor" => "#ffffff", |
| 198 | ], |
| 199 | "body" => [ |
| 200 | "backgroundColor" => "#ffffff", |
| 201 | ], |
| 202 | ], |
| 203 | ]; |
| 204 | } |
| 205 | |
| 206 | private function getThumbnail() { |
| 207 | return $this->external_template_image_url . '/thumbnail.20190411-1500.jpg'; |
| 208 | } |
| 209 | } |
| 210 |