diff --git a/inc/widgets.php b/inc/widgets.php index 3c1211e5..b3949694 100644 --- a/inc/widgets.php +++ b/inc/widgets.php @@ -53,7 +53,7 @@ public function widget( $args, $instance ) { $text_color = 'color: '.$instance['text_color']; } if( !empty($instance['icon_color']) && preg_match('/^#?+[0-9a-f]{3}(?:[0-9a-f]{3})?$/i', $instance['icon_color']) ) { - $icon_color = 'color: '.$instance['icon_color']; + $icon_color = 'style="color: ' . $instance['icon_color'] . '"'; } $icon = $instance['icon']; @@ -61,24 +61,39 @@ public function widget( $args, $instance ) { $icon = apply_filters('vantage_fontawesome_icon_name', $icon ); } + $icon_styles = ! empty( $icon_styles ) ? 'style="' . implode( ';', $icon_styles ) . '"' : ''; + $icon_class = ! empty( $icon_styles ) ? ' icon-style-set' : ''; $target = (!empty($instance['more_target']) ? 'target="_blank"' : ''); ?>