ik probeer om srcset function toe te voegen in mij theme maar ik krijg foutmelding op lijn 252. ik probeerde om uit te vinden maar is niet gelukt.
deze is de code:
// Class
$class = implode(' ', apply_filters('john_img_class', $class));
if (!empty($class)) {
$class = 'class="' . esc_attr($class) . '"';
}
// Aspect ratio
$ratio = john_sizes_ratio($width, $height);
if (!empty($ratio)) {
$ratio = 'data-aspect-ratio="' . esc_attr($ratio) . '"';
}
// Attributes
$attributes = implode(' ', apply_filters('john_img_attributes', array('id' => 'id="wp-image-' . esc_attr($id) . '"', 'data-id' => 'data-id="' . esc_attr($id) . '"', 'class' => $class, 'ratio' => $ratio, 'schema' => 'itemprop="contentUrl"', 'alt' => 'alt="' . $alt . '"')));
// Return an array with the final width/height so these values can be passed up to the wrapper element for certain CSS styling tricks
return array(apply_filters('john_img', '<img ' . apply_filters('john_src_html', $src) . apply_filters('john_srcset_html', $srcset) . apply_filters('john_sizes_html', $sizes) . apply_filters('john_dimensions', image_hwstring($width, $height), $width, $height) . $attributes . '>'), $width, $height);
waar het kan de fout zijn , ik kunde niet vinden?
dank u wel
johannes