Can the media's description (Alt text module) get pulled as the alt text, e.g., alt="Davidson College Logo" for the media on the timeline? The Mapping Module added this in a recent commit and has the following text. I've tried to implement it (and smaller snippets of the code) into different files in the Timeline configuration with no luck.
// Set the "media" object.
$media = $item->primaryMedia();
if ($media) {
$event['media'] = [
'url' => $media->thumbnailUrl('large'),
'thumbnail' => $media->thumbnailUrl('medium'),
'link' => $item->url(),
'alt' => $media->altText(),
];
}
Can the media's description (Alt text module) get pulled as the alt text, e.g.,
alt="Davidson College Logo"
for the media on the timeline? The Mapping Module added this in a recent commit and has the following text. I've tried to implement it (and smaller snippets of the code) into different files in the Timeline configuration with no luck.Thanks so much!