Automattic\WooCommerce\EmailEditor\Engine\Renderer\ContentRenderer
Content_Renderer::render
Render the content
Method of the class: Content_Renderer{}
No Hooks.
Returns
String.
Usage
$Content_Renderer = new Content_Renderer(); $Content_Renderer->render( $post, $template ): string;
- $post(WP_Post) (required)
- Post object.
- $template(WP_Block_Template) (required)
- Block template.
Content_Renderer::render() Content Renderer::render code WC 10.5.0
public function render( WP_Post $post, WP_Block_Template $template ): string {
$this->set_template_globals( $post, $template );
$this->initialize();
$rendered_html = get_the_block_template_html();
$this->reset();
return $this->process_manager->postprocess( $this->inline_styles( $rendered_html, $post, $template ) );
}