/**
  * Get the property thumbnail, or the placeholder if not set.
  *
  * @access public
  * @subpackage  Loop
  * @param string $size (default: 'shop_catalog')
  * @param int $placeholder_width (default: 0)
  * @param int $placeholder_height (default: 0)
  * @return string
  */
 function propertyhive_get_property_thumbnail($size = 'medium', $class = '', $placeholder_width = 0, $placeholder_height = 0)
 {
     global $post, $property;
     $photo_url = $property->get_main_photo_src($size);
     if ($photo_url !== FALSE) {
         return '<img src="' . $photo_url . '" alt="' . get_the_title($post->ID) . '" class="' . $class . '">';
     }
     if (ph_placeholder_img_src()) {
         return ph_placeholder_img($size);
     }
 }
 * @version     1.0.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
global $post, $propertyhive, $property;
$gallery_attachments = $property->get_gallery_attachment_ids();
?>
<div class="images">

    <?php 
if (!empty($gallery_attachments)) {
    echo '<div id="slider" class="flexslider"><ul class="slides">';
    foreach ($gallery_attachments as $gallery_attachment) {
        $image_title = esc_attr(get_the_title($gallery_attachment));
        $image_link = wp_get_attachment_url($gallery_attachment);
        $image = wp_get_attachment_image($gallery_attachment, 'original');
        echo '<li>' . apply_filters('propertyhive_single_property_image_html', sprintf('<a href="%s" class="propertyhive-main-image" title="%s" data-rel="prettyPhoto[ph_photos]">%s</a>', $image_link, $image_title, $image), $post->ID) . '</li>';
    }
    echo '</ul></div>';
} else {
    echo apply_filters('propertyhive_single_property_image_html', sprintf('<img src="%s" alt="Placeholder" />', ph_placeholder_img_src()), $post->ID);
}
?>

    <?php 
do_action('propertyhive_product_thumbnails');
?>

</div>
/**
 * Get the placeholder image
 *
 * @access public
 * @return string
 */
function ph_placeholder_img($size = 'thumbnail')
{
    $dimensions = ph_get_image_size($size);
    return apply_filters('propertyhive_placeholder_img', '<img src="' . ph_placeholder_img_src() . '" alt="Placeholder" width="' . esc_attr($dimensions['width']) . '" class="property-placeholder wp-post-image" height="' . esc_attr($dimensions['height']) . '" />');
}