Merge mailpoet-dev-env into the plugin repository
[MAILPOET-3919]
This commit is contained in:
33
templates/Class.php.tpl
Normal file
33
templates/Class.php.tpl
Normal 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}};
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user