Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
remove empty space
Browse files Browse the repository at this point in the history
  • Loading branch information
gigitux committed Nov 29, 2021
1 parent bbd1bfa commit 4f67958
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/BlockTypes/ProductCategories.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected function render( $attributes, $content ) {
}

/**
* Get the list of classes to apply to this block.
* Get the list of classes and styles to apply to this block.
*
* @param array $attributes Block attributes. Default empty array.
* @return array space-separated list of classes and space-separated list of inline styles.
Expand Down
14 changes: 4 additions & 10 deletions src/Utils/StyleAttributesUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* StyleAttributesUtils class used for getting class and style from attributes.
*/
class StyleAttributesUtils {


/**
* Get class and style for font-size from attributes.
*
Expand Down Expand Up @@ -108,10 +106,8 @@ public static function get_link_color_class_and_style( $attributes ) {
'style' => sprintf( 'color: %s;', $link_color ),
);
}

}


/**
* Get class and style for line height from attributes.
*
Expand Down Expand Up @@ -144,17 +140,15 @@ public static function get_line_height_class_and_style( $attributes ) {
*/
public static function get_classes_and_styles_by_attributes( $attributes ) {
$classes_and_styles = array(
line_height => self::get_line_height_class_and_style( $attributes ),
text_color => self::get_text_color_class_and_style( $attributes ),
font_size => self::get_font_size_class_and_style( $attributes ),
link_color => self::get_link_color_class_and_style( $attributes ),
'line_height' => self::get_line_height_class_and_style( $attributes ),
'text_color' => self::get_text_color_class_and_style( $attributes ),
'font_size' => self::get_font_size_class_and_style( $attributes ),
'link_color' => self::get_link_color_class_and_style( $attributes ),
);

return array_filter(
$classes_and_styles
);

}


}

0 comments on commit 4f67958

Please sign in to comment.