Automattic\WooCommerce\EmailEditor\Integrations\Core\Renderer\Blocks
Buttons::render_content
Renders the block content.
Method of the class: Buttons{}
No Hooks.
Returns
String.
Usage
// protected - for code of main (parent) or child class $result = $this->render_content( $block_content, $parsed_block, $rendering_context ): string;
- $block_content(string) (required)
- Block content.
- $parsed_block(array) (required)
- Parsed block.
- $rendering_context(Rendering_Context) (required)
- Rendering context.
Buttons::render_content() Buttons::render content code WC 10.8.1
protected function render_content( $block_content, array $parsed_block, Rendering_Context $rendering_context ): string {
// Ignore font size set on the buttons block.
// We rely on TypographyPreprocessor to set the font size on the buttons.
// Rendering font size on the wrapper causes unwanted whitespace below the buttons.
if ( isset( $parsed_block['attrs']['style']['typography']['fontSize'] ) ) {
unset( $parsed_block['attrs']['style']['typography']['fontSize'] );
}
return $this->flex_layout_renderer->render_inner_blocks_in_layout( $parsed_block, $rendering_context );
}