PluginProbe
Property Hive / 2.4.0
Property Hive v2.4.0
2.4.0 2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 All 262 releases
propertyhive / templates / single-property / property-images.php

property-images.php in Property Hive 2.4.0, at templates/single-property/property-images.php

45 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Single Property Images
4 *
5 * @author PropertyHive
6 * @package PropertyHive/Templates
7 * @version 1.0.0
8 */
9
10 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
11
12 global $post, $propertyhive, $property;
13 ?>
14 <div class="images">
15
16 <?php do_action( 'propertyhive_before_single_property_images' ); ?>
17
18 <?php
19 if ( isset($images) && is_array($images) && !empty($images) ) {
20
21 echo '<div id="slider" class="flexslider"><ul class="slides">';
22
23 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable; the template is included through a helper/function scope, so PrefixAllGlobals misclassifies the file when checked standalone.
24 foreach ($images as $image)
25 {
26 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Gallery URLs and attributes are escaped during assembly; preserve the trusted PHP gallery HTML filter.
27 echo '<li>' . apply_filters( 'propertyhive_single_property_image_html', sprintf( '<a href="%s" class="propertyhive-main-image" title="%s" data-fancybox="gallery-' . (int)$post->ID . '">%s</a>', esc_url( $image['url'] ), esc_attr( $image['title'] ), $image['image'] ), $post->ID ) . '</li>';
28 }
29
30 echo '</ul></div>';
31
32 } else {
33
34 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Gallery URLs and attributes are escaped during assembly; preserve the trusted PHP gallery HTML filter.
35 echo apply_filters( 'propertyhive_single_property_image_html', sprintf( '<img src="%s" alt="Placeholder" />', esc_url( ph_placeholder_img_src() ) ), $post->ID );
36
37 }
38 ?>
39
40 <?php do_action( 'propertyhive_product_thumbnails' ); ?>
41
42 <?php do_action( 'propertyhive_after_single_property_images' ); ?>
43
44 </div>
45