Automattic\WooCommerce\EmailEditor\Integrations\WooCommerce\Renderer\Blocks
Product_Button::get_button_styles
Get styles for the button link element.
Метод класса: Product_Button{}
Хуков нет.
Возвращает
array.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_button_styles( $block_attributes, $rendering_context ): array;
- $block_attributes(массив) (обязательный)
- Block attributes.
- $rendering_context(Rendering_Context) (обязательный)
- Rendering context.
Код Product_Button::get_button_styles() Product Button::get button styles WC 11.2.2
private function get_button_styles( array $block_attributes, Rendering_Context $rendering_context ): array {
$block_styles = Styles_Helper::get_block_styles( $block_attributes, $rendering_context, array( 'color', 'typography' ) );
return Styles_Helper::extend_block_styles(
$block_styles,
array(
'display' => 'block',
'text-decoration' => 'none',
'width' => '100%',
)
);
}