Ejemplo n.º 1
0
 /**
  * Constructor
  *
  * @param int $id The slideshow ID.
  * @return void
  */
 public function __construct($id, $key = null)
 {
     $this->_id = $id;
     $this->retrieveMetaData();
     $slideshow_contents = $id;
     if (isset($this->_meta['slideshow_contents'])) {
         if ($this->_meta['slideshow_contents'] != '' && !is_numeric($this->_meta['slideshow_contents'])) {
             $slideshow_contents = $this->_meta['slideshow_contents'];
         }
     }
     parent::__construct($slideshow_contents, $key);
 }
Ejemplo n.º 2
0
</h2>
			<?php 
    }
    ?>
		</header><!-- /.pageheader -->
		<?php 
}
?>

		<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
			<?php 
        $slideshow = new THB_Collection($thb_page_id, 'work_slide');
        $slideshow->setSlidesImagesClickable();
        $slideshow->setSize('large');
        ?>

			<div class="single-work-slideshow-container">
			<?php 
        if (count($slideshow->getSlides()) > 0) {
            ?>
				<?php 
            if (thb_get_featured_image($thb_page_id) != '') {
                $slideshow->addCoverSlide(get_post_thumbnail_id($thb_page_id));
            }
            thb_get_template_part('config/modules/core/slideshows/submodules/flexslider/templates/slideshow', array('slideshow' => $slideshow, 'meta' => array('flexslider_smoothHeight' => '1', 'slideshowHeight' => '0', 'flexslider_effects' => 'fade', 'transition_speed' => 0.25, 'delay' => 4), 'id' => 'thb-single-work-slideshow'));
            ?>
			<?php 
<?php

/**
 * Slides
 */
$slideshow = new THB_Collection($id, 'work_slide');
$slideshow->setSize('full');
if (thb_get_featured_image($id) != '') {
    $slideshow->addCoverSlide(get_post_thumbnail_id($id));
}
$slides = $slideshow->getSlides();
/**
 * Image size
 */
$image_size = $slideshow->getSize();
/**
 * Class
 */
$class = array('cycle-slideshow');
if (count($slides) > 1) {
    $class[] = 'w-cycle-nav';
}
?>

<?php 
if (count($slides) > 1) {
    ?>
	<a href="#" id="thb-slideshow_prev">
		<?php 
    echo __('Previous', 'thb_text_domain');
    ?>