Automattic\WooCommerce\EmailEditor\Integrations\Core\Renderer\Blocks
Column::get_width_attribute_value
Returns a table cell width attribute value.
Method of the class: Column{}
No Hooks.
Returns
string.
Usage
// private - for code of main (parent) class only $result = $this->get_width_attribute_value( $width ): string;
- $width(string) (required)
- Column width.
Column::get_width_attribute_value() Column::get width attribute value code WC 11.0.1
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;
}