"-1", "number_per_slide" => "1", "order_by" => "date", "order" => "DESC", "category" => "", "author_image" => "", "text_color" => "", "text_font_size" => "", "author_text_font_weight" => "", "author_text_color" => "", "author_text_font_size" => "", "show_navigation" => "", "navigation_style" => "", "auto_rotate_slides" => "", "animation_type" => "", "animation_speed" => "" ); extract(shortcode_atts($deafult_args, $atts)); $html = ""; $testimonial_text_inner_styles = ""; $testimonial_p_style = ""; $navigation_button_radius = ""; $testimonial_name_styles = ""; if($text_font_size != "" || $text_color != ""){ $testimonial_p_style = " style='"; if($text_font_size != ""){ $testimonial_p_style .= "font-size:". $text_font_size . "px;"; } if($text_color != ""){ $testimonial_p_style .= "color:". $text_color . ";"; } $testimonial_p_style .= "'"; } if($text_color != "") { $testimonial_text_inner_styles .= "color: ".$text_color.";"; $testimonial_name_styles .= "color: ".$text_color.";"; } if($author_text_font_weight != '') { $testimonial_name_styles .= 'font-weight: '.$author_text_font_weight.';'; } if($author_text_color != "") { $testimonial_name_styles .= "color: ".$author_text_color.";"; } if($author_text_font_size != "") { $testimonial_name_styles .= "font-size: ".$author_text_font_size."px;"; } $args = array( 'post_type' => 'testimonials', 'orderby' => $order_by, 'order' => $order, 'posts_per_page' => $number ); if ($category != "") { $args['testimonials_category'] = $category; } $animation_type_data = 'fade'; switch($animation_type) { case 'fade': case 'fade_option' : $animation_type_data = 'fade'; break; case 'slide': case 'slide_option': $animation_type_data = 'slide'; break; default: $animation_type_data = 'fade'; } $html .= "
"; $html .= ''; //close testimonial_content_inner $html .= ''; //close testimonials endwhile; else: $html .= __('Sorry, no posts matched your criteria.', 'qode'); endif; wp_reset_query(); $html .= '';//close slides $html .= '
'; $html .= ''; return $html; } add_shortcode('testimonials', 'testimonials'); }