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.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

// private - только в коде основоного (родительского) класса
$result = $this->get_max_border_width( $border ): float;
$border(массив) (обязательный)
Border style attributes.

Код Image::get_max_border_width() WC 11.2.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;
}