Skip to content
Snippets Groups Projects
Commit 143bf784 authored by Chris Hallberg's avatar Chris Hallberg Committed by Demian Katz
Browse files

Improve record cover alt tags.

parent c56239d9
No related merge requests found
<?php /* Display thumbnail if appropriate: */ ?> <?php /* Display thumbnail if appropriate: */ ?>
<?php if ($cover): ?> <?php if ($cover): ?>
<?php if ($this->link): ?><a href="<?=$this->escapeHtmlAttr($this->link)?>" data-lightbox-image><?php endif; ?> <?php $alt = $this->link ? trim($this->driver->tryMethod('getTitle') ?? '') : ''; ?>
<img alt="<?=$this->transEsc('Cover Image')?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="recordcover" src="<?=$this->escapeHtmlAttr($cover); ?>"/> <?php if ($this->link && !empty($alt)): ?><a href="<?=$this->escapeHtmlAttr($this->link)?>"><?php endif; ?>
<?php if ($this->link): ?></a><?php endif; ?> <img src="<?=$this->escapeHtmlAttr($cover); ?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="recordcover" alt="<?=$alt; ?>" />
<?php if ($this->link && !empty($alt)): ?></a><?php endif; ?>
<?php else: ?> <?php else: ?>
<img src="<?=$this->url('cover-unavailable')?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="recordcover" alt="<?=$this->transEsc('No Cover Image')?>"/> <img src="<?=$this->url('cover-unavailable')?>" <?php if ($linkPreview): ?>data-linkpreview="true" <?php endif; ?>class="recordcover" alt="" />
<?php endif; ?> <?php endif; ?>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment