Automattic\WooCommerce\EmailEditor\Integrations\Core\Renderer\Blocks
Column::get_width_attribute_value
Returns a table cell width attribute value.
Метод класса: Column{}
Хуков нет.
Возвращает
string.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_width_attribute_value( $width ): string;
- $width(строка) (обязательный)
- Column width.
Код Column::get_width_attribute_value() Column::get width attribute value WC 11.2.2
private function get_width_attribute_value( $width ): string {
$parsed_width = Styles_Helper::parse_value( $width );
if ( is_string( $width ) && preg_match( '/%\s*$/', $width ) ) {
return $parsed_width . '%';
}
return (string) $parsed_width;
}