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

Image::get_max_border_width │ private │ WC 1.0

Get the largest border width (in px) across all sides.

Method of the class: Image{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->get_max_border_width( $border ): float;
$border(array) (required)
Border style attributes.

Image::get_max_border_width() code WC 11.1.2

private function get_max_border_width( array $border ): float {
	$max = isset( $border['width'] ) ? Styles_Helper::parse_value( (string) $border['width'] ) : 0.0;
	foreach ( array( 'top', 'right', 'bottom', 'left' ) as $side ) {
		if ( isset( $border[ $side ]['width'] ) ) {
			$max = max( $max, Styles_Helper::parse_value( (string) $border[ $side ]['width'] ) );
		}
	}
	return $max;
}