- Joins bulk and individual processing into one method

- Refactors code as per code review comments
This commit is contained in:
Vlad
2016-06-20 23:12:32 -04:00
parent e807aad814
commit f32d6bb331
10 changed files with 155 additions and 178 deletions

View File

@ -10,6 +10,7 @@ class Renderer {
public $CSS_inliner;
public $newsletter;
const NEWSLETTER_TEMPLATE = 'Template.html';
const POST_PROCESS_FILTER = 'mailpoet_rendering_post_process';
function __construct(array $newsletter) {
$this->newsletter = $newsletter;
@ -102,7 +103,7 @@ class Renderer {
str_replace('&', '&', $template->html())
);
$template = apply_filters(
'mailpoet_rendering_post_process',
self::POST_PROCESS_FILTER,
$DOM->__toString()
);
return $template;