mailpoet
/
lib
/
EmailEditor
/
Integrations
/
MailPoet
/
Patterns
/
Library
/
EventInvitationPattern.php
AbandonedCartPattern.php
4 months ago
AbandonedCartReminderPattern.php
1 month ago
AbandonedCartWithDiscountPattern.php
1 month ago
AbstractAbandonedCartPattern.php
5 months ago
AskForReviewPostPurchasePattern.php
1 month ago
BirthdayEmailPattern.php
1 month ago
BookingAutomationEmailPattern.php
1 month ago
CategoryPurchaseFollowUpPattern.php
1 month ago
EducationalCampaignPattern.php
1 month ago
EventInvitationPattern.php
3 months ago
FirstPurchaseThankYouPattern.php
1 month ago
NewArrivalsAnnouncementPattern.php
3 months ago
NewProductsAnnouncementPattern.php
3 months ago
NewsletterPattern.php
4 months ago
PostPurchaseThankYouPattern.php
1 month ago
ProductPurchaseFollowUpPattern.php
1 month ago
ProductRestockNotificationPattern.php
5 months ago
SaleAnnouncementPattern.php
3 months ago
SubscriptionAutomationEmailPattern.php
1 month ago
TagPurchaseFollowUpPattern.php
1 month ago
WelcomeEmailPattern.php
1 month ago
WelcomeWithDiscountEmailPattern.php
1 month ago
WinBackCustomerPattern.php
1 month ago
index.php
1 year ago
EventInvitationPattern.php
74 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\EmailEditor\Integrations\MailPoet\Patterns\Library; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\EmailEditor\Integrations\MailPoet\EmailEditor; |
| 9 | use MailPoet\EmailEditor\Integrations\MailPoet\Patterns\Pattern; |
| 10 | |
| 11 | /** |
| 12 | * Event invitation email pattern. |
| 13 | */ |
| 14 | class EventInvitationPattern extends Pattern { |
| 15 | protected $name = 'event-invitation'; |
| 16 | protected $block_types = ['core/post-content']; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps |
| 17 | protected $template_types = ['email-template']; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps |
| 18 | protected $categories = ['event']; |
| 19 | protected $post_types = [EmailEditor::MAILPOET_EMAIL_POST_TYPE]; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps |
| 20 | |
| 21 | /** |
| 22 | * Get pattern content. |
| 23 | * |
| 24 | * @return string Pattern HTML content. |
| 25 | */ |
| 26 | protected function get_content(): string { // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps |
| 27 | return ' |
| 28 | <!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|40","left":"var:preset|spacing|40"}}},"layout":{"type":"constrained"}} --> |
| 29 | <div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"><!-- wp:heading {"level":1} --> |
| 30 | <h1 class="wp-block-heading">' . |
| 31 | /* translators: EVENT NAME is placeholder text that merchants replace with their own content. */ |
| 32 | __('Join us for EVENT NAME', 'mailpoet') . '</h1> |
| 33 | <!-- /wp:heading --> |
| 34 | |
| 35 | <!-- wp:paragraph {"style":{"typography":{"fontSize":"16px"}}} --> |
| 36 | <p style="font-size:16px">' . |
| 37 | /* translators: A BRIEF DESCRIPTION OF THE EVENT is placeholder text that merchants replace with their own content. */ |
| 38 | __("You're invited 🎉 Join us for A BRIEF DESCRIPTION OF THE EVENT and be part of our exclusive event series.", 'mailpoet') . '</p> |
| 39 | <!-- /wp:paragraph --> |
| 40 | |
| 41 | <!-- wp:image {"sizeSlug":"full"} --> |
| 42 | <figure class="wp-block-image size-full"><img src="' . esc_url($this->cdnAssetUrl->generateCdnUrl('email-editor/event-invitation.jpg')) . '" alt="' . esc_attr__('Event invitation image', 'mailpoet') . '"/></figure> |
| 43 | <!-- /wp:image --> |
| 44 | |
| 45 | <!-- wp:heading {"textAlign":"center","fontSize":"large"} --> |
| 46 | <h2 class="wp-block-heading has-text-align-center has-large-font-size">' . |
| 47 | /* translators: Placeholder text that merchants replace with their own content. */ |
| 48 | __('MONTH DAY, at TIME', 'mailpoet') . '</h2> |
| 49 | <!-- /wp:heading --> |
| 50 | |
| 51 | <!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":"16px"}}} --> |
| 52 | <p class="has-text-align-center" style="font-size:16px">' . |
| 53 | /* translators: Placeholder text that merchants replace with their own content. */ |
| 54 | __('BUILDING STREET, CITY', 'mailpoet') . '</p> |
| 55 | <!-- /wp:paragraph --> |
| 56 | |
| 57 | <!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} --> |
| 58 | <div class="wp-block-buttons"> |
| 59 | <!-- wp:button {"style":{"typography":{"fontSize":"16px"},"spacing":{"padding":{"top":"var:preset|spacing|10","bottom":"var:preset|spacing|10","left":"var:preset|spacing|20","right":"var:preset|spacing|20"}}}} --> |
| 60 | <div class="wp-block-button"><a class="wp-block-button__link wp-element-button has-custom-font-size" style="font-size:16px;padding-top:var(--wp--preset--spacing--10);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20)" href="[mailpoet/site-homepage-url]">' . __('RSVP now', 'mailpoet') . '</a></div> |
| 61 | <!-- /wp:button --> |
| 62 | </div> |
| 63 | <!-- /wp:buttons --> |
| 64 | </div> |
| 65 | <!-- /wp:group --> |
| 66 | '; |
| 67 | } |
| 68 | |
| 69 | protected function get_title(): string { // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps |
| 70 | /* translators: Name of a content pattern used as starting content of an email */ |
| 71 | return __('Event Invitation', 'mailpoet'); |
| 72 | } |
| 73 | } |
| 74 |