safeguard: make sure to always use thumbnail photo size

This commit is contained in:
Matthias Kretschmann 2016-03-08 10:37:37 +01:00
parent cfe50bfbc9
commit 2704ec576c
1 changed files with 9 additions and 7 deletions

View File

@ -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 .= "<div class='grid__col'>
<figure class='testimonial'>
<blockquote class='testimonial__quote'>{$quote}</blockquote>
<figcaption class='testimonial__caption'>
<img class='testimonial__avatar' src='{$photo}'>
<img class='testimonial__avatar' src='{$photo_url}'>
<cite class='testimonial__cite'>
<span class='testimonial__name'>{$name}</span>
<span class='testimonial__org'><a href='{$link}'>{$company}</a></span>