Add email renderer and template to the renderer engine
In this commit, I copied the code for processing the rendering of emails from the current renderer. This will allow us to use different base templates and styles. Ideally, we should be able to add hooks and reuse the renderer from the engine namespace in the current renderer. [MAILPOET-5540]
This commit is contained in:
committed by
Jan Lysý
parent
b70ad064c7
commit
46a481ec24
@ -3,11 +3,11 @@
|
||||
namespace MailPoet\EmailEditor\Engine\Renderer;
|
||||
|
||||
class BodyRenderer {
|
||||
public function renderBody(\WP_Post $emailPost): string {
|
||||
public function renderBody(string $postContent): string {
|
||||
// @todo Parse blocks \WP_Block_Parser
|
||||
// @todo We need to wrap top level blocks which are not in columns into a column
|
||||
// @todo Add rendering of columns (inspire by/reuse code from mailpoet/lib/Newsletter/Renderer/Columns/Renderer)
|
||||
// @todo Add rendering of blocks
|
||||
return $emailPost->post_content ?: ''; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
|
||||
return $postContent ?: '';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user