"", "title_color" => "", "title_tag" => "h4", "percent" => "", "percentage_color" => "", "percent_font_size" => "", "percent_font_weight" => "", "active_color" => "", "noactive_color" => "", "line_width" => "", "text" => "", "text_color" => "", "separator" => "yes", "separator_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']; $html = ''; $html .= '
%'; $html .= '
'; if ($title != "") { $html .= '<'.$title_tag.' class="pie_title"'; if ($title_color != "") { $html .= ' style="color: ' . $title_color . ';"'; } $html .= '>' . $title . ''; } $separator_styles = ""; if($separator_color != "") { $separator_styles .= " style='background-color: ".$separator_color.";'"; } if($separator == "yes") { $html .= ''; } if ($text != "") { $html .= ''; } $html .= "
"; return $html; } add_shortcode('pie_chart', 'pie_chart'); }