Thank you for the compliment. It’s my pleasure and how I pay for diapersโฆ
Sorry, it’s a clue for developers, not mortals. ๐
Check out https://github.com/michael-cannon/testimonials-widget/blob/2.18.0/includes/class-testimonials-widget.php#L1026.
Thread Starter
nyoz
(@nyoz)
Thanks a lot for your quick help !
So basically I just need to reorder :
$html = $div_open
. $image
. $quote
. $cite
. $extra
. $bottom_text
. $div_close;
And return $html
in functions.php for each of the views I want to alter ?
Cheers !
Thread Starter
nyoz
(@nyoz)
Oh and also set :
$disable_quotes = true;
If I want to get rid of the opening and closing commas…
Thread Starter
nyoz
(@nyoz)
I’ll have access to all the code on tomorrow, I’ll keep you updated asap ๐
Thread Starter
nyoz
(@nyoz)
Hi ! It finally worked with :
// Plugin : Testimonials by Aihrus - custom hook - Alter the output of each testimonial to put the author before quote
function my_testimonials_widget_get_testimonial_html( $html, $testimonial, $atts, $is_list, $is_first, $widget_number, $div_open, $image, $quote, $cite, $extra, $bottom_text, $div_close ) {
$html = $div_open
. $cite
. $image
. $quote
. $extra
. $bottom_text
. $div_close;
return $html;
}
add_filter( 'testimonials_widget_get_testimonial_html', 'my_testimonials_widget_get_testimonial_html', 10, 13 );
But beware : there’s an error on https://aihrus.zendesk.com/entries/23693433-How-do-I-use-filter-testimonials-widget-get-testimonial-html-
$bottom-text instead of $bottom_text (twice) which led to a parse error and crashed the global page layout generation.
Thanks anyway for your help ! ๐
@nyoz,
Great job figuring out your needed changes via the API.
Also, thank you for reporting the code quirk. I’ve fixed it.
Ciao!