• 1.
    function testimonialswidget_list_shortcode($atts, $content = null)
  • 2.
    {
  • 3.
    	$show_author = ($atts['hide_author']) ? false : true; 
  • 4.
    	$show_source = ($atts['hide_source']) ? false : true; 
  • 5.
    	
  • 6.
    	$testies = testimonialswidget_get_testimonials();
  • 7.
    	$first = true;
  • 8.
    	
  • 9.
    	$html = '';
  • 10.
    	
  • 11.
    	foreach($testies as $testimonial)
  • 12.
    	{
  • 13.
    		$html .= '<div class="testimonialswidget_testimonial_in_list">';
  • 14.
    		
  • 15.
    		$html .= "<h3 class=\"title\">\"". make_clickable( $testimonial['testimtimonialswidget_list_shortcode($atts, $content = null)
  • 16.
    {
  • 17.
    	$show_author = ($atts['hide_author']) ? false : true; 
  • 18.
    	$show_source = ($atts['hide_source']) ? false : true; 
  • 19.
    	
  • 20.
    	$testies = testimonialswidget_get_testimonials();
  • 21.
    	$firsonial'] ) ."\"</h3>";
  • 22.
    		$cite = '';
  • 23.
    		if($show_author && ! empty( $testimonial['author'] ) )
  • 24.
    			$cite = '<span class="testimonialswidget_author">'. make_clickable( $testimonial['author'] ) .'</span>';
  • 25.
     
  • 26.
    		if($show_source && ! empty( $testimonial['source'] ) ) {
  • 27.
    			if($cite) $cite .= ', ';
  • 28.
    			$cite .= '<span class="testimonialswidget_source">'. make_clickable( $testimonial['source'] ) .'</span>';
  • 29.
    		}
  • 30.
    		if($cite) $cite = " <cite>&mdash;&nbsp;{$cite}</cite>";
  • 31.
    		$html .= $cite."</p></div>";
  • 32.
    	}
  • 33.
     
  • 34.
    	return $html;
  • 35.
    	
  • 36.
    }
  • 37.
    add_shortcode('testimonialswidget_list', 'testimonialswidget_list_shortcode'); 
function testimonialswidget_list_shortcode($atts, $content = null) { $show_author = ($atts['hide_author']) ? false : true; $show_source = ($atts['hide_source']) ? false : true; $testies = testimonialswidget_get_testimonials(); $first = true; $html = ''; foreach($testies as $testimonial) { $html .= '<div class="testimonialswidget_testimonial_in_list">'; $html .= "<h3 class=\"title\">\"". make_clickable( $testimonial['testimtimonialswidget_list_shortcode($atts, $content = null) { $show_author = ($atts['hide_author']) ? false : true; $show_source = ($atts['hide_source']) ? false : true; $testies = testimonialswidget_get_testimonials(); $firsonial'] ) ."\"</h3>"; $cite = ''; if($show_author && ! empty( $testimonial['author'] ) ) $cite = '<span class="testimonialswidget_author">'. make_clickable( $testimonial['author'] ) .'</span>'; if($show_source && ! empty( $testimonial['source'] ) ) { if($cite) $cite .= ', '; $cite .= '<span class="testimonialswidget_source">'. make_clickable( $testimonial['source'] ) .'</span>'; } if($cite) $cite = " <cite>&mdash;&nbsp;{$cite}</cite>"; $html .= $cite."</p></div>"; } return $html; } add_shortcode('testimonialswidget_list', 'testimonialswidget_list_shortcode');

Copy Code to Clipboard Raw

Sign-in or Create a Free Account.

Snippi uses Twitter or Facebook to register and create accounts. Registration will enable you to keep track of your snippets. We never spam your timeline or wall. Ever.

Sign-in with Facebook Sign-in with Twitter