WooCommerce Code Reference

Button extends Abstract_Block_Renderer
in package

Renders a button block.

Tags
see
https://www.activecampaign.com/blog/email-buttons
see
https://documentation.mjml.io/#mj-button

Table of Contents

render()  : string
Renders the block.
add_spacer()  : string
Add a spacer around the block.
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_link_styles()  : mixed
Get styles for the link element.
get_wrapper_styles()  : mixed
Get styles for the wrapper element.

Methods

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>