From 2704ec576c689f4e4dfb864f61c7ffefd2defcb8 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 8 Mar 2016 10:37:37 +0100 Subject: [PATCH] safeguard: make sure to always use thumbnail photo size --- controller/classes/Subtemplate.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/controller/classes/Subtemplate.php b/controller/classes/Subtemplate.php index c6a733c..2f927f3 100644 --- a/controller/classes/Subtemplate.php +++ b/controller/classes/Subtemplate.php @@ -1189,18 +1189,20 @@ class Subtemplate { if ( $testimonials ) { foreach ($testimonials as $testimonial) { - $id = $testimonial->ID; - $quote = get_field('quote', $id); - $name = get_field('name', $id); - $company = get_field('company', $id); - $link = get_field('link', $id); - $photo = get_field('photo', $id); + $id = $testimonial->ID; + $quote = get_field('quote', $id); + $name = get_field('name', $id); + $company = get_field('company', $id); + $link = get_field('link', $id); + $photo_object = get_field('photo', $id); + $photo_size = 'thumbnail'; + $photo_url = $photo_object['sizes'][$photo_size]; $testimonialMarkup .= "
{$quote}
- + {$name} {$company}