Created
June 21, 2013 19:25
-
-
Save michael-cannon/5833657 to your computer and use it in GitHub Desktop.
filter testimonials_widget_testimonial_html_single_content example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'testimonials_widget_testimonial_html_single_content', array( &$this, 'testimonials_widget_testimonial_html_single_content' ), 10, 3 ); | |
public function testimonials_widget_testimonial_html_single_content( $content, $testimonial, $atts ) { | |
$atts = wp_parse_args( $atts, Testimonials_Widget::get_defaults( true ) ); | |
$atts = Testimonials_Widget_Settings::validate_settings( $atts ); | |
$hide_excerpt = $atts['hide_excerpt']; | |
$excerpt = ''; | |
if ( empty( $hide_excerpt ) && ! empty( $testimonial['testimonial_excerpt'] ) ) { | |
$excerpt = '<div class="testimonials-widget-premium-excerpt">'; | |
$excerpt .= $testimonial['testimonial_excerpt']; | |
$excerpt .= '</div>'; | |
} | |
return $excerpt . $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment