Commit 1e5c52e0 by rajshah

alt in conclusion gallery

parent 9d1ce849
......@@ -52,10 +52,12 @@ if (isset($cmws) && is_array($cmws) && !empty($cmws)):
$img = $gallery_item['img'] ?: '';
$layout = $gallery_item['layout'] ?: '';
$class_name = !empty($layout) ? explode(':', $layout[0]) : 'none';
$class_name = $class_name[0];?>
$class_name = $class_name[0];
if(!empty($img)):
?>
<div class="gallery-item <?php echo $class_name; ?>">
<a data-src="<?php echo esc_url($img); ?>">
<img src="<?php echo esc_url($img); ?>" alt="" class="img-fluid">
<img src="<?php echo esc_url($img); ?>" alt="<?php echo esc_attr(get_post_meta(attachment_url_to_postid($img), '_wp_attachment_image_alt', true)) ?: get_the_title(attachment_url_to_postid($img)); ?>" class="img-fluid">
<?php if ($i === (count($cmws_gal) - 1)): ?><span><svg width="16" height="16" viewBox="0 0 16 16" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
......@@ -74,7 +76,7 @@ if (isset($cmws) && is_array($cmws) && !empty($cmws)):
</span><?php endif; ?>
</a>
</div>
<?php endforeach; ?>
<?php endif; endforeach; ?>
</div>
<?php endif; ?>
</div>
......
Markdown is supported
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