"", "background_color" => "", "background_transparency" => "", "border_color" => "", "border_width" => "", "icon" => "", "size" => "fa-3x", "icon_color" => "", "image" => "", "text_in_circle" => "", "text_in_circle_tag" => "h3", "font_size" => "", "text_in_circle_color" => "", "text_in_circle_font_weight" => "", "link" => "", "link_target" => "_self", "title" => "", "title_tag" => "h3", "title_color" => "", "text" => "", "text_color" => "" ); extract(shortcode_atts($args, $atts)); $headings_array = array('h2', 'h3', 'h4', 'h5', 'h6'); //get correct heading value. If provided heading isn't valid get the default one $title_tag = (in_array($title_tag, $headings_array)) ? $title_tag : $args['title_tag']; $text_in_circle_tag = (in_array($text_in_circle_tag, $headings_array)) ? $text_in_circle_tag : $args['text_in_circle_tag']; $html = ''; $image_src = ''; $image_alt = ''; $circle_style = ''; $border_class = ''; $text_in_circle_style = ''; $icon_style = ''; $title_style = ''; $text_style = ''; if($background_color != "") { if($background_transparency !="") { $bg_color = qode_hex2rgb($background_color); $circle_style .= "background-color: rgba(". $bg_color[0]."," . $bg_color[1] . "," . $bg_color[2] . "," . $background_transparency . ");"; } else { $circle_style .= "background-color: ".$background_color.";"; } } if($border_color != "") { $circle_style .= " border-color: ".$border_color.";"; } if(intval($border_width) > 5) { $border_class = " big_border"; } if($border_width != "") { $circle_style .= "border-width: ".$border_width."px;"; } if($text_in_circle_color != "") { $text_in_circle_style .= "color: ".$text_in_circle_color.";"; } if($text_in_circle_font_weight != '') { $text_in_circle_style .= 'font-weight: '.$text_in_circle_font_weight.';'; } if($font_size != "") { $text_in_circle_style .= " font-size: ".$font_size."px;"; } if($icon_color != "") { $icon_style .= "color: ".$icon_color; } if($title_color != "") { $title_style .= "color: ".$title_color; } if($text_color != "") { $text_style .= "color: ".$text_color; } $html .= '
'.$text.'
'; } $html .= '