PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.9
Yatra – Travel Booking & Tour Operator Software v3.0.9
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
yatra / templates / partials / single-trip / content-gallery.php

content-gallery.php in Yatra – Travel Booking & Tour Operator Software 3.0.9, at templates/partials/single-trip/content-gallery.php

60 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) {
3 exit;
4 }
5 ?>
6 <section class="yatra-trip-section" id="gallery" itemscope itemtype="https://schema.org/ImageGallery">
7 <h2 class="yatra-trip-section-title">
8 <?php echo yatra_svg_icon('camera', 'yatra-trip-section-title-icon'); ?>
9 <?php echo esc_html__('Photo Gallery', 'yatra'); ?>
10 </h2>
11 <div class="yatra-trip-gallery" data-gallery="hero-gallery">
12 <?php
13 global $yatra_hero_gallery_images;
14 $gallery_images = array_values(array_filter($yatra_hero_gallery_images ?? []));
15 if (empty($gallery_images)) :
16 ?>
17 <p class="yatra-trip-gallery-empty"><?php echo esc_html__('Photos will appear here when this trip has gallery images.', 'yatra'); ?></p>
18 <?php
19 else :
20 foreach ($gallery_images as $index => $image) :
21 ?>
22 <div class="yatra-gallery-item" data-image-index="<?php echo esc_attr($index); ?>" itemscope itemtype="https://schema.org/ImageObject">
23 <img src="<?php echo esc_url($image); ?>"
24 alt="<?php echo esc_attr(sprintf(
25 /* translators: 1: photo number, 2: trip title. */
26 __('Photo %1$d of %2$s trip gallery', 'yatra'),
27 $index + 1,
28 $trip->getTitle()
29 )); ?>"
30 title="<?php echo esc_attr(sprintf(
31 /* translators: 1: photo number, 2: trip title. */
32 __('Photo %1$d - %2$s', 'yatra'),
33 $index + 1,
34 $trip->getTitle()
35 )); ?>"
36 itemprop="url" content="<?php echo esc_url($image); ?>"
37 data-yatra-src="<?php echo esc_url($image); ?>"
38 data-no-lazy="1">
39 <meta itemprop="contentUrl" content="<?php echo esc_url($image); ?>">
40 <meta itemprop="name" content="<?php echo esc_attr(sprintf(
41 /* translators: 1: photo number, 2: trip title. */
42 __('Photo %1$d - %2$s', 'yatra'),
43 $index + 1,
44 $trip->getTitle()
45 )); ?>">
46 <meta itemprop="description" content="<?php echo esc_attr(sprintf(
47 /* translators: 1: photo number, 2: trip title. */
48 __('Photo %1$d from the %2$s trip gallery', 'yatra'),
49 $index + 1,
50 $trip->getTitle()
51 )); ?>">
52 <meta itemprop="position" content="<?php echo $index + 1; ?>">
53 <meta itemprop="encodingFormat" content="image/jpeg">
54 </div>
55 <?php
56 endforeach;
57 endif;
58 ?>
59 </div>
60 </section>