WooCommerce Code Reference

Column extends Abstract_Block_Renderer
in package

Renders a column block.

Table of Contents

render()  : string
Render the block.
add_spacer()  : string
Override this method to disable spacing (block gap) for columns.
compile_css()  : string
Compile objects containing CSS properties to a string.
get_styles_from_block()  : array<string|int, mixed>
Wrapper for wp_style_engine_get_styles which ensures all values are returned.
render_content()  : string
Renders the block content.
get_block_wrapper()  : string
Based on MJML <mj-column>

Methods

add_spacer()

Override this method to disable spacing (block gap) for columns.

protected add_spacer(string $content, array<string|int, mixed> $email_attrs) : string

Spacing is applied on wrapping columns block. Columns are rendered side by side so no spacer is needed.

Parameters
$content : string

Content.

$email_attrs : array<string|int, mixed>

Email attributes.

Return values
string

get_styles_from_block()

Wrapper for wp_style_engine_get_styles which ensures all values are returned.

protected get_styles_from_block(array<string|int, mixed> $block_styles[, bool $skip_convert_vars = false ]) : array<string|int, mixed>
Parameters
$block_styles : array<string|int, mixed>

Array of block styles.

$skip_convert_vars : bool = false

If true, --wp_preset--spacing--x type values will be left in the original var:preset:spacing:x format.

Return values
array<string|int, mixed>