Merge mailpoet-dev-env into the plugin repository

[MAILPOET-3919]
This commit is contained in:
Jan Jakes
2022-01-17 09:22:04 +01:00
committed by Veljko V
parent 0050a5e68f
commit 94a61a5738
24 changed files with 1002 additions and 0 deletions

33
templates/Class.php.tpl Normal file
View File

@@ -0,0 +1,33 @@
<?php
namespace MailPoet\Config\PopulatorData\Templates;
class {{class_name}} {
private $template_image_url;
private $social_icon_url;
function __construct($assets_url) {
$this->template_image_url = 'https://ps.w.org/mailpoet/assets/newsletter-templates/{{dir_name}}';
$this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons';
}
function get() {
return array(
'name' => __("{{template_name}}", 'mailpoet'),
'categories' => json_encode(array('{{category}}', 'all')),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
);
}
private function getThumbnail() {
return $this->template_image_url . '/thumbnail.jpg';
}
private function getBody() {
return {{body}};
}
}