init
This commit is contained in:
@@ -0,0 +1,168 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Entities\FormEntity;
|
||||
use MailPoet\Settings\SettingsController;
|
||||
use MailPoet\Util\CdnAssetUrl;
|
||||
use MailPoet\Util\Helpers;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
abstract class FormTemplate {
|
||||
const DEFAULT_STYLES = <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
|
||||
/** @var CdnAssetUrl */
|
||||
protected $cdnAssetUrl;
|
||||
|
||||
/** @var WPFunctions */
|
||||
protected $wp;
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = '';
|
||||
|
||||
/** @var SettingsController */
|
||||
private $settings;
|
||||
|
||||
public function __construct(
|
||||
CdnAssetUrl $cdnAssetUrl,
|
||||
SettingsController $settings,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->cdnAssetUrl = $cdnAssetUrl;
|
||||
$this->wp = $wp;
|
||||
$this->settings = $settings;
|
||||
}
|
||||
|
||||
abstract public function getName(): string;
|
||||
|
||||
abstract public function getBody(): array;
|
||||
|
||||
abstract public function getThumbnailUrl(): string;
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => null,
|
||||
'segments_selected_by' => 'admin',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return self::DEFAULT_STYLES;
|
||||
}
|
||||
|
||||
public function toFormEntity(): FormEntity {
|
||||
$formEntity = new FormEntity($this->getName());
|
||||
$formEntity->setBody($this->getBody());
|
||||
$formEntity->setSettings($this->getSettings());
|
||||
$formEntity->setStyles($this->getStyles());
|
||||
$settings = $formEntity->getSettings();
|
||||
if (!isset($settings['success_message']) || !($settings['success_message'])) {
|
||||
$settings['success_message'] = $this->getDefaultSuccessMessage();
|
||||
$formEntity->setSettings($settings);
|
||||
}
|
||||
return $formEntity;
|
||||
}
|
||||
|
||||
private function getDefaultSuccessMessage() {
|
||||
if ($this->settings->get('signup_confirmation.enabled')) {
|
||||
return __('Check your inbox or spam folder to confirm your subscription.', 'mailpoet');
|
||||
}
|
||||
return __('You’ve been successfully subscribed to our newsletter!', 'mailpoet');
|
||||
}
|
||||
|
||||
protected function getAssetUrl(string $filename): string {
|
||||
return $this->cdnAssetUrl->generateCdnUrl("form-templates/{$this->assetsDirectory}/$filename");
|
||||
}
|
||||
|
||||
protected function replaceLinkTags($source, $link, $attributes = []): string {
|
||||
return Helpers::replaceLinkTags($source, $link, $attributes);
|
||||
}
|
||||
|
||||
protected function replacePrivacyLinkTags($source, $link = '#'): string {
|
||||
$privacyPolicyUrl = $this->wp->getPrivacyPolicyUrl();
|
||||
$attributes = [];
|
||||
|
||||
if (!empty($privacyPolicyUrl)) {
|
||||
$link = $this->wp->escUrl($privacyPolicyUrl);
|
||||
$attributes = ['target' => '_blank'];
|
||||
}
|
||||
return $this->replaceLinkTags($source, $link, $attributes);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\Templates\InitialForm;
|
||||
use MailPoet\Form\Templates\Templates\Template10BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template10FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template10Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template10SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template10Widget;
|
||||
use MailPoet\Form\Templates\Templates\Template11BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template11FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template11Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template11SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template11Widget;
|
||||
use MailPoet\Form\Templates\Templates\Template12BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template12FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template12Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template12SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template12Widget;
|
||||
use MailPoet\Form\Templates\Templates\Template13BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template13FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template13Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template13SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template13Widget;
|
||||
use MailPoet\Form\Templates\Templates\Template14BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template14FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template14Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template14SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template14Widget;
|
||||
use MailPoet\Form\Templates\Templates\Template17BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template17FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template17Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template17SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template17Widget;
|
||||
use MailPoet\Form\Templates\Templates\Template18BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template18FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template18Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template18SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template18Widget;
|
||||
use MailPoet\Form\Templates\Templates\Template1BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template1FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template1Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template1SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template1Widget;
|
||||
use MailPoet\Form\Templates\Templates\Template3BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template3FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template3Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template3SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template3Widget;
|
||||
use MailPoet\Form\Templates\Templates\Template4BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template4FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template4Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template4SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template4Widget;
|
||||
use MailPoet\Form\Templates\Templates\Template6BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template6FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template6Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template6SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template6Widget;
|
||||
use MailPoet\Form\Templates\Templates\Template7BelowPages;
|
||||
use MailPoet\Form\Templates\Templates\Template7FixedBar;
|
||||
use MailPoet\Form\Templates\Templates\Template7Popup;
|
||||
use MailPoet\Form\Templates\Templates\Template7SlideIn;
|
||||
use MailPoet\Form\Templates\Templates\Template7Widget;
|
||||
use MailPoet\Settings\SettingsController;
|
||||
use MailPoet\UnexpectedValueException;
|
||||
use MailPoet\Util\CdnAssetUrl;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
class TemplateRepository {
|
||||
const INITIAL_FORM_TEMPLATE = InitialForm::ID;
|
||||
|
||||
/** @var CdnAssetUrl */
|
||||
private $cdnAssetUrl;
|
||||
|
||||
/** @var WPFunctions */
|
||||
private $wp;
|
||||
|
||||
/** @var SettingsController */
|
||||
private $settings;
|
||||
|
||||
|
||||
private $templates = [
|
||||
InitialForm::ID => InitialForm::class,
|
||||
Template1BelowPages::ID => Template1BelowPages::class,
|
||||
Template1FixedBar::ID => Template1FixedBar::class,
|
||||
Template1Popup::ID => Template1Popup::class,
|
||||
Template1SlideIn::ID => Template1SlideIn::class,
|
||||
Template1Widget::ID => Template1Widget::class,
|
||||
Template3BelowPages::ID => Template3BelowPages::class,
|
||||
Template3FixedBar::ID => Template3FixedBar::class,
|
||||
Template3Popup::ID => Template3Popup::class,
|
||||
Template3SlideIn::ID => Template3SlideIn::class,
|
||||
Template3Widget::ID => Template3Widget::class,
|
||||
Template4BelowPages::ID => Template4BelowPages::class,
|
||||
Template4FixedBar::ID => Template4FixedBar::class,
|
||||
Template4Popup::ID => Template4Popup::class,
|
||||
Template4SlideIn::ID => Template4SlideIn::class,
|
||||
Template4Widget::ID => Template4Widget::class,
|
||||
Template6BelowPages::ID => Template6BelowPages::class,
|
||||
Template6FixedBar::ID => Template6FixedBar::class,
|
||||
Template6Popup::ID => Template6Popup::class,
|
||||
Template6SlideIn::ID => Template6SlideIn::class,
|
||||
Template6Widget::ID => Template6Widget::class,
|
||||
Template7BelowPages::ID => Template7BelowPages::class,
|
||||
Template7FixedBar::ID => Template7FixedBar::class,
|
||||
Template7Popup::ID => Template7Popup::class,
|
||||
Template7SlideIn::ID => Template7SlideIn::class,
|
||||
Template7Widget::ID => Template7Widget::class,
|
||||
Template10BelowPages::ID => Template10BelowPages::class,
|
||||
Template10FixedBar::ID => Template10FixedBar::class,
|
||||
Template10Popup::ID => Template10Popup::class,
|
||||
Template10SlideIn::ID => Template10SlideIn::class,
|
||||
Template10Widget::ID => Template10Widget::class,
|
||||
Template11BelowPages::ID => Template11BelowPages::class,
|
||||
Template11FixedBar::ID => Template11FixedBar::class,
|
||||
Template11Popup::ID => Template11Popup::class,
|
||||
Template11SlideIn::ID => Template11SlideIn::class,
|
||||
Template11Widget::ID => Template11Widget::class,
|
||||
Template12BelowPages::ID => Template12BelowPages::class,
|
||||
Template12FixedBar::ID => Template12FixedBar::class,
|
||||
Template12Popup::ID => Template12Popup::class,
|
||||
Template12SlideIn::ID => Template12SlideIn::class,
|
||||
Template12Widget::ID => Template12Widget::class,
|
||||
Template13BelowPages::ID => Template13BelowPages::class,
|
||||
Template13FixedBar::ID => Template13FixedBar::class,
|
||||
Template13Popup::ID => Template13Popup::class,
|
||||
Template13SlideIn::ID => Template13SlideIn::class,
|
||||
Template13Widget::ID => Template13Widget::class,
|
||||
Template14BelowPages::ID => Template14BelowPages::class,
|
||||
Template14FixedBar::ID => Template14FixedBar::class,
|
||||
Template14Popup::ID => Template14Popup::class,
|
||||
Template14SlideIn::ID => Template14SlideIn::class,
|
||||
Template14Widget::ID => Template14Widget::class,
|
||||
Template17BelowPages::ID => Template17BelowPages::class,
|
||||
Template17FixedBar::ID => Template17FixedBar::class,
|
||||
Template17Popup::ID => Template17Popup::class,
|
||||
Template17SlideIn::ID => Template17SlideIn::class,
|
||||
Template17Widget::ID => Template17Widget::class,
|
||||
Template18BelowPages::ID => Template18BelowPages::class,
|
||||
Template18FixedBar::ID => Template18FixedBar::class,
|
||||
Template18Popup::ID => Template18Popup::class,
|
||||
Template18SlideIn::ID => Template18SlideIn::class,
|
||||
Template18Widget::ID => Template18Widget::class,
|
||||
];
|
||||
|
||||
public function __construct(
|
||||
CdnAssetUrl $cdnAssetUrl,
|
||||
SettingsController $settings,
|
||||
WPFunctions $wp
|
||||
) {
|
||||
$this->cdnAssetUrl = $cdnAssetUrl;
|
||||
$this->wp = $wp;
|
||||
$this->settings = $settings;
|
||||
}
|
||||
|
||||
public function getFormTemplate(string $templateId): FormTemplate {
|
||||
if (!isset($this->templates[$templateId])) {
|
||||
throw UnexpectedValueException::create()
|
||||
->withErrors(["Template with id $templateId doesn't exist."]);
|
||||
}
|
||||
/** @var FormTemplate $template */
|
||||
$template = new $this->templates[$templateId]($this->cdnAssetUrl, $this->settings, $this->wp);
|
||||
return $template;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $templateIds
|
||||
* @return FormTemplate[] associative array with template ids as keys
|
||||
*/
|
||||
public function getFormTemplates(array $templateIds): array {
|
||||
$result = [];
|
||||
foreach ($templateIds as $templateId) {
|
||||
$result[$templateId] = $this->getFormTemplate($templateId);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class InitialForm extends FormTemplate {
|
||||
const ID = 'initial_form';
|
||||
|
||||
public function getName(): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'id' => 'email',
|
||||
'name' => __('Email', 'mailpoet'),
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => __('Email Address', 'mailpoet'),
|
||||
'required' => true,
|
||||
'label_within' => true,
|
||||
],
|
||||
'styles' => [
|
||||
'full_width' => true,
|
||||
],
|
||||
],
|
||||
[
|
||||
'id' => 'submit',
|
||||
'name' => __('Submit', 'mailpoet'),
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => __('Subscribe!', 'mailpoet'),
|
||||
],
|
||||
'styles' => [
|
||||
'full_width' => true,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,303 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template10BelowPages extends FormTemplate {
|
||||
const ID = 'template_10_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-10';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Keep in Touch', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . _x('LET’S KEEP IN TOUCH!', 'Text in a web form', 'mailpoet') . '</span></strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '48',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . _x('We’d love to keep you updated with our latest news and offers', 'Text in a web form.', 'mailpoet') . '</span> ' . $this->wp->wpStaticizeEmoji('😎'),
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'line_height' => '1',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('What’s your name?', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'first_name',
|
||||
'name' => 'First name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('And your surname?', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'last_name',
|
||||
'name' => 'Last name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Keep me posted!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ff6900',
|
||||
'font_size' => '20',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Ubuntu',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.2',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '20',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => [
|
||||
'enabled' => '1',
|
||||
'below_post_styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '4',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '40',
|
||||
'input_padding' => '12',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'classic_white',
|
||||
'segments_selected_by' => 'admin',
|
||||
'fontColor' => '#ffffff',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(70,219,232) 0%,rgb(197,222,213) 100%)',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'font_family' => 'Ubuntu',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: -10px 0 10px 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,341 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template10FixedBar extends FormTemplate {
|
||||
const ID = 'template_10_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-10';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Keep in Touch', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . _x('LET’S KEEP IN TOUCH!', 'Text in a web form.', 'mailpoet') . '</span></strong> ' . $this->wp->wpStaticizeEmoji('😎'),
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '40',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We’d love to keep you updated with our latest news! We promise we’ll never spam. Take a look at our [link]Privacy Policy[/link] for more details.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '20',
|
||||
'line_height' => '1.2',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '25',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('What’s your name?', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'first_name',
|
||||
'name' => 'First name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '25',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('And your surname?', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'last_name',
|
||||
'name' => 'Last name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '25',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '25',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Keep me posted!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ff6900',
|
||||
'font_size' => '21',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Ubuntu',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '20',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'position' => 'bottom',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '40',
|
||||
'input_padding' => '12',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'classic_white',
|
||||
'segments_selected_by' => 'admin',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(70,219,232) 0%,rgb(197,222,213) 100%)',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'font_family' => 'Ubuntu',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: -10px 0 10px 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,273 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template10Popup extends FormTemplate {
|
||||
const ID = 'template_10_popup';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-10';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Keep in Touch', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . _x('LET’S KEEP IN TOUCH!', 'Text in a web form', 'mailpoet') . '</span></strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '50',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . _x('We’d love to keep you updated with our latest news and offers', 'Text in a web form.', 'mailpoet') . '</span> ' . $this->wp->wpStaticizeEmoji('😎'),
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'line_height' => '1',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('What’s your name?', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'first_name',
|
||||
'name' => 'First name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('And your surname?', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'last_name',
|
||||
'name' => 'Last name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Keep me posted!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ff6900',
|
||||
'font_size' => '24',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Ubuntu',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'line_height' => '1.2',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '20',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '440',
|
||||
],
|
||||
],
|
||||
],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '24',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '40',
|
||||
'input_padding' => '12',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'classic_white',
|
||||
'segments_selected_by' => 'admin',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(70,219,232) 0%,rgb(197,222,213) 100%)',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'font_family' => 'Ubuntu',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: -10px 0 10px 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template10SlideIn extends FormTemplate {
|
||||
const ID = 'template_10_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-10';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Keep in Touch', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . _x('LET’S KEEP IN TOUCH!', 'Text in a web form', 'mailpoet') . '</span></strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '50',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . _x('We’d love to keep you updated with our latest news and offers', 'Text in a web form.', 'mailpoet') . '</span> ' . $this->wp->wpStaticizeEmoji('😎'),
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'line_height' => '1',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('What’s your name?', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'first_name',
|
||||
'name' => 'First name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('And your surname?', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'last_name',
|
||||
'name' => 'Last name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Keep me posted!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ff6900',
|
||||
'font_size' => '24',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Ubuntu',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'line_height' => '1.2',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '20',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'form_position' => 'right',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '420',
|
||||
],
|
||||
],
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '24',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '40',
|
||||
'input_padding' => '12',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'classic_white',
|
||||
'segments_selected_by' => 'admin',
|
||||
'fontColor' => '#ffffff',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(70,219,232) 0%,rgb(197,222,213) 100%)',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'font_family' => 'Ubuntu',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: -10px 0 10px 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,273 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template10Widget extends FormTemplate {
|
||||
const ID = 'template_10_widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-10';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Keep in Touch', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . _x('LET’S KEEP IN TOUCH!', 'Text in a web form', 'mailpoet') . '</span></strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '25',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . _x('We’d love to keep you updated with our latest news and offers', 'Text in a web form.', 'mailpoet') . '</span> ' . $this->wp->wpStaticizeEmoji('😎'),
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '18',
|
||||
'line_height' => '1',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('What’s your name?', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'first_name',
|
||||
'name' => 'First name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('And your surname?', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'last_name',
|
||||
'name' => 'Last name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b8ba7',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Keep me posted!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ff6900',
|
||||
'font_size' => '20',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Ubuntu',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Concert One" data-font="Concert One" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'line_height' => '1.2',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '20',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'border_radius' => '24',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '15',
|
||||
'input_padding' => '12',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'classic_white',
|
||||
'segments_selected_by' => 'admin',
|
||||
'fontColor' => '#ffffff',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(70,219,232) 0%,rgb(197,222,213) 100%)',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'font_family' => 'Ubuntu',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: -10px 0 10px 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,376 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template11BelowPages extends FormTemplate {
|
||||
const ID = 'template_11_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-11';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Priority List', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '60',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '20',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'center',
|
||||
'width' => '30',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => 'left',
|
||||
'url' => $this->getAssetUrl('soundicon.png'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '68',
|
||||
'height' => '69',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'center',
|
||||
'width' => '70',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font"><strong>' . _x('DON’T MISS A BEAT', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '25',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font">' . _x('Be the first to know when our album is released on <strong>iTunes</strong> and <strong><span style="color:#01d386" class="has-inline-color">Spotify</span></strong>', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '15',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => 'center',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#4c537e',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE LIST', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#4c537e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '15',
|
||||
'font_family' => 'Fira Sans',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '40',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('Guitarist-787x1024.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'backgroundColor' => '#27282e',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'below_posts' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'value' => '100',
|
||||
'unit' => 'percent',
|
||||
],
|
||||
],
|
||||
'posts' => [
|
||||
'all' => '',
|
||||
],
|
||||
'pages' => [
|
||||
'all' => '',
|
||||
],
|
||||
],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '3',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '15',
|
||||
'font_family' => 'Fira Sans',
|
||||
'close_button' => 'classic_white',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:first-child,
|
||||
.mailpoet_form_column:first-child {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 15px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,326 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template11FixedBar extends FormTemplate {
|
||||
const ID = 'template_11_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-11';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Priority List', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'top',
|
||||
'width' => '7',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('soundicon.png'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '68',
|
||||
'height' => '69',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '31',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font"><strong>' . _x('DON’T MISS A BEAT', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '25',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font">' . _x('Be the first to know when our album is released on <strong>iTunes</strong> and <strong><span style="color:#01d386" class="has-inline-color">Spotify</span></strong>', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '15',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '31',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#4c537e',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '31',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE LIST', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#4c537e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'backgroundColor' => '#27282e',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
'position' => 'top',
|
||||
'animation' => 'slideup',
|
||||
'posts' => [
|
||||
'all' => '',
|
||||
],
|
||||
'pages' => [
|
||||
'all' => '',
|
||||
],
|
||||
],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => '',],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '10',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
'close_button' => 'classic_white',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin-bottom: 6px;
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,347 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template11Popup extends FormTemplate {
|
||||
const ID = 'template_11_popup';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-11';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Priority List', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => 'center',
|
||||
'url' => $this->getAssetUrl('soundicon.png'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '68',
|
||||
'height' => '69',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font"><strong>' . _x('DON’T MISS A BEAT', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '22',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font">' . _x('Be the first to know when our album is released on <strong>iTunes</strong> and <strong><span style="color:#01d386" class="has-inline-color">Spotify</span></strong>', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#4c537e',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE LIST', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#4c537e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('Guitarist-787x1024.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'backgroundColor' => '#27282e',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'exit_intent_enabled' => '',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '600',
|
||||
],
|
||||
],
|
||||
'animation' => 'slideup',
|
||||
'posts' => [
|
||||
'all' => '',
|
||||
],
|
||||
'pages' => [
|
||||
'all' => '',
|
||||
],
|
||||
],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => '',],
|
||||
'slide_in' => ['enabled' => '',],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '3',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
'close_button' => 'classic_white',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:first-child,
|
||||
.mailpoet_form_column:first-child {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 12px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,346 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template11SlideIn extends FormTemplate {
|
||||
const ID = 'template_11_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-11';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Priority List', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => 'center',
|
||||
'url' => $this->getAssetUrl('soundicon.png'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '68',
|
||||
'height' => '69',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font"><strong>' . _x('DON’T MISS A BEAT', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '22',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font">' . _x('Be the first to know when our album is released on <strong>iTunes</strong> and <strong><span style="color:#01d386" class="has-inline-color">Spotify</span></strong>', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#4c537e',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE LIST', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#4c537e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('Guitarist-787x1024.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'backgroundColor' => '#27282e',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'position' => 'right',
|
||||
'animation' => 'right',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '600',
|
||||
],
|
||||
],
|
||||
'posts' => [
|
||||
'all' => '',
|
||||
],
|
||||
'pages' => [
|
||||
'all' => '',
|
||||
],
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '3',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
'close_button' => 'classic_white',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:first-child,
|
||||
.mailpoet_form_column:first-child {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 12px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template11Widget extends FormTemplate {
|
||||
const ID = 'template_11_widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-11';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Priority List', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => 'center',
|
||||
'url' => $this->getAssetUrl('soundicon.png'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '68',
|
||||
'height' => '69',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font"><strong>' . _x('DON’T MISS A BEAT', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font">' . _x('Be the first to know when our album is released on <strong>iTunes</strong> and <strong><span style="color:#01d386" class="has-inline-color">Spotify</span></strong>', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#4c537e',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE LIST', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#4c537e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'backgroundColor' => '#27282e',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => '',],
|
||||
'slide_in' => ['enabled' => '',],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'border_radius' => '3',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '15',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
'close_button' => 'classic_white',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 12px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,318 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template12BelowPages extends FormTemplate {
|
||||
const ID = 'template_12_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-12';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Limited Time Offer', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '33',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('Fashion-Image-1.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '67',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('DEAL<span style="color:#e04f8e" class="has-inline-color">WEEK</span>', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</strong>',
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '45',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . _x('<strong>SUBSCRIBE</strong> AND <strong><span style="color:#e04f8e" class="has-inline-color">GET 20% OFF</span></strong> YOUR NEXT ORDER! <strong>OFFER ENDS SOON</strong> - DON’T MISS OUT!', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '20',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Full Name', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'first_name',
|
||||
'name' => 'First name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#000000',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#000000',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('GET 20% OFF', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#e04f8e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Cairo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '15',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'backgroundColor' => '#ffffff',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'below_posts' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
'posts' => [
|
||||
'all' => '',
|
||||
],
|
||||
'pages' => [
|
||||
'all' => '',
|
||||
],
|
||||
],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Cairo',
|
||||
'close_button' => 'square_black',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'border_color' => '#000000',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 25px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,359 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template12FixedBar extends FormTemplate {
|
||||
const ID = 'template_12_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-12';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Limited Time Offer', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '25',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('DEAL<span style="color:#e04f8e" class="has-inline-color">WEEK</span>', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</strong>',
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '36',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '25',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Full Name', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'first_name',
|
||||
'name' => 'First name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#000000',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '25',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#000000',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '25',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('GET 20% OFF', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#e04f8e',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Cairo',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '65',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . _x('<strong>SUBSCRIBE</strong> AND <strong><span style="color:#e04f8e" class="has-inline-color">GET 20% OFF</span></strong> YOUR NEXT ORDER! <strong>OFFER ENDS SOON</strong> - DON’T MISS OUT!', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '17',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'center',
|
||||
'width' => '35',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'right',
|
||||
'font_size' => '15',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
'position' => 'top',
|
||||
'animation' => 'slideup',
|
||||
'posts' => [
|
||||
'all' => '',
|
||||
],
|
||||
'pages' => [
|
||||
'all' => '',
|
||||
],
|
||||
],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Cairo',
|
||||
'close_button' => 'square_black',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'gradient' => 'linear-gradient(230deg,rgba(255,159,218,0.7) 0%,rgb(255,255,255) 41%)',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,334 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template12Popup extends FormTemplate {
|
||||
const ID = 'template_12_popup';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-12';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Limited Time Offer', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('Fashion-Image-1.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('DEAL<span style="color:#e04f8e" class="has-inline-color">WEEK</span>', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</strong>',
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '35',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . _x('<strong>SUBSCRIBE</strong> AND <strong><span style="color:#e04f8e" class="has-inline-color">GET 20% OFF</span></strong> YOUR NEXT ORDER! <strong>OFFER ENDS SOON</strong> - DON’T MISS OUT!', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '17',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Full Name', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'first_name',
|
||||
'name' => 'First name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#000000',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#000000',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('GET 20% OFF', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#e04f8e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Cairo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '15',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'exit_intent_enabled' => '',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '580',
|
||||
],
|
||||
],
|
||||
'animation' => 'slideup',
|
||||
'posts' => [
|
||||
'all' => '',
|
||||
],
|
||||
'pages' => [
|
||||
'all' => '',
|
||||
],
|
||||
],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Cairo',
|
||||
'close_button' => 'square_black',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'gradient' => 'linear-gradient(230deg,rgba(255,159,218,0.7) 0%,rgb(255,255,255) 32%)',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,334 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template12SlideIn extends FormTemplate {
|
||||
const ID = 'template_12_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-12';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Limited Time Offer', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('Fashion-Image-1.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('DEAL<span style="color:#e04f8e" class="has-inline-color">WEEK</span>', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</strong>',
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '35',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . _x('<strong>SUBSCRIBE</strong> AND <strong><span style="color:#e04f8e" class="has-inline-color">GET 20% OFF</span></strong> YOUR NEXT ORDER! <strong>OFFER ENDS SOON</strong> - DON’T MISS OUT!', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '17',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Full Name', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'first_name',
|
||||
'name' => 'First name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#000000',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#000000',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('GET 20% OFF', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#e04f8e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Cairo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '15',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'position' => 'right',
|
||||
'animation' => 'right',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '580',
|
||||
],
|
||||
],
|
||||
'posts' => [
|
||||
'all' => '',
|
||||
],
|
||||
'pages' => [
|
||||
'all' => '',
|
||||
],
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Cairo',
|
||||
'close_button' => 'square_black',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'gradient' => 'linear-gradient(230deg,rgba(255,159,218,0.7) 0%,rgb(255,255,255) 30%)',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template12Widget extends FormTemplate {
|
||||
const ID = 'template_12_widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-12';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Limited Time Offer', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('DEAL<span style="color:#e04f8e" class="has-inline-color">WEEK</span>', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</strong>',
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '35',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . _x('<strong>SUBSCRIBE</strong> AND <strong><span style="color:#e04f8e" class="has-inline-color">GET 20% OFF</span></strong> YOUR NEXT ORDER! <strong>OFFER ENDS SOON</strong> - DON’T MISS OUT!', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '17',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Full Name', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'first_name',
|
||||
'name' => 'First name',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#000000',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#000000',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('GET 20% OFF', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#e04f8e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Cairo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '15',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'backgroundColor' => '#ffffff',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Cairo',
|
||||
'close_button' => 'square_black',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,321 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template13BelowPages extends FormTemplate {
|
||||
const ID = 'template_13_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-13';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Restaurant Discount', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '25',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('pic-684x1024.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '75',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '5',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '4',
|
||||
'divider_width' => '20',
|
||||
'color' => '#dcb64b',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font"><strong>' . _x('10% OFF YOUR BILL', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '30',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Titillium Web" data-font="Titillium Web" class="mailpoet-has-font">' . _x('SUBSCRIBE TO OUR NEWSLETTER AND SAVE 10% NEXT TIME YOU DINE IN', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '16',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#eeeeee',
|
||||
'font_color' => '#707070',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '0',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE LIST', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#dcb64b',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '0',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Titillium Web" data-font="Titillium Web" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Titillium Web',
|
||||
'close_button' => 'classic',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,334 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template13FixedBar extends FormTemplate {
|
||||
const ID = 'template_13_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-13';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Restaurant Discount', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('pic-684x1024.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '60',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '5',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '4',
|
||||
'divider_width' => '20',
|
||||
'color' => '#dcb64b',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font"><strong>' . _x('10% OFF YOUR BILL', 'Text in a web form', 'mailpoet') . '</strong></span>', // @todo Add translations, links and emoji processing.,
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '24',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Titillium Web" data-font="Titillium Web" class="mailpoet-has-font">' . _x('SUBSCRIBE TO OUR NEWSLETTER AND SAVE 10% NEXT TIME YOU DINE IN', 'Text in a web form', 'mailpoet') . '</span><br>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#'),
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '30',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#eeeeee',
|
||||
'font_color' => '#707070',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '0',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE LIST', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#dcb64b',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '0',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
'position' => 'top',
|
||||
'animation' => 'slideup',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Titillium Web',
|
||||
'close_button' => 'classic',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,322 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template13Popup extends FormTemplate {
|
||||
const ID = 'template-13-popup';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-13';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Restaurant Discount', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '40',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('pic-684x1024.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '60',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '5',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '4',
|
||||
'divider_width' => '20',
|
||||
'color' => '#dcb64b',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font"><strong>' . _x('10% OFF YOUR BILL', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '30',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Titillium Web" data-font="Titillium Web" class="mailpoet-has-font">' . _x('SUBSCRIBE TO OUR NEWSLETTER AND SAVE 10% NEXT TIME YOU DINE IN', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '16',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#eeeeee',
|
||||
'font_color' => '#707070',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '0',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE LIST', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#dcb64b',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '0',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Titillium Web" data-font="Titillium Web" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '600',
|
||||
],
|
||||
],
|
||||
'animation' => 'slideup',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Titillium Web',
|
||||
'close_button' => 'classic',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,323 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template13SlideIn extends FormTemplate {
|
||||
const ID = 'template_13_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-13';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Restaurant Discount', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '40',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('pic-684x1024.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '60',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '5',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '4',
|
||||
'divider_width' => '20',
|
||||
'color' => '#dcb64b',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font"><strong>' . _x('10% OFF YOUR BILL', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '30',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Titillium Web" data-font="Titillium Web" class="mailpoet-has-font">' . _x('SUBSCRIBE TO OUR NEWSLETTER AND SAVE 10% NEXT TIME YOU DINE IN', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '16',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#eeeeee',
|
||||
'font_color' => '#707070',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '0',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE LIST', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#dcb64b',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '0',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Titillium Web" data-font="Titillium Web" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'position' => 'right',
|
||||
'animation' => 'right',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '600',
|
||||
],
|
||||
],
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Titillium Web',
|
||||
'close_button' => 'classic',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template13Widget extends FormTemplate {
|
||||
const ID = 'template_13_widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-13';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Restaurant Discount', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '5',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '4',
|
||||
'divider_width' => '20',
|
||||
'color' => '#dcb64b',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Fira Sans" data-font="Fira Sans" class="mailpoet-has-font"><strong>' . _x('10% OFF YOUR BILL', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '',
|
||||
'background_color' => '#ffffff',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Titillium Web" data-font="Titillium Web" class="mailpoet-has-font">' . _x('SUBSCRIBE TO OUR NEWSLETTER AND SAVE 10% NEXT TIME YOU DINE IN', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'text_color' => '',
|
||||
'background_color' => '#ffffff',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '80',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#eeeeee',
|
||||
'font_color' => '#707070',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '0',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE LIST', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#dcb64b',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '0',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Fira Sans',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Titillium Web" data-font="Titillium Web" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#000000',
|
||||
'background_color' => '#ffffff',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'value' => '100',
|
||||
'unit' => 'percent',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Titillium Web',
|
||||
'close_button' => 'classic',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
'background_image_url' => $this->getAssetUrl('pic-684x1024.jpg'),
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,306 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template14BelowPages extends FormTemplate {
|
||||
const ID = 'template_14_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-14';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Lifestyle Blog', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '25',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => 'is-style-default',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('pic-1-682x1024.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '75',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Nothing You Could Do" data-font="Nothing You Could Do" class="mailpoet-has-font"><strong>' . _x('WANT MORE?', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '30',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Karla" data-font="Karla" class="mailpoet-has-font">' . _x('SIGN UP TO RECEIVE THE LATEST LIFESTYLE TIPS & TRICKS, PLUS SOME EXCLUSIVE GOODIES!', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '16',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#faf6f1',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('LET’S DO THIS!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#edd4b5',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Karla',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Karla" data-font="Karla" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '4',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Karla',
|
||||
'close_button' => 'classic',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,319 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template14FixedBar extends FormTemplate {
|
||||
const ID = 'template_14_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-14';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Lifestyle Blog', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => 'is-style-default',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('pic-1-682x1024.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '60',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Nothing You Could Do" data-font="Nothing You Could Do" class="mailpoet-has-font"><strong>' . _x('WANT MORE?', 'Text in a web form', 'mailpoet') . '</strong></span>', // @todo Add translations, links and emoji processing.,
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '24',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Karla" data-font="Karla" class="mailpoet-has-font">' . _x('SIGN UP TO RECEIVE THE LATEST LIFESTYLE TIPS & TRICKS, PLUS SOME EXCLUSIVE GOODIES!', 'Text in a web form', 'mailpoet') . '</span><br><span style="font-family: Karla" data-font="Karla" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '30',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#faf6f1',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('LET’S DO THIS!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#edd4b5',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Karla',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
'position' => 'top',
|
||||
'animation' => 'slideup',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '4',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Karla',
|
||||
'close_button' => 'classic',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template14Popup extends FormTemplate {
|
||||
const ID = 'template_14_popup';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-14';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Lifestyle Blog', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => 'is-style-default',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('pic-1-682x1024.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Nothing You Could Do" data-font="Nothing You Could Do" class="mailpoet-has-font"><strong>' . _x('WANT MORE?', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '30',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Karla" data-font="Karla" class="mailpoet-has-font">' . _x('SIGN UP TO RECEIVE THE LATEST LIFESTYLE TIPS & TRICKS, PLUS SOME EXCLUSIVE GOODIES!', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#faf6f1',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('LET’S DO THIS!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#edd4b5',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Karla',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Karla" data-font="Karla" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '550',
|
||||
],
|
||||
],
|
||||
'animation' => 'slideup',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '4',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '10',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Karla',
|
||||
'close_button' => 'classic',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,308 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template14SlideIn extends FormTemplate {
|
||||
const ID = 'template_14_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-14';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Lifestyle Blog', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => 'is-style-default',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('pic-1-682x1024.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Nothing You Could Do" data-font="Nothing You Could Do" class="mailpoet-has-font"><strong>' . _x('WANT MORE?', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '30',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Karla" data-font="Karla" class="mailpoet-has-font">' . _x('SIGN UP TO RECEIVE THE LATEST LIFESTYLE TIPS & TRICKS, PLUS SOME EXCLUSIVE GOODIES!', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#faf6f1',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('LET’S DO THIS!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#edd4b5',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Karla',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Karla" data-font="Karla" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'position' => 'right',
|
||||
'animation' => 'right',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '550',
|
||||
],
|
||||
],
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '4',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '10',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Karla',
|
||||
'close_button' => 'classic',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,292 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template14Widget extends FormTemplate {
|
||||
const ID = 'template_14_widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-14';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Lifestyle Blog', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Nothing You Could Do" data-font="Nothing You Could Do" class="mailpoet-has-font"><strong>' . _x('WANT MORE?', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '',
|
||||
'background_color' => '#ffffff',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Karla" data-font="Karla" class="mailpoet-has-font">' . _x('SIGN UP TO RECEIVE THE LATEST LIFESTYLE TIPS & TRICKS, PLUS SOME EXCLUSIVE GOODIES!', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'text_color' => '',
|
||||
'background_color' => '#ffffff',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '80',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#faf6f1',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('LET’S DO THIS!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '5',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Karla',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Karla" data-font="Karla" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '#1e1e1e',
|
||||
'background_color' => '#ffffff',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'font_family' => 'Karla',
|
||||
'close_button' => 'classic',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'fontSize' => '15',
|
||||
'fontColor' => '#1e1e1e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
'background_image_url' => $this->getAssetUrl('pic-1-682x1024.jpg'),
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template17BelowPages extends FormTemplate {
|
||||
const ID = 'template_17_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-17';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Halloween', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '20',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '60',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '20',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Sue Ellen Francisco" data-font="Sue Ellen Francisco" class="mailpoet-has-font"><strong>' . _x('BOO! DON’T BE SCARED!', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '35',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Oxygen" data-font="Oxygen" class="mailpoet-has-font"><strong>' . _x('There aren’t any tricks here, only treats!', 'Text in a web form.', 'mailpoet') . '</strong></span><br><strong>' . _x('Subscribe to claim your exclusive Halloween offer from us.', 'Text in a web form.', 'mailpoet') . '</strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#595656',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('DARE TO SUBSCRIBE?!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Sue Ellen Francisco',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Oxygen" data-font="Oxygen" class="mailpoet-has-font"><strong>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</strong></span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#185f70',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '20',
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'border_radius' => '8',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#ffffff',
|
||||
'close_button' => 'square_black',
|
||||
'font_family' => 'Oxygen',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'below_posts' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'value' => '100',
|
||||
'unit' => 'percent',
|
||||
],
|
||||
],
|
||||
'posts' => [
|
||||
'all' => '',
|
||||
],
|
||||
'pages' => [
|
||||
'all' => '',
|
||||
],
|
||||
],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'backgroundColor' => '#1a1a1a',
|
||||
'background_image_url' => $this->getAssetUrl('2714165.jpg'),
|
||||
'background_image_display' => 'scale',
|
||||
'fontColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mailpoet_form_paragraph last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,294 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template17FixedBar extends FormTemplate {
|
||||
const ID = 'template_17_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-17';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Halloween', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '33.3',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#595656',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('DARE TO SUBSCRIBE?!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Sue Ellen Francisco',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '66.6',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Sue Ellen Francisco" data-font="Sue Ellen Francisco" class="mailpoet-has-font"><strong>' . _x('BOO! DON’T BE SCARED!', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '1',
|
||||
'align' => 'left',
|
||||
'font_size' => '35',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Oxygen" data-font="Oxygen" class="mailpoet-has-font"><strong>' . _x('There aren’t any tricks here, only treats!', 'Text in a web form.', 'mailpoet') . ' ' . _x('Subscribe to claim your exclusive Halloween offer from us.', 'Text in a web form.', 'mailpoet') . '</strong><br><strong>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</strong></span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '16',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#ffffff',
|
||||
'close_button' => 'square_black',
|
||||
'font_family' => 'Oxygen',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
'position' => 'top',
|
||||
'animation' => 'slidedown',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'backgroundColor' => '#1a1a1a',
|
||||
'background_image_url' => $this->getAssetUrl('2714165.jpg'),
|
||||
'background_image_display' => 'scale',
|
||||
'fontColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mailpoet_form_paragraph last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template17Popup extends FormTemplate {
|
||||
const ID = 'template_17_popup';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-17';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Halloween', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => 'is-style-default',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('2714165.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '80',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '20',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Sue Ellen Francisco" data-font="Sue Ellen Francisco" class="mailpoet-has-font"><strong>' . _x('BOO! DON’T BE SCARED!', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '35',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Oxygen" data-font="Oxygen" class="mailpoet-has-font">' . _x('There aren’t any tricks here, only treats!', 'Text in a web form.', 'mailpoet') . '<br>' . _x('Subscribe to claim your <strong><span style="color:#ce4e09" class="has-inline-color">exclusive Halloween</span></strong> offer from us.</span>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#595656',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('DARE TO SUBSCRIBE?!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ce4e09',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Sue Ellen Francisco',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Oxygen" data-font="Oxygen" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#185f70',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'border_radius' => '8',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'square_black',
|
||||
'font_family' => 'Oxygen',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '420',
|
||||
],
|
||||
],
|
||||
'animation' => 'slideup',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'backgroundColor' => '#1a1a1a',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'fontColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mailpoet_form_paragraph last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,336 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template17SlideIn extends FormTemplate {
|
||||
const ID = 'template_17_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-17';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Halloween', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => 'is-style-default',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('2714165.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '80',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '20',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Sue Ellen Francisco" data-font="Sue Ellen Francisco" class="mailpoet-has-font"><strong>' . _x('BOO! DON’T BE SCARED!', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '35',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Oxygen" data-font="Oxygen" class="mailpoet-has-font">' . _x('There aren’t any tricks here, only treats!', 'Text in a web form.', 'mailpoet') . '<br>' . _x('Subscribe to claim your <strong><span style="color:#ce4e09" class="has-inline-color">exclusive Halloween</span></strong> offer from us.</span>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#595656',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('DARE TO SUBSCRIBE?!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ce4e09',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Sue Ellen Francisco',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Oxygen" data-font="Oxygen" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#185f70',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'border_radius' => '20',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'square_black',
|
||||
'font_family' => 'Oxygen',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'position' => 'right',
|
||||
'animation' => 'right',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '420',
|
||||
],
|
||||
],
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'backgroundColor' => '#1a1a1a',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'fontColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mailpoet_form_paragraph last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template17Widget extends FormTemplate {
|
||||
const ID = 'template_17_widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-17';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Halloween', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => 'is-style-default',
|
||||
'align' => '',
|
||||
'url' => $this->getAssetUrl('2714165.jpg'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Sue Ellen Francisco" data-font="Sue Ellen Francisco" class="mailpoet-has-font"><strong>' . _x('BOO! DON’T BE SCARED!', 'Text in a web form', 'mailpoet') . '</strong></span>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '28',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Oxygen" data-font="Oxygen" class="mailpoet-has-font">' . _x('There aren’t any tricks here, only treats!', 'Text in a web form.', 'mailpoet') . '<br>' . _x('Subscribe to claim your <strong><span style="color:#ce4e09" class="has-inline-color">exclusive Halloween</span></strong> offer from us.</span>', 'Text in a web form. Keep HTML tags!', 'mailpoet'),
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#595656',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('DARE TO SUBSCRIBE?!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ce4e09',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '4',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Sue Ellen Francisco',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Oxygen" data-font="Oxygen" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '10',
|
||||
'input_padding' => '10',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'square_black',
|
||||
'font_family' => 'Oxygen',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'backgroundColor' => '#1a1a1a',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'fontColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mailpoet_form_paragraph last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,398 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template18BelowPages extends FormTemplate {
|
||||
const ID = 'template_18_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-18';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Black Friday', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font">' . _x('IT’S HERE! DON’T MISS OUT!', 'Text in a web form', 'mailpoet') . '</span></strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '10',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#185f70',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Fjalla One" data-font="Fjalla One" class="mailpoet-has-font"><strong>' . _x('B L A C K', 'Text in a web form (Black Friday).', 'mailpoet') . '</strong></span></strong>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '32',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => 'block-heading_0.8430326562811867-1602517711078',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Fjalla One" data-font="Fjalla One" class="mailpoet-has-font">' . _x('F R I D A Y', 'Text in a web form (Black Friday).', 'mailpoet') . '</span></strong>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '32',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => 'block-heading_0.8430326562811867-1602517711078',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '10',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font"><strong>' . _x('ENJOY 50% OFF ON ALL PRODUCTS', 'Text in a web form', 'mailpoet') . '<br></strong>' . _x('PLUS FREE SHIPPING = ORDERS OVER $100', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '50',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#185f70',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b5e60',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('GET YOUR COUPON', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#cf2e2e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Heebo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '40',
|
||||
'input_padding' => '10',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'classic_white',
|
||||
'font_family' => 'Heebo',
|
||||
'fontSize' => '15',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'backgroundColor' => '#000000',
|
||||
'background_image_url' => $this->getAssetUrl('blackfriday-5.png'),
|
||||
'background_image_display' => 'scale',
|
||||
'fontColor' => '#ffffff',
|
||||
'border_color' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mailpoet_form_paragraph last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,414 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template18FixedBar extends FormTemplate {
|
||||
const ID = 'template_18_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-18';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Black Friday', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#185f70',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font">' . _x('IT’S HERE! DON’T MISS OUT!', 'Text in a web form', 'mailpoet') . '</span></strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '10',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#185f70',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Fjalla One" data-font="Fjalla One" class="mailpoet-has-font"><strong>' . _x('B L A C K', 'Text in a web form (Black Friday).', 'mailpoet') . '</strong></span></strong>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '38',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => 'block-heading_0.8430326562811867-1602517711078',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Fjalla One" data-font="Fjalla One" class="mailpoet-has-font">' . _x('F R I D A Y', 'Text in a web form (Black Friday).', 'mailpoet') . '</span></strong>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '38',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => 'block-heading_0.8430326562811867-1602517711078',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '10',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font"><strong>' . _x('ENJOY 50% OFF ON ALL PRODUCTS', 'Text in a web form', 'mailpoet') . '<br></strong>' . _x('PLUS FREE SHIPPING = ORDERS OVER $100', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '50',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#185f70',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b5e60',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('GET YOUR COUPON', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#cf2e2e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Heebo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'border_radius' => '0',
|
||||
'border_size' => '5',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'classic_white',
|
||||
'font_family' => 'Heebo',
|
||||
'fontSize' => '15',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
'position' => 'bottom',
|
||||
'animation' => 'slideup',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'backgroundColor' => '#000000',
|
||||
'background_image_url' => $this->getAssetUrl('blackfriday-5.png'),
|
||||
'background_image_display' => 'scale',
|
||||
'fontColor' => '#ffffff',
|
||||
'border_color' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wp-block-column:not(:first-child),
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mailpoet_form_paragraph last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,354 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template18Popup extends FormTemplate {
|
||||
const ID = 'template_18_popup';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-18';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Black Friday', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '80',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '20',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font">' . _x('IT’S HERE! DON’T MISS OUT!', 'Text in a web form', 'mailpoet') . '</span></strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '10',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Fjalla One" data-font="Fjalla One" class="mailpoet-has-font">' . _x('B L A C K', 'Text in a web form (Black Friday).', 'mailpoet') . '<br>' . _x('F R I D A Y', 'Text in a web form (Black Friday).', 'mailpoet') . '</span></strong>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '68',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => 'block-heading_0.8430326562811867-1602517711078',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '10',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font"><strong>' . _x('ENJOY 50% OFF ON ALL PRODUCTS', 'Text in a web form', 'mailpoet') . '<br></strong>' . _x('PLUS FREE SHIPPING = ORDERS OVER $100', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b5e60',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('GET YOUR COUPON', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#cf2e2e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Heebo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#185f70',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'border_radius' => '4',
|
||||
'border_size' => '5',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'classic_white',
|
||||
'font_family' => 'Heebo',
|
||||
'fontSize' => '15',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '430',
|
||||
],
|
||||
],
|
||||
'animation' => 'slideup',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'backgroundColor' => '#000000',
|
||||
'background_image_url' => $this->getAssetUrl('blackfriday-5.png'),
|
||||
'background_image_display' => 'scale',
|
||||
'fontColor' => '#ffffff',
|
||||
'border_color' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mailpoet_form_paragraph last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,363 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template18SlideIn extends FormTemplate {
|
||||
const ID = 'tempalete_18_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-18';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Black Friday', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '80',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '20',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font">' . _x('IT’S HERE! DON’T MISS OUT!', 'Text in a web form', 'mailpoet') . '</span></strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '7',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '7',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Fjalla One" data-font="Fjalla One" class="mailpoet-has-font">' . _x('B L A C K', 'Text in a web form (Black Friday).', 'mailpoet') . ' ' . _x('F R I D A Y', 'Text in a web form (Black Friday).', 'mailpoet') . '</span></strong>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '37',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => 'block-heading_0.8430326562811867-1602517711078',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '7',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '7',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font"><strong>' . _x('ENJOY 50% OFF ON ALL PRODUCTS', 'Text in a web form', 'mailpoet') . '<br></strong>' . _x('PLUS FREE SHIPPING = ORDERS OVER $100', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b5e60',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('GET YOUR COUPON', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#cf2e2e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Heebo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#185f70',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'border_radius' => '25',
|
||||
'border_size' => '5',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '10',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'classic_white',
|
||||
'font_family' => 'Heebo',
|
||||
'fontSize' => '15',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'position' => 'right',
|
||||
'animation' => 'right',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '430',
|
||||
],
|
||||
],
|
||||
],
|
||||
'others' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'backgroundColor' => '#000000',
|
||||
'background_image_url' => $this->getAssetUrl('blackfriday-5.png'),
|
||||
'background_image_display' => 'scale',
|
||||
'fontColor' => '#ffffff',
|
||||
'border_color' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mailpoet_form_paragraph last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,325 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template18Widget extends FormTemplate {
|
||||
const ID = 'template_18_widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-18';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Black Friday', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '12.5',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '75',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font">' . _x('IT’S HERE! DON’T MISS OUT!', 'Text in a web form', 'mailpoet') . '</span></strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '16',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '7',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '7',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Fjalla One" data-font="Fjalla One" class="mailpoet-has-font">' . _x('B L A C K', 'Text in a web form (Black Friday).', 'mailpoet') . '<br>' . _x('F R I D A Y', 'Text in a web form (Black Friday).', 'mailpoet') . '</span></strong>', // @todo Add translations, links and emoji processing.,
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '38',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'anchor' => 'block-heading_0.8430326562811867-1602517711078',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '7',
|
||||
'type' => 'divider',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '7',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font"><strong>' . _x('ENJOY 50% OFF ON ALL PRODUCTS', 'Text in a web form', 'mailpoet') . '<br></strong>' . _x('PLUS FREE SHIPPING = ORDERS OVER $100', 'Text in a web form', 'mailpoet') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#5b5e60',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('GET YOUR COUPON', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#cf2e2e',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Heebo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Heebo" data-font="Heebo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '12.5',
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '30',
|
||||
'input_padding' => '10',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'classic_white',
|
||||
'font_family' => 'Heebo',
|
||||
'fontSize' => '15',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'below_posts' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'slide_in' => [
|
||||
'enabled' => '',
|
||||
],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'backgroundColor' => '#000000',
|
||||
'background_image_url' => $this->getAssetUrl('blackfriday-5.png'),
|
||||
'background_image_display' => 'scale',
|
||||
'fontColor' => '#ffffff',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mailpoet_form_paragraph last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,269 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template1BelowPages extends FormTemplate {
|
||||
const ID = 'template_1_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-1';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Join the Club', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => $this->wp->wpStaticizeEmoji('🤞') . ' <span style="font-family: BioRhyme" data-font="BioRhyme" class="mailpoet-has-font">' . _x('Don’t miss these tips!', 'Text in a web form.', 'mailpoet') . '</span>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '40',
|
||||
'text_color' => '#313131',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '40',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#eeeeee',
|
||||
'font_color' => '#abb8c3',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '8',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '40',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE CLUB', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '20',
|
||||
'font_color' => '#ffd456',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '8',
|
||||
'padding' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read more in our [link]privacy policy[/link]', 'Text in a web form.', 'mailpoet'), "#") . '</span></em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'fontColor' => '#313131',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '15',
|
||||
'border_size' => '10',
|
||||
'form_padding' => '10',
|
||||
'input_padding' => '16',
|
||||
'background_image_display' => 'scale',
|
||||
'fontSize' => '20',
|
||||
'font_family' => 'Montserrat',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
'background_image_url' => '',
|
||||
'close_button' => 'classic',
|
||||
'border_color' => '#f7f7f7',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
form.mailpoet_form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,302 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template1FixedBar extends FormTemplate {
|
||||
const ID = 'template_1_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-1';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Join the Club', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'center',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => $this->wp->wpStaticizeEmoji('🤞') . ' <span style="font-family: BioRhyme" data-font="BioRhyme" class="mailpoet-has-font">' . _x('Don’t miss these tips!', 'Text in a web form.', 'mailpoet') . '</span>',
|
||||
'level' => '1',
|
||||
'align' => 'left',
|
||||
'font_size' => '28',
|
||||
'text_color' => '#313131',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), "#") . '</span></em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#eeeeee',
|
||||
'font_color' => '#abb8c3',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '8',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE CLUB', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '12',
|
||||
'font_color' => '#ffd456',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '8',
|
||||
'padding' => '20',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'fontColor' => '#313131',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '10',
|
||||
'form_padding' => '0',
|
||||
'input_padding' => '16',
|
||||
'background_image_display' => 'scale',
|
||||
'fontSize' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
'background_image_url' => '',
|
||||
'close_button' => 'round_black',
|
||||
'border_color' => '#f7f7f7',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template1Popup extends FormTemplate {
|
||||
const ID = 'template_1_popup';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-1';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Join the Club', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => 'center',
|
||||
'url' => $this->getAssetUrl('Oval@3x-2-1024x570.png'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: BioRhyme" data-font="BioRhyme" class="mailpoet-has-font">' . _x('Don’t miss these tips!', 'Text in a web form.', 'mailpoet') . '</span>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '40',
|
||||
'text_color' => '#313131',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#eeeeee',
|
||||
'font_color' => '#abb8c3',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '8',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE CLUB', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '24',
|
||||
'font_color' => '#ffd456',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '8',
|
||||
'padding' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), "#") . '</span></em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'fontColor' => '#313131',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '360',
|
||||
],
|
||||
],
|
||||
],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '16',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '16',
|
||||
'input_padding' => '16',
|
||||
'background_image_display' => 'scale',
|
||||
'fontSize' => '20',
|
||||
'font_family' => 'Montserrat',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
'background_image_url' => '',
|
||||
'close_button' => 'round_black',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template1SlideIn extends FormTemplate {
|
||||
const ID = 'template_1_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-1';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Join the Club', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => 'center',
|
||||
'url' => $this->getAssetUrl('Oval@3x-2-1024x570.png'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: BioRhyme" data-font="BioRhyme" class="mailpoet-has-font">' . _x('Don’t miss these tips!', 'Text in a web form.', 'mailpoet') . '</span>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '40',
|
||||
'text_color' => '#313131',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#eeeeee',
|
||||
'font_color' => '#abb8c3',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '8',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE CLUB', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '24',
|
||||
'font_color' => '#ffd456',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '8',
|
||||
'padding' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), "#") . '</span></em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'fontColor' => '#313131',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'form_position' => 'right',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '360',
|
||||
],
|
||||
],
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '16',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '20',
|
||||
'input_padding' => '16',
|
||||
'background_image_display' => 'scale',
|
||||
'fontSize' => '20',
|
||||
'font_family' => 'Montserrat',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
'background_image_url' => '',
|
||||
'close_button' => 'round_black',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,244 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template1Widget extends FormTemplate {
|
||||
const ID = 'template_1_widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-1';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Join the Club', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => 'center',
|
||||
'url' => $this->getAssetUrl('Oval@3x-2-1024x570.png'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '',
|
||||
'height' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: BioRhyme" data-font="BioRhyme" class="mailpoet-has-font">' . _x('Don’t miss these tips!', 'Text in a web form.', 'mailpoet') . '</span>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '25',
|
||||
'text_color' => '#313131',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#eeeeee',
|
||||
'font_color' => '#abb8c3',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '8',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('JOIN THE CLUB', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffd456',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '8',
|
||||
'padding' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), "#") . '</span></em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'fontColor' => '#313131',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'border_radius' => '20',
|
||||
'border_size' => '10',
|
||||
'form_padding' => '10',
|
||||
'input_padding' => '16',
|
||||
'background_image_display' => 'scale',
|
||||
'fontSize' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'backgroundColor' => '#ffffff',
|
||||
'background_image_url' => '',
|
||||
'close_button' => 'classic',
|
||||
'border_color' => '#f7f7f7',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,277 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template3BelowPages extends FormTemplate {
|
||||
const ID = 'template_3_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-3';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Welcome Discount', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '100',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('10% off, <br>especially for you', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</strong></span>' . ' ' . $this->wp->wpStaticizeEmoji('🎁'),
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '40',
|
||||
'text_color' => '#000000',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Sign up to receive your exclusive discount, and keep up to date on our latest products & offers!', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#000000',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Save 10%', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '20',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => '1', 'styles' => ['width' => ['unit' => 'percent', 'value' => '100']]],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '2',
|
||||
'border_size' => '1',
|
||||
'form_padding' => '25',
|
||||
'input_padding' => '16',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'round_white',
|
||||
'border_color' => '#000000',
|
||||
'fontSize' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,262 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template3FixedBar extends FormTemplate {
|
||||
const ID = 'template_3_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-3';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Welcome Discount', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'center',
|
||||
'width' => '67.5',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('10% off, <br>especially for you', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</strong></span>' . ' ' . $this->wp->wpStaticizeEmoji('🎁'),
|
||||
'level' => '1',
|
||||
'align' => 'left',
|
||||
'font_size' => '30',
|
||||
'text_color' => '#000000',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => 'block-heading_0.27494222669689683-1595510796066',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Sign up to receive your exclusive discount,<br>and keep up to date on our latest products & offers!', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '16',
|
||||
'text_color' => '#000000',
|
||||
'line_height' => '1.7',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '14',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'center',
|
||||
'width' => '32.5',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Save 10%', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '2',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '16',
|
||||
'input_padding' => '12',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'classic',
|
||||
'fontSize' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template3Popup extends FormTemplate {
|
||||
const ID = 'template_3_popup';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-3';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Welcome Discount', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">10</span>%</strong>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '80',
|
||||
'text_color' => '#000000',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('off, especially for you', 'Text in a web form. Second line of "10% off, especially..."', 'mailpoet') . '</strong></span> ' . $this->wp->wpStaticizeEmoji('🎁'),
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '25',
|
||||
'text_color' => '#000000',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => 'mailpoet-heading',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Sign up to receive your exclusive discount, and keep up to date on our latest products & offers!', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#000000',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Save 10%', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '380',
|
||||
],
|
||||
],
|
||||
],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '2',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '30',
|
||||
'input_padding' => '15',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'classic',
|
||||
'font_family' => 'Montserrat',
|
||||
'fontSize' => '16',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.mailpoet_form_paragraph last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,251 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template3SlideIn extends FormTemplate {
|
||||
const ID = 'template_3_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-3';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Welcome Discount', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">10</span>%</strong>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '80',
|
||||
'text_color' => '#000000',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('off, especially for you', 'Text in a web form. Second line of "10% off, especially..."', 'mailpoet') . '</strong></span> ' . $this->wp->wpStaticizeEmoji('🎁'),
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '25',
|
||||
'text_color' => '#000000',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => 'mailpoet-heading',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Sign up to receive your exclusive discount, and keep up to date on our latest products & offers!', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '15',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#000000',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Save 10%', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '380',
|
||||
],
|
||||
],
|
||||
],
|
||||
'others' => ['enabled' => ''],
|
||||
],
|
||||
'border_radius' => '15',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '30',
|
||||
'input_padding' => '15',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'classic',
|
||||
'font_family' => 'Montserrat',
|
||||
'fontSize' => '16',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,251 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template3Widget extends FormTemplate {
|
||||
const ID = 'template_3_widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-3';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Welcome Discount', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('10% off,', 'Text in a web form. First line of "10% off, especially for you."', 'mailpoet') . '</strong></span>',
|
||||
'level' => '1',
|
||||
'align' => 'center',
|
||||
'font_size' => '30',
|
||||
'text_color' => '#000000',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('especially for you', 'Text in a web form. Second line of "10% off, especially..."', 'mailpoet') . '</strong></span> ' . $this->wp->wpStaticizeEmoji('🎁'),
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '18',
|
||||
'text_color' => '#000000',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => 'mailpoet-heading',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Sign up to receive your exclusive discount, and keep up to date on our latest products & offers!', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#000000',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '0',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Save 10%', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#000000',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '2',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'border_radius' => '2',
|
||||
'border_size' => '1',
|
||||
'form_padding' => '16',
|
||||
'input_padding' => '15',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
'close_button' => 'round_white',
|
||||
'border_color' => '#000000',
|
||||
'fontSize' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template4BelowPages extends FormTemplate {
|
||||
const ID = 'template_4_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-4';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Newsletter Signup', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'center',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('Oh hi there 👋 It’s nice to meet you.', 'Text in a web form.', 'mailpoet') . '</strong>',
|
||||
'level' => '3',
|
||||
'align' => 'left',
|
||||
'font_size' => '25',
|
||||
'text_color' => '#0081ff',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => 'block-heading_0.05691231782049089-1595515365731',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('Sign up to receive awesome content in your inbox, every month.', 'Text in a web form.', 'mailpoet') . '</strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '18',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#000000',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'center',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#f1f1f1',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Let’s keep in touch', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#0081ff',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => 'center',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '25',
|
||||
'input_padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
'close_button' => 'round_black',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,269 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template4FixedBar extends FormTemplate {
|
||||
const ID = 'templates_4_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-4';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Newsletter Signup', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '67.5',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Oh hi there 👋 It’s nice to meet you.', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '30',
|
||||
'text_color' => '#0081ff',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('Sign up to receive awesome content in your inbox, every month.', 'Text in a web form.', 'mailpoet') . '</strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '16',
|
||||
'line_height' => '1.7',
|
||||
'text_color' => '#000000',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '14',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'bottom',
|
||||
'width' => '32.5',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#f1f1f1',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Let’s keep in touch', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#0081ff',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'position' => 'top',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '16',
|
||||
'input_padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
'close_button' => 'round_black',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,287 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template4Popup extends FormTemplate {
|
||||
const ID = 'template_4_popup';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-4';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Newsletter Signup', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => 'center',
|
||||
'url' => $this->getAssetUrl('mailbox@3x.png'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '95',
|
||||
'height' => '90',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('Oh hi there 👋<br>It’s nice to meet you.', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '#0081ff',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('Sign up to receive awesome content in your inbox, every month.', 'Text in a web form.', 'mailpoet') . '</strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '18',
|
||||
'text_color' => '',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#f1f1f1',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Let’s keep in touch', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#0081ff',
|
||||
'font_size' => '20',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'center',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '380',
|
||||
],
|
||||
],
|
||||
],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '25',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '30',
|
||||
'input_padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
'close_button' => 'round_black',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template4SlideIn extends FormTemplate {
|
||||
const ID = 'template_4_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-4';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Newsletter Signup', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'image',
|
||||
'id' => 'image',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'align' => 'center',
|
||||
'url' => $this->getAssetUrl('mailbox@3x.png'),
|
||||
'alt' => '',
|
||||
'title' => '',
|
||||
'caption' => '',
|
||||
'link_destination' => 'none',
|
||||
'link' => '',
|
||||
'href' => '',
|
||||
'link_class' => '',
|
||||
'rel' => '',
|
||||
'link_target' => '',
|
||||
'id' => '',
|
||||
'size_slug' => 'large',
|
||||
'width' => '95',
|
||||
'height' => '90',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('Oh hi there 👋<br>It’s nice to meet you.', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '#0081ff',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<strong>' . _x('Sign up to receive awesome content in your inbox, every month.', 'Text in a web form.', 'mailpoet') . '</strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '18',
|
||||
'text_color' => '',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#f1f1f1',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Let’s keep in touch', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#0081ff',
|
||||
'font_size' => '20',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'center',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'position' => 'right',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '380',
|
||||
],
|
||||
],
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '25',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '30',
|
||||
'input_padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
'close_button' => 'round_black',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
h2.mailpoet-heading {
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
h1.mailpoet-heading {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template4Widget extends FormTemplate {
|
||||
const ID = 'template_4_widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-4';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Newsletter Signup', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Oh hi there 👋<br>It’s nice to meet you.', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '#0081ff',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . _x('Sign up to receive awesome content in your inbox, every month.', 'Text in a web form.', 'mailpoet') . '</span></strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#000000',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#f1f1f1',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'border_color' => '#313131',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Let’s keep in touch', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'background_color' => '#0081ff',
|
||||
'font_size' => '15',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '40',
|
||||
'border_color' => '#313131',
|
||||
'padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<em>' . $this->replacePrivacyLinkTags(_x('We don’t spam! Read our [link]privacy policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</em>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'on_success' => 'message',
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'segments_selected_by' => 'admin',
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '15',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'value' => '100',
|
||||
'unit' => 'percent',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '10',
|
||||
'input_padding' => '15',
|
||||
'font_family' => 'Montserrat',
|
||||
'close_button' => 'round_white',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,285 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template6BelowPages extends FormTemplate {
|
||||
const ID = 'template_6_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-6';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Fitness Tips', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Dive in!', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '44',
|
||||
'text_color' => '#38527a',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Join [mailpoet_subscribers_count] others, and start your fitness journey with us today.', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '#38527a',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '40',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#f8fbff',
|
||||
'font_color' => '#38527a',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '10',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '40',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Get Started!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'gradient' => 'linear-gradient(0deg,rgb(56,82,122) 0%,rgb(81,128,199) 100%)',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '10',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We promise we’ll never spam! Take a look at our [link]Privacy Policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span></strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#38527a',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => [
|
||||
'enabled' => '1',
|
||||
'below_post_styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '10',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '35',
|
||||
'input_padding' => '12',
|
||||
'font_family' => 'Montserrat',
|
||||
'background_image_url' => $this->getAssetUrl('form-bg.jpg'),
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'classic',
|
||||
'segments_selected_by' => 'admin',
|
||||
'fontColor' => '#ffffff',
|
||||
'backgroundColor' => '#ffffff',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin-bottom: 20px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template6FixedBar extends FormTemplate {
|
||||
const ID = 'template_6_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-6';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Fitness Tips', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'center',
|
||||
'width' => '70',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . _x('<strong>Dive in!</strong> Start your journey today.', 'Text in a web form. Keep HTML tags!', 'mailpoet') . '</span>',
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '30',
|
||||
'text_color' => '#38527a',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('Sign up to start your fitness program. We promise we’ll never spam! Take a look at our [link]Privacy Policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span></strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '14',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#38527a',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '30',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#f8fbff',
|
||||
'font_color' => '#38527a',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Get Started!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'gradient' => 'linear-gradient(0deg,rgb(56,82,122) 0%,rgb(81,128,199) 100%)',
|
||||
'font_size' => '19',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '10',
|
||||
'padding' => '10',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'position' => 'top',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '20',
|
||||
'input_padding' => '12',
|
||||
'font_family' => 'Montserrat',
|
||||
'background_image_url' => $this->getAssetUrl('form-bg.jpg'),
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'classic',
|
||||
'segments_selected_by' => 'admin',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
h2.mailpoet-heading {
|
||||
margin-bottom: 20px;
|
||||
margin-top: 0;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template6Popup extends FormTemplate {
|
||||
const ID = 'template_6__popup';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-6';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Fitness Tips', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Dive in!', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '72',
|
||||
'text_color' => '#38527a',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Join [mailpoet_subscribers_count] others, and start your fitness journey with us today.', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '#38527a',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#f8fbff',
|
||||
'font_color' => '#38527a',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '10',
|
||||
'border_color' => '#38527a',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Get Started!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'gradient' => 'linear-gradient(0deg,rgb(56,82,122) 0%,rgb(81,128,199) 100%)',
|
||||
'font_size' => '19',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '10',
|
||||
'padding' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We promise we’ll never spam! Take a look at our [link]Privacy Policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span></strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#38527a',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '440',
|
||||
],
|
||||
],
|
||||
],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '10',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '35',
|
||||
'input_padding' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
'background_image_url' => $this->getAssetUrl('form-bg.jpg'),
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'classic',
|
||||
'segments_selected_by' => 'admin',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin-bottom: 20px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template6SlideIn extends FormTemplate {
|
||||
const ID = 'template_6_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-6';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Fitness Tips', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Dive in!', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '72',
|
||||
'text_color' => '#38527a',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Join [mailpoet_subscribers_count] others, and start your fitness journey with us today.', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '#38527a',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#f8fbff',
|
||||
'font_color' => '#38527a',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Get Started!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'gradient' => 'linear-gradient(0deg,rgb(56,82,122) 0%,rgb(81,128,199) 100%)',
|
||||
'font_size' => '19',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '10',
|
||||
'padding' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We promise we’ll never spam! Take a look at our [link]Privacy Policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span></strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '14',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#38527a',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '16',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'form_position' => 'right',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '400',
|
||||
],
|
||||
],
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '10',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '35',
|
||||
'input_padding' => '16',
|
||||
'font_family' => 'Montserrat',
|
||||
'background_image_url' => $this->getAssetUrl('form-bg.jpg'),
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'classic',
|
||||
'segments_selected_by' => 'admin',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin-bottom: 20px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template6Widget extends FormTemplate {
|
||||
const ID = 'template_6_widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-6';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Fitness Tips', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Dive in!', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '32',
|
||||
'text_color' => '#38527a',
|
||||
'line_height' => '1',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font"><strong>' . _x('Join [mailpoet_subscribers_count] others, and start your fitness journey with us today.', 'Text in a web form.', 'mailpoet') . '</strong></span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '16',
|
||||
'text_color' => '#38527a',
|
||||
'line_height' => '1.5',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#f8fbff',
|
||||
'font_color' => '#38527a',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Get Started!', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'gradient' => 'linear-gradient(0deg,rgb(56,82,122) 0%,rgb(81,128,199) 100%)',
|
||||
'font_size' => '19',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '10',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Montserrat',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<strong><span style="font-family: Montserrat" data-font="Montserrat" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We promise we’ll never spam! Take a look at our [link]Privacy Policy[/link] for more info.', 'Text in a web form.', 'mailpoet'), '#') . '</span></strong>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#38527a',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '19',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'border_radius' => '10',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '15',
|
||||
'input_padding' => '12',
|
||||
'font_family' => 'Montserrat',
|
||||
'background_image_url' => $this->getAssetUrl('form-bg.jpg'),
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'classic',
|
||||
'segments_selected_by' => 'admin',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,327 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template7BelowPages extends FormTemplate {
|
||||
const ID = 'template_7_below_pages';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-7';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Latest Deals', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('belowpage.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => $this->wp->wpStaticizeEmoji('🕶️') . ' <strong><span style="font-family: Abril FatFace" data-font="Abril FatFace" class="mailpoet-has-font">' . _x('Relax!', 'Text in a web form.', 'mailpoet') . '</span></strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '72',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . _x('Put your feet up and let us do the hard work for you. Sign up to receive our latest deals directly in your inbox.', 'Text in a web form.', 'mailpoet') . '</span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '20',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '40',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#abb8c3',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '6',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '40',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Get the latest deals', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(0,159,251) 0%,rgb(29,123,164) 100%)',
|
||||
'font_size' => '24',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '6',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Cairo',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '10',
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We’ll never send you spam or share your email address.<br>Find out more in our [link]Privacy Policy[/link].', 'Text in a web form. Keep HTML tags!', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '20',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'slide_in_form_delay' => '15',
|
||||
'slide_in_form_position' => 'right',
|
||||
'border_radius' => '24',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '30',
|
||||
'input_padding' => '15',
|
||||
'font_family' => 'Cairo',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'round_white',
|
||||
'segments_selected_by' => 'admin',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(255,233,112) 0%,rgb(230,174,70) 51%,rgb(228,37,111) 100%)',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: -10px 0 10px 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,284 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template7FixedBar extends FormTemplate {
|
||||
const ID = 'template_7_fixed_bar';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-7';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Latest Deals', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('fixedbar.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => $this->wp->wpStaticizeEmoji('🕶️') . ' <strong><span style="font-family: Abril FatFace" data-font="Abril FatFace" class="mailpoet-has-font">' . _x('Relax!', 'Text in a web form.', 'mailpoet') . '</span></strong>',
|
||||
'level' => '2',
|
||||
'align' => 'left',
|
||||
'font_size' => '44',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('Let us do the hard work for you. Sign up to receive our latest deals directly in your inbox. We’ll never send you spam - promise. Find out more in our [link]Privacy Policy[/link].', 'Text in a web form. Keep HTML tags!', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'left',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => 'center',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'columns',
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#abb8c3',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '6',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'column',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'vertical_alignment' => '',
|
||||
'width' => '50',
|
||||
],
|
||||
'body' => [
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Get the latest deals', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(0,159,251) 0%,rgb(29,123,164) 100%)',
|
||||
'font_size' => '24',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '6',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Cairo',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [
|
||||
'vertical_alignment' => '',
|
||||
'class_name' => '',
|
||||
'text_color' => '',
|
||||
'background_color' => '',
|
||||
'gradient' => '',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '20',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '1100',
|
||||
],
|
||||
],
|
||||
],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '0',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '20',
|
||||
'input_padding' => '15',
|
||||
'font_family' => 'Cairo',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'round_black',
|
||||
'segments_selected_by' => 'admin',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(255,233,112) 0%,rgb(230,174,70) 51%,rgb(228,37,111) 100%)',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: -10px 0 10px 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,277 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template7Popup extends FormTemplate {
|
||||
const ID = 'template_7';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-7';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Latest Deals', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('popup.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => $this->wp->wpStaticizeEmoji('🕶️') . ' <strong><span style="font-family: Abril FatFace" data-font="Abril FatFace" class="mailpoet-has-font">' . _x('Relax!', 'Text in a web form.', 'mailpoet') . '</span></strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '88',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . _x('Put your feet up and let us do the hard work for you. Sign up to receive our latest deals directly in your inbox.', 'Text in a web form.', 'mailpoet') . '</span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '24',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#abb8c3',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '6',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Get the latest deals', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(0,159,251) 0%,rgb(29,123,164) 100%)',
|
||||
'font_size' => '24',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '6',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Cairo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We’ll never send you spam or share your email address.<br>Find out more in our [link]Privacy Policy[/link].', 'Text in a web form. Keep HTML tags!', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '20',
|
||||
'form_placement' => [
|
||||
'popup' => [
|
||||
'enabled' => '1',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '430',
|
||||
],
|
||||
],
|
||||
],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '24',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '25',
|
||||
'input_padding' => '15',
|
||||
'font_family' => 'Cairo',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'round_black',
|
||||
'segments_selected_by' => 'admin',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(255,233,112) 0%,rgb(230,174,70) 50%,rgb(228,37,111) 100%)',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: -10px 0 10px 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template7SlideIn extends FormTemplate {
|
||||
const ID = 'template_7_slide_in';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-7';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Latest Deals', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('slidein.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => $this->wp->wpStaticizeEmoji('🕶️') . ' <strong><span style="font-family: Abril FatFace" data-font="Abril FatFace" class="mailpoet-has-font">' . _x('Relax!', 'Text in a web form.', 'mailpoet') . '</span></strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '80',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . _x('Put your feet up and let us do the hard work for you. Sign up to receive our latest deals directly in your inbox.', 'Text in a web form.', 'mailpoet') . '</span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '24',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '1',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => '#ffffff',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#abb8c3',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '6',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Get the latest deals', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(0,159,251) 2%,rgb(29,123,164) 100%)',
|
||||
'font_size' => '24',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '6',
|
||||
'padding' => '12',
|
||||
'font_family' => 'Cairo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We’ll never send you spam or share your email address.<br>Find out more in our [link]Privacy Policy[/link].', 'Text in a web form. Keep HTML tags!', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '20',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => [
|
||||
'enabled' => '1',
|
||||
'form_position' => 'right',
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'pixel',
|
||||
'value' => '400',
|
||||
],
|
||||
],
|
||||
],
|
||||
'others' => [],
|
||||
],
|
||||
'border_radius' => '24',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '25',
|
||||
'input_padding' => '16',
|
||||
'font_family' => 'Cairo',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'round_black',
|
||||
'segments_selected_by' => 'admin',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(255,233,112) 0%,rgb(230,174,70) 49%,rgb(228,37,111) 100%)',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: -10px 0 10px 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,262 @@
|
||||
<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
|
||||
|
||||
namespace MailPoet\Form\Templates\Templates;
|
||||
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
|
||||
use MailPoet\Form\Templates\FormTemplate;
|
||||
|
||||
class Template7Widget extends FormTemplate {
|
||||
const ID = 'template-7-widget';
|
||||
|
||||
/** @var string */
|
||||
protected $assetsDirectory = 'template-7';
|
||||
|
||||
public function getName(): string {
|
||||
return _x('Latest Deals', 'Form template name', 'mailpoet');
|
||||
}
|
||||
|
||||
public function getThumbnailUrl(): string {
|
||||
return $this->getAssetUrl('widget.png');
|
||||
}
|
||||
|
||||
public function getBody(): array {
|
||||
return [
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => $this->wp->wpStaticizeEmoji('🕶️') . ' <strong><span style="font-family: Abril FatFace" data-font="Abril FatFace" class="mailpoet-has-font">' . _x('Relax!', 'Text in a web form.', 'mailpoet') . '</span></strong>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '40',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'heading',
|
||||
'id' => 'heading',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . _x('Put your feet up and let us do the hard work for you. Sign up to receive our latest deals directly in your inbox.', 'Text in a web form.', 'mailpoet') . '</span>',
|
||||
'level' => '2',
|
||||
'align' => 'center',
|
||||
'font_size' => '16',
|
||||
'text_color' => '#ffffff',
|
||||
'line_height' => '1.2',
|
||||
'background_color' => '',
|
||||
'anchor' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'params' => [
|
||||
'label' => _x('Email Address', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
'required' => '1',
|
||||
'label_within' => '1',
|
||||
],
|
||||
'id' => 'email',
|
||||
'name' => 'Email',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '0',
|
||||
'background_color' => '#ffffff',
|
||||
'font_color' => '#abb8c3',
|
||||
'border_size' => '0',
|
||||
'border_radius' => '6',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'params' => [
|
||||
'label' => _x('Get the latest deals', 'Form label', 'mailpoet'),
|
||||
'class_name' => '',
|
||||
],
|
||||
'id' => 'submit',
|
||||
'name' => 'Submit',
|
||||
'styles' => [
|
||||
'full_width' => '1',
|
||||
'bold' => '1',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(0,159,251) 0%,rgb(29,123,164) 100%)',
|
||||
'font_size' => '16',
|
||||
'font_color' => '#ffffff',
|
||||
'border_size' => '1',
|
||||
'border_radius' => '6',
|
||||
'padding' => '11',
|
||||
'font_family' => 'Cairo',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'paragraph',
|
||||
'id' => 'paragraph',
|
||||
'params' => [
|
||||
'content' => '<span style="font-family: Cairo" data-font="Cairo" class="mailpoet-has-font">' . $this->replacePrivacyLinkTags(_x('We’ll never send you spam or share your email address.<br>Find out more in our [link]Privacy Policy[/link].', 'Text in a web form. Keep HTML tags!', 'mailpoet'), '#') . '</span>',
|
||||
'drop_cap' => '0',
|
||||
'align' => 'center',
|
||||
'font_size' => '13',
|
||||
'line_height' => '1.5',
|
||||
'text_color' => '#ffffff',
|
||||
'background_color' => '',
|
||||
'class_name' => '',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'divider',
|
||||
'params' => [
|
||||
'class_name' => '',
|
||||
'height' => '10',
|
||||
'type' => 'spacer',
|
||||
'style' => 'solid',
|
||||
'divider_height' => '1',
|
||||
'divider_width' => '100',
|
||||
'color' => 'black',
|
||||
],
|
||||
'id' => 'divider',
|
||||
'name' => 'Divider',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getSettings(): array {
|
||||
return [
|
||||
'success_message' => '',
|
||||
'segments' => [],
|
||||
'alignment' => 'left',
|
||||
'fontSize' => '14',
|
||||
'form_placement' => [
|
||||
'popup' => ['enabled' => ''],
|
||||
'below_posts' => ['enabled' => ''],
|
||||
'fixed_bar' => ['enabled' => ''],
|
||||
'slide_in' => ['enabled' => ''],
|
||||
'others' => [
|
||||
'styles' => [
|
||||
'width' => [
|
||||
'unit' => 'percent',
|
||||
'value' => '100',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'border_radius' => '24',
|
||||
'border_size' => '0',
|
||||
'form_padding' => '20',
|
||||
'input_padding' => '12',
|
||||
'font_family' => 'Cairo',
|
||||
'background_image_url' => '',
|
||||
'background_image_display' => 'scale',
|
||||
'close_button' => 'round_white',
|
||||
'segments_selected_by' => 'admin',
|
||||
'gradient' => 'linear-gradient(180deg,rgb(255,233,112) 0%,rgb(230,174,70) 49%,rgb(228,37,111) 100%)',
|
||||
'success_validation_color' => '#00d084',
|
||||
'error_validation_color' => '#cf2e2e',
|
||||
];
|
||||
}
|
||||
|
||||
public function getStyles(): string {
|
||||
return <<<EOL
|
||||
/* form */
|
||||
.mailpoet_form {
|
||||
}
|
||||
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p.mailpoet_form_paragraph.last {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h2.mailpoet-heading {
|
||||
margin: -10px 0 10px 0;
|
||||
}
|
||||
|
||||
/* columns */
|
||||
.mailpoet_column_with_background {
|
||||
padding: 10px;
|
||||
}
|
||||
/* space between columns */
|
||||
.mailpoet_form_column:not(:first-child) {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
/* input wrapper (label + input) */
|
||||
.mailpoet_paragraph {
|
||||
line-height:20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* labels */
|
||||
.mailpoet_segment_label,
|
||||
.mailpoet_text_label,
|
||||
.mailpoet_textarea_label,
|
||||
.mailpoet_select_label,
|
||||
.mailpoet_radio_label,
|
||||
.mailpoet_checkbox_label,
|
||||
.mailpoet_list_label,
|
||||
.mailpoet_date_label {
|
||||
display:block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* inputs */
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea,
|
||||
.mailpoet_select,
|
||||
.mailpoet_date_month,
|
||||
.mailpoet_date_day,
|
||||
.mailpoet_date_year,
|
||||
.mailpoet_date {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.mailpoet_text,
|
||||
.mailpoet_textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mailpoet_checkbox {
|
||||
}
|
||||
|
||||
.mailpoet_submit {
|
||||
}
|
||||
|
||||
.mailpoet_divider {
|
||||
}
|
||||
|
||||
.mailpoet_message {
|
||||
}
|
||||
|
||||
.mailpoet_form_loading {
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.mailpoet_form_loading > span {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background-color: #5b5b5b;
|
||||
}
|
||||
EOL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<?php
|
||||
@@ -0,0 +1 @@
|
||||
<?php
|
||||
Reference in New Issue
Block a user