"date", "order" => "DESC", "category" => "", "author_image" => "", "title_tag" => 'h5', "title_size" => '', 'background_color' => '', 'author_size' => '', 'main_title' => '', "main_title_tag" => 'h3', "main_title_size" => '', 'description' => '', 'button_text' => '', 'button_link' => '', 'button_bckg_color' => '', 'link_target' => '_blank' ); extract(shortcode_atts($deafult_args, $atts)); $html = ""; $testimonials_array = array(); $args = array( 'post_type' => 'testimonials', 'orderby' => $order_by, 'order' => $order, 'posts_per_page' => '8' ); if ($category != "") { $args['testimonials_category'] = $category; } $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']; $main_title_tag = (in_array($main_title_tag, $headings_array)) ? $main_title_tag : $args['main_title_tag']; $title_style = ''; if ($title_size !== ''){ $valid_title_size = (strstr($title_size, 'px', true)) ? $title_size : $title_size.'px'; $title_style .= "font-size: ".$valid_title_size.";"; } if ($title_style !== ''){ $title_style = 'style="'.$title_style.'"'; } $main_title_style = ''; if ($title_size !== ''){ $valid_title_size = (strstr($main_title_size, 'px', true)) ? $main_title_size : $main_title_size.'px'; $main_title_style .= "font-size: ".$valid_title_size.";"; } if ($main_title_style !== ''){ $main_title_style = 'style="'.$main_title_style.'"'; } $testimonial_item_style = ''; if ($background_color !== ''){ $testimonial_item_style .= "background-color: ".$background_color.";"; } if ($testimonial_item_style !== ''){ $testimonial_item_style = 'style="'.$testimonial_item_style.'"'; } $author_style = ''; if ($author_size !== ''){ $valid_title_size = (strstr($author_size, 'px', true)) ? $author_size : $author_size.'px'; $author_style .= "font-size: ".$valid_title_size.";"; } if ($author_style !== ''){ $author_style = 'style="'.$author_style.'"'; } $button_html = ''; if($button_text !== ''){ $params = array(); $params['text'] = $button_text; if ($button_link !== ''){ $params['link'] = $button_link; } if ($link_target !== ''){ $params['target'] = $link_target; } if ($button_bckg_color !== ''){ $params['color'] = '#fff'; $params['background_color'] = $button_bckg_color; $params['border_color'] = $button_bckg_color; } $button_html .= qode_execute_shortcode('button',$params); } $main_block_header = ''; $main_block_header .= "
'.$description.'
'; } $main_block_header .= $button_html; $main_block_header .= "' . trim($text) . '
'; $single .= '