PluginProbe
MailPoet – Newsletters, Email Marketing, and Automation / 5.37.0
MailPoet – Newsletters, Email Marketing, and Automation v5.37.0
5.38.0 5.37.0 5.36.1 5.36.0 5.35.1 5.35.0 5.34.3 5.34.2 5.34.1 5.34.0 5.33.1 5.33.0 5.32.0 5.31.0 5.30.0 5.29.0 5.28.1 5.28.0 5.27.0 5.26.0 5.26.1 5.25.0 5.24.0 4.43.0 4.43.1 All 542 releases
mailpoet / lib / EmailEditor / Integrations / MailPoet / Patterns / Library / EventInvitationPattern.php
EventInvitationPattern.php
74 lines 3.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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