Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michael-cannon/5833657 to your computer and use it in GitHub Desktop.
Save michael-cannon/5833657 to your computer and use it in GitHub Desktop.
filter testimonials_widget_testimonial_html_single_content example
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