| 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 |
foreach ($images as $image) |
| 24 |
{ |
| 25 |
echo '<li>' . apply_filters( 'propertyhive_single_property_image_html', sprintf( '<a href="%s" class="propertyhive-main-image" title="%s" data-fancybox="gallery">%s</a>', esc_attr( $image['url'] ), esc_attr( $image['title'] ), $image['image'] ), $post->ID ) . '</li>'; |
| 26 |
} |
| 27 |
|
| 28 |
echo '</ul></div>'; |
| 29 |
|
| 30 |
} else { |
| 31 |
|
| 32 |
echo apply_filters( 'propertyhive_single_property_image_html', sprintf( '<img src="%s" alt="Placeholder" />', ph_placeholder_img_src() ), $post->ID ); |
| 33 |
|
| 34 |
} |
| 35 |
?> |
| 36 |
|
| 37 |
<?php do_action( 'propertyhive_product_thumbnails' ); ?> |
| 38 |
|
| 39 |
<?php do_action( 'propertyhive_after_single_property_images' ); ?> |
| 40 |
|
| 41 |
</div> |