Automattic\WooCommerce\EmailEditor\Integrations\Core\Renderer\Blocks
Table::get_custom_border_style
Get custom border style from block attributes.
Метод класса: Table{}
Хуков нет.
Возвращает
string. Custom border style or 'solid' as default.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_custom_border_style( $parsed_block ): string;
- $parsed_block(массив) (обязательный)
- Parsed block.
Код Table::get_custom_border_style() Table::get custom border style WC 11.1.1
private function get_custom_border_style( array $parsed_block ): string {
$style = strtolower( (string) ( $parsed_block['attrs']['style']['border']['style'] ?? '' ) );
$allowed = array( 'solid', 'dashed', 'dotted' ); // Email-safe subset.
return in_array( $style, $allowed, true ) ? $style : 'solid';
}