Automattic\WooCommerce\Blocks\Utils
StyleAttributesUtils::get_line_height_class_and_style()
Get class and style for line height from attributes.
Метод класса: StyleAttributesUtils{}
Хуков нет.
Возвращает
Массив
.
Использование
$result = StyleAttributesUtils::get_line_height_class_and_style( $attributes );
- $attributes(массив) (обязательный)
- Block attributes.
Код StyleAttributesUtils::get_line_height_class_and_style() StyleAttributesUtils::get line height class and style WC 8.7.0
public static function get_line_height_class_and_style( $attributes ) { $line_height = $attributes['style']['typography']['lineHeight'] ?? ''; if ( ! $line_height ) { return self::EMPTY_STYLE; } return array( 'class' => null, 'style' => sprintf( 'line-height: %s;', $line_height ), ); }