"", "title_color" => "", "title_font_size" => "", "title_tag" => "h4", "text" => "", "text_color" => "", "text_font_size" => "", "price" => "0", "price_color" => "", "price_font_size" => "", ); 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']; //init variables $html = ''; $title_styles = ''; $text_styles = ''; $price_styles = ''; //generate title styles if($title_color !== '') { $title_styles .= 'color: '.$title_color.';'; } if($title_font_size !== '') { $title_styles .= 'font-size: '.$title_font_size.'px;'; } //generate text styles if($text_color !== '') { $text_styles .= 'color: '.$text_color.';'; } if($text_font_size !== '') { $text_styles .= 'font-size: '.$text_font_size.'px;'; } //generate price styles if($price_color !== '') { $price_styles .= 'color: '.$price_color.';'; } if($price_font_size !== '') { $price_styles .= 'font-size: '.$price_font_size.'px;'; } $html .= '
'.$text.'
'; $html .= '