Automattic\WooCommerce\EmailEditor\Integrations\Core\Renderer\Blocks

Button::get_link_stylesprivateWC 1.0

Get styles for the link element.

Метод класса: Button{}

Хуков нет.

Возвращает

Объект{css:. string, classname: string}

Использование

// private - только в коде основоного (родительского) класса
$result = $this->get_link_styles( $block_styles );
$block_styles(массив) (обязательный)
Block styles.

Код Button::get_link_styles() WC 10.0.2

private function get_link_styles( array $block_styles ) {
	$styles = $this->get_styles_from_block(
		array(
			'color'      => array(
				'text' => $block_styles['color']['text'] ?? '',
			),
			'typography' => $block_styles['typography'] ?? array(),
		)
	);
	return (object) array(
		'css'       => $this->compile_css( $styles['declarations'], array( 'display' => 'block' ) ),
		'classname' => $styles['classnames'],
	);
}