示例#1
0
function _testimonial_slider2($options)
{
    $element_size = zn_get_size($options['_sizer']);
    $new_size = $element_size['sizer'];
    echo '<div class="' . $element_size['sizer'] . '">';
    echo '<div class="testimonials-carousel">';
    if (!empty($options['tf_title'])) {
        echo '<h3 class="m_title">' . $options['tf_title'] . '</h3>';
    }
    echo '<div class="controls">';
    echo '<a href="#" class="prev"><span class="icon-chevron-left"></span></a>';
    echo '<a href="#" class="next"><span class="icon-chevron-right"></span></a>';
    echo '</div>';
    if (!empty($options['testimonials_slider_single']) && is_array($options['testimonials_slider_single'])) {
        echo '<ul id="testimonials_carousel" class="zn_testimonials_carousel fixclear">';
        foreach ($options['testimonials_slider_single'] as $test) {
            if (!empty($test['tf_single_test'])) {
                echo '<li>';
                echo '<blockquote>' . do_shortcode($test['tf_single_test']) . '</blockquote>';
                echo '<h5>' . $test['tf_single_author'] . '</h5>';
                echo '</li>';
            }
        }
        echo '</ul>';
    }
    echo '</div>';
    echo '</div>';
    $speed = 'auto: true,';
    if (!empty($options['tf_speed'])) {
        $speed = 'auto:{timeoutDuration:' . $options['tf_speed'] . '},';
    }
    $testimonial_slider2 = array('zn_testimonial_slider2' => "\n\t\t\t\tjQuery(window).load(function() {\n\t\t\t\t// ** Testimonials carousel\n\t\t\t\tjQuery('.zn_testimonials_carousel').carouFredSel({\n\t\t\t\t\tresponsive: true,\n\n\t\t\t\t\titems: {\n\t\t\t\t\t\twidth: 300\n\t\t\t\t\t},\n\t\t\t\t\t" . $speed . "\n\t\t\t\t\t\n\t\t\t\t\tprev\t: {\t\n\t\t\t\t\t\tbutton\t: function(){return jQuery(this).closest('.testimonials-carousel').find('.prev');},\n\t\t\t\t\t\tkey\t\t: \"left\"\n\t\t\t\t\t},\n\t\t\t\t\tnext\t: { \n\t\t\t\t\t\tbutton\t: function(){return jQuery(this).closest('.testimonials-carousel').find('.next');},\n\t\t\t\t\t\tkey\t\t: \"right\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// *** end testimonials carousel\n\t\t\t\t});\n\t\t");
    zn_update_array($testimonial_slider2);
}
示例#2
0
function _image_gallery($options)
{
    $element_size = zn_get_size('one-third');
    if (!empty($options['ig_title'])) {
        echo '<div class="span12">';
        echo '<h4 class="smallm_title centered bigger"><span>' . $options['ig_title'] . '</span></h4>';
        echo '</div>';
    }
    if (!empty($options['single_ig']) && is_array($options['single_ig'])) {
        $count = count($options['single_ig']);
        $i = 1;
        foreach ($options['single_ig'] as $image_arr) {
            if ($i % 3 == 1) {
                echo '<div class="row-fluid zn_photo_gallery">';
            }
            if (!empty($image_arr['sig_image'])) {
                $image = vt_resize('', $image_arr['sig_image'], $element_size['width'], '', true);
                echo '<div class="span4">';
                echo '<a href="' . $image_arr['sig_image'] . '" class="hoverBorder" rel="prettyPhoto"><img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt=""></a>';
                echo '</div>';
            }
            if ($i % 3 == 0 || $i == $count) {
                echo '</div>';
            }
            $i++;
        }
    }
    echo '<div class="clear"></div>';
}
示例#3
0
 /**
  * This method is used to display the output of the element.
  *
  * @return void
  */
 function element()
 {
     $options = $this->data['options'];
     $element_size = zn_get_size('one-third');
     echo '<div class="th-image-gallery ' . $this->data['uid'] . ' ' . $this->opt('css_class', '') . '">';
     if (!empty($options['ig_title'])) {
         echo '<div class="row">';
         echo '<div class="col-sm-12">';
         echo '<h4 class="th-image-gallery-title text-custom"><span class="th-image-gallery-title-sp">' . $options['ig_title'] . '</span></h4>';
         echo '</div>';
         echo '</div>';
     }
     if (!empty($options['single_ig']) && is_array($options['single_ig'])) {
         $count = count($options['single_ig']);
         $i = 1;
         foreach ($options['single_ig'] as $image_arr) {
             if ($i % 3 == 1) {
                 echo '<div class="row">';
             }
             if (!empty($image_arr['sig_image'])) {
                 $image = vt_resize('', $image_arr['sig_image'], $element_size['width'], '', true);
                 echo '<div class="col-sm-4">';
                 echo '<a href="' . $image_arr['sig_image'] . '" class="hoverBorder" data-lightbox="image"><img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt=""></a>';
                 echo '</div>';
             }
             if ($i % 3 == 0 || $i == $count) {
                 echo '</div>';
             }
             $i++;
         }
     }
     echo '</div>';
 }
示例#4
0
function _stats_box($options)
{
    $element_size = zn_get_size($options['_sizer']);
    echo '<div class="' . $element_size['sizer'] . ' zn_stats_box">';
    echo '<div class="row-fluid zn_content_no_margin">';
    echo '<div class="' . $element_size['sizer'] . ' zn_stats_box">';
    echo '<h3 class="mb_title"><span class="' . $options['vts_tab_icon'] . ' icon-dark"></span> ' . $options['stb_title'] . '</h3>';
    echo '</div>';
    echo '</div>';
    if (!empty($options['single_stats']) && is_array($options['single_stats'])) {
        echo '<div class="row-fluid zn_content_no_margin">';
        foreach ($options['single_stats'] as $stat) {
            echo '<div class="span3">';
            echo '<div class="statbox">';
            if (!empty($stat['sb_icon'])) {
                echo '<img src="' . $stat['sb_icon'] . '" alt="">';
            }
            echo '<h4>' . $stat['sb_title'] . '</h4>';
            echo '<h6>' . $stat['sb_content'] . '</h6>';
            echo '</div>';
            echo '</div>';
        }
        echo '</div>';
    }
    echo '</div>';
}
示例#5
0
function _infobox($options)
{
    $element_size = zn_get_size($options['_sizer']);
    // LINK
    $link = '';
    if (!empty($options['ib_button_text']) && !empty($options['ib_button_link']['url'])) {
        $link = '<a href="' . $options['ib_button_link']['url'] . '" target="' . $options['ib_button_link']['target'] . '" class="btn btn-large btn-inverse">' . $options['ib_button_text'] . '</a>';
    }
    echo '<div class="' . $element_size['sizer'] . '">';
    echo '<div class="' . $options['ib_style'] . '">';
    if ($options['ib_style'] == 'infobox2') {
        echo $link;
    }
    // TITLE
    if (!empty($options['ib_title'])) {
        echo '<h3 class="m_title">' . $options['ib_title'] . '</h3>';
    }
    // SUBTITLE
    if (!empty($options['ib_subtitle'])) {
        if (preg_match('%(<p[^>]*>.*?</p>)%i', $options['ib_subtitle'], $regs)) {
            echo $options['ib_subtitle'];
        } else {
            echo '<p>' . $options['ib_subtitle'] . '</p>';
        }
    }
    if ($options['ib_style'] == 'infobox1') {
        echo $link;
    }
    echo '</div>';
    echo '</div>';
}
示例#6
0
function _service_box($options)
{
    $element_size = zn_get_size($options['_sizer']);
    ?>
		<div class="<?php 
    echo $element_size['sizer'];
    ?>
 services_box">
			<div class="box fixclear">
			
				<?php 
    // Image
    if (!empty($options['service_box_image'])) {
        echo '<div class="icon"><img src="' . $options['service_box_image'] . '" alt=""></div>';
    }
    // Title
    if (!empty($options['service_box_title'])) {
        echo '<h4 class="title">' . $options['service_box_title'] . '</h4>';
    }
    // FEATURES LIST
    if (!empty($options['service_box_features'])) {
        echo '<ul class="list-style1">';
        $textAr = explode("\n", $options['service_box_features']);
        foreach ($textAr as $index => $line) {
            echo '<li>' . $line . '</li>';
        }
        echo '</ul>';
    }
    ?>

			</div><!-- end box -->
		</div>
	<?php 
}
示例#7
0
function _testimonial_slider($options)
{
    $element_size = zn_get_size($options['_sizer']);
    $new_size = $element_size['sizer'];
    if (!empty($options['tf_title']) || !empty($options['tf_desc'])) {
        preg_match('|\\d+|', $element_size['sizer'], $new_size);
        $new_size = $new_size[0] - 3;
        $new_size = 'span' . $new_size;
        echo '<div class="span3 testimonials_fader">';
        if (!empty($options['tf_title'])) {
            echo '<h3 class="m_title">' . $options['tf_title'] . '</h3>';
        }
        if (!empty($options['tf_desc'])) {
            echo '<p>' . $options['tf_desc'] . '</p>';
        }
        echo '</div>';
    }
    echo '<div class="' . $new_size . ' testimonials_fader">';
    echo '<ul class="fixclear testimonials_fader_trigger">';
    foreach ($options['testimonials_single'] as $test) {
        echo '<li>';
        echo '<blockquote>' . do_shortcode($test['tf_single_test']) . '</blockquote>';
        echo '<h6>' . $test['tf_single_author'] . '</h6>';
        echo '</li>';
    }
    echo '</ul>';
    echo '</div>';
    $speed = 'auto: {timeoutDuration: 5000},';
    if (!empty($options['tf_speed'])) {
        $speed = 'auto:{timeoutDuration:' . $options['tf_speed'] . '},';
    }
    $testimonial_slider = array('zn_testimonial_slider' => "\t\n\n\t\t\t\t\t// ** Testimonials fader\n\n\t\t\t\t\tjQuery('.testimonials_fader_trigger').carouFredSel({\n\n\t\t\t\t\t\tresponsive:true,\n\n\t\t\t\t\t\t" . $speed . "\n\n\t\t\t\t\t\tscroll: { fx: \"fade\", duration: \"1500\" }\n\n\t\t\t\t\t});\n\n\t\t\t\t\t// *** end testimonials fader\n\n\t\t\t\t;");
    zn_update_array($testimonial_slider);
}
示例#8
0
function _video_box($options)
{
    $element_size = zn_get_size($options['_sizer']);
    ?>
		<div class="<?php 
    echo $element_size['sizer'];
    ?>
">
		
		<?php 
    if (!empty($options['vb_video_image']) && !empty($options['vb_video_url'])) {
        echo '<div class="adbox video">';
        $image = vt_resize('', $options['vb_video_image'], $element_size['width'], '', true);
        echo '<img src="' . $image['url'] . '" alt="">';
        echo '<div class="video_trigger_container">';
        echo '<a class="playVideo" data-rel="prettyPhoto" href="' . $options['vb_video_url'] . '?width=80%&amp;height=80%"></a>';
        echo $options['vb_video_title'];
        echo '</div>';
        echo '</div>';
    } else {
        if (!empty($options['vb_video_url'])) {
            if (!empty($options['vb_video_title'])) {
                echo '<h4 class="m_title">' . $options['vb_video_title'] . '</h4>';
            }
            echo get_video_from_link($options['vb_video_url'], '', $element_size['width'], $element_size['height']);
        }
    }
    ?>

		</div>
	<?php 
}
示例#9
0
function _photo_gallery($options)
{
    $element_size = zn_get_size($options['_sizer']);
    ?>

		<div class="<?php 
    echo $element_size['sizer'];
    ?>
">
			<div class="row-fluid zn_image_gallery">
			
				<?php 
    if (!empty($options['single_photo_gallery']) && is_array($options['single_photo_gallery'])) {
        $i = 0;
        $id = uniqid('pp_');
        $count = count($options['single_photo_gallery']);
        if (!empty($options['pg_num_cols'])) {
            $num_cols = $options['pg_num_cols'];
        } else {
            $num_cols = 6;
        }
        $new_size = 12 / $num_cols;
        $size = zn_get_size('span' . $new_size);
        $height = $image_resized['height'];
        if (isset($options['pg_img_height']) && !empty($options['pg_img_height'])) {
            $height = $options['pg_img_height'];
        }
        foreach ($options['single_photo_gallery'] as $image) {
            if ($i % $num_cols == 0) {
                echo '<div class="row-fluid">';
            }
            //preg_match('|\d+|', 'span12' , $new_size);
            echo '<div class="span' . $new_size . '">';
            if (!empty($image['spg_image']) && !empty($image['spg_video'])) {
                $image_resized = vt_resize('', $image['spg_image'], $size['width'], $height, true);
                echo '<a rel="prettyPhoto[' . $id . ']" href="' . $image['spg_video'] . '" title="' . $image['spg_title'] . '" class="hoverBorder">';
                echo '<img alt="" src="' . $image_resized['url'] . '" width="' . $image_resized['width'] . '" height="' . $image_resized['height'] . '">';
                echo '</a>';
            } elseif (!empty($image['spg_image'])) {
                $image_resized = vt_resize('', $image['spg_image'], $size['width'], $height, true);
                echo '<a rel="prettyPhoto[' . $id . ']" href="' . $image['spg_image'] . '" title="' . $image['spg_title'] . '" class="hoverBorder">';
                echo '<img alt="" src="' . $image_resized['url'] . '" width="' . $image_resized['width'] . '" height="' . $image_resized['height'] . '">';
                echo '</a>';
            }
            $i++;
            if ($i % $num_cols == 0 || $count == $i) {
                echo '</div>';
            }
            echo '</div>';
        }
    }
    ?>
			

			</div>
		</div>

	<?php 
}
示例#10
0
function _keyword($options)
{
    $element_size = zn_get_size($options['_sizer']);
    if (!empty($options['kw_content'])) {
        echo '<div class="' . $element_size['sizer'] . '">';
        echo '<div class="keywordbox">' . $options['kw_content'] . '</div>';
        echo '</div>';
    }
}
示例#11
0
function _infobox2($options)
{
    $element_size = zn_get_size($options['_sizer']);
    echo '<div class="' . $element_size['sizer'] . '">';
    echo '<div class="info-text">';
    echo $options['ib2_title'];
    echo '</div>';
    echo '</div>';
}
示例#12
0
function _portfolio_sortable($options)
{
    $element_size = zn_get_size($options['_sizer']);
    global $post, $data;
    $posts_per_page = isset($options['ports_per_page']) ? $options['ports_per_page'] : '4';
    // how many posts
    $query = array('post_type' => 'portfolio', 'tax_query' => array(array('taxonomy' => 'project_category', 'field' => 'id', 'terms' => $options['portfolio_categories'])), 'posts_per_page' => $posts_per_page);
    // Start the query
    query_posts($query);
    include locate_template('template-helpers/loop-portfolio_sortable.php');
    $zn_isotope = array('zn_isotope' => "\n\t\t\t\t(function(\$){ \n\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// settings\n\t\t\t\t\t\tvar sortBy = '', \t\t\t// SORTING: date / name\n\t\t\t\t\t\t\tsortAscending = true, \t\t// SORTING ORDER: true = Ascending / false = Descending\n\t\t\t\t\t\t\ttheFilter = '';\t// DEFAULT FILTERING CATEGORY \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\$('#sortBy li a').each(function(index, element) {\n\t\t\t\t\t\t\tvar t = \$(this);\n\t\t\t\t\t\t\tif(t.attr('data-option-value') == sortBy)\n\t\t\t\t\t\t\t\tt.addClass('selected');\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\$('#sort-direction li a').each(function(index, element) {\n\t\t\t\t\t\t\tvar t = \$(this);\n\t\t\t\t\t\t\tif(t.attr('data-option-value') == sortAscending.toString())\n\t\t\t\t\t\t\t\tt.addClass('selected');\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\$('#portfolio-nav li a').each(function(index, element) {\n\t\t\t\t\t\t\tvar t = \$(this),\n\t\t\t\t\t\t\t\ttpar = t.parent();\n\t\t\t\t\t\t\tif(t.attr('data-filter') == theFilter) {\n\t\t\t\t\t\t\t\t\$('#portfolio-nav li a').parent().removeClass('current');\n\t\t\t\t\t\t\t\ttpar.addClass('current');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// don't edit below unless you know what you're doing\n\t\t\t\t\t\tif (\$(\"ul#thumbs\").length > 0){\n\t\t\t\t\t\t\tvar container = \$(\"ul#thumbs\");\n\t\t\t\t\t\t\tcontainer.isotope({\n\t\t\t\t\t\t\t  itemSelector : \".item\",\n\t\t\t\t\t\t\t  animationEngine : \"jquery\",\n\t\t\t\t\t\t\t  animationOptions: {\n\t\t\t\t\t\t\t\t  duration: 250,\n\t\t\t\t\t\t\t\t  easing: \"easeOutExpo\",\n\t\t\t\t\t\t\t\t  queue: false\n\t\t\t\t\t\t\t  },\n\t\t\t\t\t\t\t  filter: theFilter,\n\t\t\t\t\t\t\t  sortAscending : sortAscending,\n\t\t\t\t\t\t\t  getSortData : {\n\t\t\t\t\t\t\t\t  name : function ( elem ) {\n\t\t\t\t\t\t\t\t\t  return elem.find(\"span.name\").text();\n\t\t\t\t\t\t\t\t  },\n\t\t\t\t\t\t\t\t  date : function ( elem ) {\n\t\t\t\t\t\t\t\t\t  return elem.attr(\"data-date\");\n\t\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t  },\n\t\t\t\t\t\t\t  sortBy: sortBy\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t})(jQuery);\n\t\t\t\t");
    zn_update_array($zn_isotope);
}
示例#13
0
 /**
  * This method is used to display the output of the element.
  *
  * @return void
  */
 function element()
 {
     $options = $this->data['options'];
     $uid = $this->data['uid'];
     $resize_method = $this->opt('ib2_resize_method', 'default');
     echo '<div class="offer-banners ob--resize-' . $resize_method . ' ' . $uid . ' ' . $this->opt('css_class', '') . '">';
     if (!empty($options['image_box_title'])) {
         echo '<h3 class="m_title m_title_ext text-custom offer-banners-title">' . $options['image_box_title'] . '</h3>';
     }
     if (!empty($options['ib2_single']) && is_array($options['ib2_single'])) {
         echo '<div class="row">';
         foreach ($options['ib2_single'] as $simage) {
             if ($slide_image = $simage['ib2_image']) {
                 $saved_alt = $saved_title = '';
                 if (is_array($slide_image)) {
                     // Get the saved image
                     $saved_image = $slide_image['image'];
                     if (!empty($slide_image['alt'])) {
                         $saved_alt = $slide_image['alt'];
                     }
                     if (!empty($slide_image['title'])) {
                         $saved_title = 'title="' . $slide_image['title'] . '"';
                     }
                 } else {
                     $saved_image = $slide_image;
                 }
                 $element_size = zn_get_size($simage['ib2_width']);
                 echo '<div class="' . $element_size['sizer'] . '">';
                 $ib2_link = zn_extract_link($simage['ib2_link'], 'offer-banners-link hoverBorder', false, false, false, '#');
                 echo $ib2_link['start'];
                 if ($resize_method == 'default') {
                     $image = vt_resize('', $saved_image, $element_size['width'], '', true);
                     echo '<img src="' . $image['url'] . '" height="' . $image['height'] . '" width="' . $image['width'] . '" alt="' . $saved_alt . '"  ' . $saved_title . ' class="img-responsive offer-banners-img" />';
                 } else {
                     if ($resize_method == 'cover') {
                         $imgheight = isset($simage['ib2_image_height']) && !empty($simage['ib2_image_height']) ? $simage['ib2_image_height'] : 330;
                         echo '<div class="offer-banners-img hoverborder-img" style="background-image:url(' . $saved_image . '); height:' . $imgheight . 'px;"></div>';
                     } else {
                         if ($resize_method == 'no-resize') {
                             echo '<img src="' . $saved_image . '" alt="' . $saved_alt . '"  ' . $saved_title . ' class="img-responsive offer-banners-img" />';
                         }
                     }
                 }
                 echo $ib2_link['end'];
                 echo '</div>';
             }
         }
         echo '</div>';
     }
     echo "</div>";
 }
示例#14
0
    /**
     * This method is used to display the output of the element.
     * @return void
     */
    function element()
    {
        $options = $this->data['options'];
        ?>
			<div class="photo-gallery zn_image_gallery row <?php 
        echo $this->data['uid'];
        ?>
 <?php 
        echo $this->opt('css_class', '');
        ?>
">
				<?php 
        if (!empty($options['single_photo_gallery']) && is_array($options['single_photo_gallery'])) {
            $id = uniqid('pp_');
            $num_cols = 6;
            if (!empty($options['pg_num_cols'])) {
                $num_cols = $options['pg_num_cols'];
            }
            $new_size = 12 / $num_cols;
            $size = zn_get_size('span' . $new_size);
            global $image_resized;
            $height = $image_resized['height'];
            if (isset($options['pg_img_height']) && !empty($options['pg_img_height'])) {
                $height = $options['pg_img_height'];
            }
            foreach ($options['single_photo_gallery'] as $image) {
                echo '<div class="col-xs-6 col-sm-4 col-lg-' . $new_size . ' u-mb-20">';
                echo '<div class="mfp-gallery mfp-gallery--misc">';
                // If Video
                // If Image
                if (!empty($image['spg_image']) && !empty($image['spg_video'])) {
                    $image_resized = vt_resize('', $image['spg_image'], $size['width'], $height, true);
                    echo '<a data-lightbox="mfp" data-mfp="iframe" href="' . $image['spg_video'] . '?width=100%&amp;height=100%" title="' . $image['spg_title'] . '" class="hoverBorder">';
                    echo '<img alt="" src="' . $image_resized['url'] . '" width="' . $image_resized['width'] . '" height="' . $image_resized['height'] . '">';
                    echo '</a>';
                } elseif (!empty($image['spg_image'])) {
                    $image_resized = vt_resize('', $image['spg_image'], $size['width'], $height, true);
                    echo '<a data-lightbox="mfp" data-mfp="image" href="' . $image['spg_image'] . '" title="' . $image['spg_title'] . '" class="hoverBorder">';
                    echo '<img alt="" src="' . $image_resized['url'] . '" width="' . $image_resized['width'] . '" height="' . $image_resized['height'] . '">';
                    echo '</a>';
                } elseif (!empty($image['spg_video'])) {
                    echo '<a class="playVideo" data-lightbox="mfp" data-mfp="iframe" href="' . $image['spg_video'] . '?width=100%&amp;height=100%"></a>';
                }
                echo '</div>';
                echo '</div>';
            }
        }
        ?>
			</div>
	<?php 
    }
示例#15
0
function _testimonial_box($options)
{
    $element_size = zn_get_size($options['_sizer']);
    $style = 'light';
    $align = "left";
    if ($options['tb_style'] == 'style2') {
        $style = 'dark';
        $align = "top";
    }
    ?>
			<div class="<?php 
    echo $element_size['sizer'];
    ?>
" >
				<div class="testimonial_box" data-align="<?php 
    echo $align;
    ?>
" data-theme="<?php 
    echo $style;
    ?>
">
				<div class="details">
				<?php 
    if (!empty($options['tb_author_logo'])) {
        $image = vt_resize('', $options['tb_author_logo'], '60', '60', true);
        echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="">';
    }
    if (!empty($options['tb_author']) || !empty($options['tb_author_com'])) {
        echo '<h6>';
        if (!empty($options['tb_author'])) {
            echo '<strong>' . $options['tb_author'] . '</strong>';
        }
        if (!empty($options['tb_author_com'])) {
            echo $options['tb_author_com'];
        }
        echo '</h6>';
    }
    ?>
				</div>
				<?php 
    if (!empty($options['tb_author_quote'])) {
        echo '<blockquote>' . $options['tb_author_quote'] . '</blockquote>';
    }
    ?>
				
			</div>
			</div>
		<?php 
}
示例#16
0
function _vertical_tabs($options)
{
    $element_size = zn_get_size($options['_sizer']);
    echo '<div class="' . $element_size['sizer'] . '">';
    echo '<div class="vertical_tabs">';
    echo '<div class="tabbable">';
    if (!empty($options['single_vertical_tab']) && is_array($options['single_vertical_tab'])) {
        echo '<ul class="nav fixclear">';
        $i = 1;
        $content = '';
        foreach ($options['single_vertical_tab'] as $tab) {
            $cls = '';
            $icon = '';
            if ($i == 1) {
                $cls = 'active';
            }
            $uniq_name = $i . uniqid();
            // ICON CHECK
            if (!empty($tab['vts_tab_icon'])) {
                $icon = '<span><span class="' . $tab['vts_tab_icon'] . ' icon-white"></span></span>';
            }
            // Tab Handle
            echo '<li class="' . $cls . '">';
            echo '<a href="#tabs_v2-pane' . $uniq_name . '" data-toggle="tab">';
            echo $icon;
            echo $tab['vts_tab_title'];
            echo '</a>';
            echo '</li>';
            // TAB CONTENT
            $content .= '<div class="tab-pane ' . $cls . '" id="tabs_v2-pane' . $uniq_name . '">';
            $content .= '<h4>' . $tab['vts_tab_c_title'] . '</h4>';
            if (preg_match('%(<p[^>]*>.*?</p>)%i', $tab['vts_tab_c_content'], $regs)) {
                $content .= $tab['vts_tab_c_content'];
            } else {
                $content .= '<p>' . $tab['vts_tab_c_content'] . '</p>';
            }
            $content .= '</div>';
            $i++;
        }
        echo '</ul>';
        echo '<div class="tab-content">';
        echo do_shortcode($content);
        echo '</div>';
    }
    echo '</div>';
    echo '</div>';
    echo '</div>';
}
示例#17
0
function _accordion($options)
{
    $element_size = zn_get_size($options['_sizer']);
    ?>
			<div class="<?php 
    echo $element_size['sizer'];
    ?>
">
			
			<?php 
    if (!empty($options['acc_title']) && $options['acc_style'] == 'default-style') {
        echo '<h3 class="m_title">' . $options['acc_title'] . '</h3>';
    } elseif (!empty($options['acc_title']) && ($options['acc_style'] == 'style2' || $options['acc_style'] == 'style3')) {
        echo '<h3>' . $options['acc_title'] . '</h3>';
    }
    $acc_id = 1;
    $uniq = uniqid();
    if (isset($options['accordion_single']) && is_array($options['accordion_single'])) {
        foreach ($options['accordion_single'] as $acc) {
            $colapsed = '';
            if (isset($acc['acc_colapsed']) && $acc['acc_colapsed'] == 'yes') {
                $colapsed = 'in';
            }
            echo '<div class="acc-group ' . $options['acc_style'] . '">';
            echo '<button data-toggle="collapse" data-target="#acc' . $uniq . '' . $acc_id . '" class="collapsed">' . $acc['acc_single_title'] . '</button>';
            echo '<div id="acc' . $uniq . '' . $acc_id . '" class="collapse ' . $colapsed . '">';
            echo '<div class="content">';
            if (preg_match('%(<p[^>]*>.*?</p>)%i', $acc['acc_single_desc'], $regs)) {
                echo do_shortcode($acc['acc_single_desc']);
            } else {
                echo '<p>' . do_shortcode($acc['acc_single_desc']) . '</p>';
            }
            echo '</div>';
            echo '</div>';
            echo '</div>';
            $acc_id++;
        }
    }
    ?>

				<!-- end // accordion texts  -->
			</div>
		
		<?php 
}
示例#18
0
function _image_box2($options)
{
    if (!empty($options['image_box_title'])) {
        echo '<div class="span12 offer-banners">';
        echo '<h3 class="m_title">' . $options['image_box_title'] . '</h3>';
        echo '</div>';
    }
    if (!empty($options['ib2_single']) && is_array($options['ib2_single'])) {
        foreach ($options['ib2_single'] as $simage) {
            if ($slide_image = $simage['ib2_image']) {
                if (is_array($slide_image)) {
                    // Get the saved image
                    $saved_image = $slide_image['image'];
                    if (!empty($slide_image['alt'])) {
                        $saved_alt = 'alt="' . $slide_image['alt'] . '"';
                    } else {
                        $saved_alt = '';
                    }
                    if (!empty($slide_image['title'])) {
                        $saved_title = 'title="' . $slide_image['title'] . '"';
                    } else {
                        $saved_title = '';
                    }
                } else {
                    $saved_image = $slide_image;
                    $saved_alt = '';
                    $saved_title = '';
                }
                echo '<div class="' . $simage['ib2_width'] . ' offer-banners">';
                $element_size = zn_get_size($simage['ib2_width']);
                $image = vt_resize('', $saved_image, $element_size['width'], '', true);
                $link_start = '<a href="#" class="hoverBorder">';
                $link_end = '</a>';
                if (!empty($simage['ib2_link']['url'])) {
                    $link_start = '<a href="' . $simage['ib2_link']['url'] . '" target="' . $simage['ib2_link']['target'] . '" class="hoverBorder">';
                    $link_end = '</a>';
                }
                echo $link_start;
                echo '<img src="' . $image['url'] . '" height="' . $image['height'] . '" width="' . $image['width'] . '" ' . $saved_alt . '  ' . $saved_title . ' />';
                echo $link_end;
                echo '</div>';
            }
        }
    }
}
示例#19
0
function _text_box($options)
{
    $element_size = zn_get_size($options['_sizer']);
    echo '<div class="' . $element_size['sizer'] . '">';
    if ($options['stb_style'] == 'style2' && !empty($options['stb_title'])) {
        echo '<h3>' . $options['stb_title'] . '</h3>';
    } elseif ($options['stb_style'] == 'style1' && !empty($options['stb_title'])) {
        echo '<h4 class="m_title">' . $options['stb_title'] . '</h4>';
    }
    if (!empty($options['stb_content'])) {
        if (preg_match('%(<[^>]*>.*?</)%i', $options['stb_content'], $regs)) {
            echo do_shortcode($options['stb_content']);
        } else {
            echo '<p>' . do_shortcode($options['stb_content']) . '</p>';
        }
    }
    echo '</div>';
}
示例#20
0
function _hover_box($options)
{
    $element_size = zn_get_size($options['_sizer']);
    $content = '';
    $cls = 'margin-top:10px;';
    echo '<div class="' . $element_size['sizer'] . '">';
    echo '<a href="' . $options['hb_link']['url'] . '" target="' . $options['hb_link']['target'] . '" class="hover-box ' . $options['hb_align'] . ' fixclear">';
    if (!empty($options['hb_icon'])) {
        echo '<img src="' . $options['hb_icon'] . '" alt="">';
    }
    if (!empty($options['hb_desc'])) {
        $content = '<p>' . $options['hb_desc'] . '</p>';
        $cls = '';
    }
    echo '<h3 style="' . $cls . '">' . $options['hb_title'] . '</h3>';
    echo '<h4>' . $options['hb_subtitle'] . '</h4>';
    echo $content;
    echo '</a>';
    echo '</div>';
}
示例#21
0
function _zn_sidebar($options)
{
    $element_size = zn_get_size($options['_sizer']);
    $sidebar_css = '';
    if ($options['sidebar_bg'] == 'no') {
        $sidebar_css = 'no_bg';
    }
    ?>

		<div class="<?php 
    echo $element_size['sizer'];
    ?>
">
			<?php 
    echo '<div id="sidebar" class="sidebar ' . $sidebar_css . '">';
    if (!function_exists('dynamic_sidebar') || !dynamic_sidebar($options['sidebar_select'])) {
    }
    echo '</div>';
    ?>
		</div>
	<?php 
}
示例#22
0
function _flickrfeed($options)
{
    $element_size = zn_get_size($options['_sizer']);
    if (!empty($options['ff_images'])) {
        $images_tl = $options['ff_images'];
    } else {
        $images_tl = 8;
    }
    $image_size = '';
    if ($options['ff_image_size'] == 'small') {
        $image_size = 'data-size="small"';
    }
    echo '<div class="' . $element_size['sizer'] . '">';
    echo '<div class="flickrfeed">';
    echo '<h3 class="m_title">' . $options['ff_title'] . '</h3>';
    echo '<ul class="flickr_feeds fixclear" data-limit="' . $images_tl . '" ' . $image_size . '></ul>';
    echo '</div><!-- end // flickrfeed -->';
    echo '</div>';
    if (!empty($options['ff_id'])) {
        $flickr = array('zn_flickr_feed' => "\n\t\t\t\t\t(function(\$){\n\t\t\t\t\tjQuery(window).load(function() {\n\t\t\t\t\t\t// load flicker photos\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar ff_container = jQuery('.flickr_feeds'),\n\t\t\t\t\t\t\tff_limit = (ff_container.attr('data-limit')) ?  ff_container.attr('data-limit') : 6;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tff_container.parent().removeClass('loading');\n\t\t\t\t\t\t\t// ff_limit = if data-limit attribute is set, the limit is user defined, if not, default is 6 \n\t\t\t\t\t\t\n\t\t\t\t\t\tff_container.jflickrfeed({\n\t\t\t\t\t\t\tlimit: ff_limit,\n\t\t\t\t\t\t\tqstrings: {\n\t\t\t\t\t\t\t\tid: '" . $options['ff_id'] . "'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\titemTemplate: '<li><a href=\"{{image_b}}\" data-rel=\"prettyPhoto\"><img src=\"{{image_s}}\" alt=\"{{title}}\" /><span class=\"theHoverBorder \"></span></a></li>'\n\t\t\t\t\t\t}, function(data) {\n\t\t\t\t\t\t\tjQuery(\".flickr_feeds a[data-rel^='prettyPhoto']\").prettyPhoto({theme:'pp_kalypso',social_tools:false, deeplinking:false});\n\t\t\t\t\t\t\t//jQuery(\".flickr_feeds li:nth-child(3n)\").addClass(\"last\");\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t})(jQuery);\n\t\t\t\t");
        zn_update_array($flickr);
    }
}
示例#23
0
function _circle_title_box($options)
{
    $element_size = zn_get_size($options['_sizer']);
    $c_title = '';
    echo '<div class="' . $element_size['sizer'] . '">';
    // TITLE
    if (!empty($options['ctb_circle_title'])) {
        $c_title = '<span>' . $options['ctb_circle_title'] . '</span> ';
    }
    // TITLE
    if (!empty($options['ctb_main_title'])) {
        echo '<h4 class="circle_title">' . $c_title . '' . $options['ctb_main_title'] . '</h4>';
    }
    // CONTENT
    if (!empty($options['ctb_content'])) {
        if (preg_match('%(<p[^>]*>.*?</p>)%i', $options['ctb_content'], $regs)) {
            echo do_shortcode($options['ctb_content']);
        } else {
            echo '<p>' . do_shortcode($options['ctb_content']) . '</p>';
        }
    }
    echo '</div>';
}
// size(width) counter
// Start the loop
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $i += $colWidth;
        echo '<div class="col-sm-' . $colWidth . '">';
        echo '<div class="portfolio-item kl-has-overlay portfolio-item--overlay">';
        if ($ports_num_columns == 1) {
            echo '<div class="row">';
            echo '<div class="col-sm-6">';
        }
        echo '<div class="img-intro portfolio-item-overlay-imgintro">';
        $port_media = get_post_meta($post->ID, 'zn_port_media', true);
        if (!empty($port_media) && is_array($port_media)) {
            $size = zn_get_size('eight');
            $has_image = false;
            // Modified portfolio display
            // Check to see if we have images
            if ($portfolio_image = $port_media[0]['port_media_image_comb']) {
                if (is_array($portfolio_image)) {
                    if ($saved_image = $portfolio_image['image']) {
                        if (!empty($portfolio_image['alt'])) {
                            $saved_alt = $portfolio_image['alt'];
                        } else {
                            $saved_alt = '';
                        }
                        if (!empty($portfolio_image['title'])) {
                            $saved_title = 'title="' . $portfolio_image['title'] . '"';
                        } else {
                            $saved_title = '';
示例#25
0
function _recent_work2($options)
{
    $element_size = zn_get_size($options['_sizer']);
    ?>
		
				<div class="recentwork_carousel style2 <?php 
    echo $element_size['sizer'];
    ?>
">
					<?php 
    // ELEMENT TITLE
    if (!empty($options['rw_title'])) {
        echo '<h3 class="m_title">' . $options['rw_title'] . '</h3>';
    }
    ?>
						<div class="controls">
							<a href="#" class="prev"><span class="icon-chevron-left"></span></a>
						<?php 
    // PORTFOLIO PAGE LINK
    if (!empty($options['rw_port_link'])) {
        echo '<a href="' . $options['rw_port_link'] . '" class="complete"><span class="icon-th"></span></a>';
    }
    ?>
							<a href="#" class="next"><span class="icon-chevron-right"></span></a>
						</div>
						

						<ul id="recent_works2" class="fixclear recent_works2">
						
						<?php 
    global $post;
    $posts_per_page = isset($options['ports_per_page']) ? $options['ports_per_page'] : '4';
    // how many posts
    // Start the query
    query_posts(array('post_type' => 'portfolio', 'posts_per_page' => $posts_per_page, 'tax_query' => array(array('taxonomy' => 'project_category', 'field' => 'id', 'terms' => $options['portfolio_categories']))));
    // Start the loop
    while (have_posts()) {
        the_post();
        // Get post meta information
        $post_meta_fields = get_post_meta($post->ID, 'zn_meta_elements', true);
        $post_meta_fields = maybe_unserialize($post_meta_fields);
        echo '<li>';
        echo '<a href="' . get_permalink() . '">';
        if (!empty($post_meta_fields['port_media']) && is_array($post_meta_fields['port_media'])) {
            $size = zn_get_size('four');
            $has_image = false;
            if ($portfolio_image = $post_meta_fields['port_media']['0']['port_media_image_comb']) {
                if (is_array($portfolio_image)) {
                    if ($saved_image = $portfolio_image['image']) {
                        if (!empty($portfolio_image['alt'])) {
                            $saved_alt = 'alt="' . $portfolio_image['alt'] . '"';
                        } else {
                            $saved_alt = '';
                        }
                        if (!empty($portfolio_image['title'])) {
                            $saved_title = 'title="' . $portfolio_image['title'] . '"';
                        } else {
                            $saved_title = '';
                        }
                        $has_image = true;
                    }
                } else {
                    $saved_image = $portfolio_image;
                    $has_image = true;
                    $saved_alt = '';
                    $saved_title = '';
                }
                if ($has_image) {
                    $image = vt_resize('', $saved_image, $size['width'], '169', true);
                }
            }
            // Check to see if we have video
            if ($portfolio_media = $post_meta_fields['port_media']['0']['port_media_video_comb']) {
            }
            // IMAGE
            if (!empty($saved_image)) {
                echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" ' . $saved_alt . ' ' . $saved_title . ' />';
            } elseif ($portfolio_media) {
                echo get_video_from_link($portfolio_media, '', $size['width'], '169');
            }
        }
        echo '<div class="details">';
        echo '<span class="plus">+</span>';
        // GET THE POST TITLE
        echo '<h4>' . get_the_title() . '</h4>';
        // GET ALL POST CATEGORIES
        echo '<span>' . strip_tags(get_the_term_list($post->ID, 'project_category', '', ' , ', '')) . '</span>';
        echo '</div>';
        echo '</a>';
        echo '</li>';
    }
    wp_reset_query();
    ?>

						</ul>
				</div><!-- end row // recentworks_carousel default-style -->
		
		<?php 
    $zn_recent_works2 = array('zn_recent_works2' => "\n\t\t\t\t\t\t\tjQuery(window).load(function(){\n\t\t\t\t\t\t\t\tjQuery('.recent_works2').carouFredSel({\n\t\t\t\t\t\t\t\t\tresponsive: true,\n\t\t\t\t\t\t\t\t\tscroll: 1,\n\t\t\t\t\t\t\t\t\tauto: false,\n\t\t\t\t\t\t\t\t\titems: {\n\t\t\t\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\t\t\t\tvisible: {\n\t\t\t\t\t\t\t\t\t\t\tmin: 4,\n\t\t\t\t\t\t\t\t\t\t\tmax: 10\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tprev\t: {\t\n\t\t\t\t\t\t\t\t\t\tbutton\t: function(){return jQuery(this).closest('.recentwork_carousel').find('.prev');},\n\t\t\t\t\t\t\t\t\t\tkey\t\t: \"left\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tnext\t: { \n\t\t\t\t\t\t\t\t\t\tbutton\t: function(){return jQuery(this).closest('.recentwork_carousel').find('.next');},\n\t\t\t\t\t\t\t\t\t\tkey\t\t: \"right\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t// *** end recent works carousel");
    zn_update_array($zn_recent_works2);
}
示例#26
0
function _latest_posts4($options)
{
    $element_size = zn_get_size($options['_sizer']);
    ?>
	
							
		<div class="<?php 
    echo $element_size['sizer'];
    ?>
">
			<div class="latest_posts default-style">
			
				<div class="row-fluid zn_content_no_margin">
					<div class="<?php 
    echo $element_size['sizer'];
    ?>
">
						<h3 class="m_title">
							<?php 
    echo $options['lp_title'];
    ?>
						</h3>
					</div>
				</div>
				<div class="row-fluid zn_content_no_margin">
				<?php 
    global $post;
    //print_r($options['lp_blog_categories']) ;
    // Check what categories were selected..if any
    if (!empty($options['lp_blog_categories'])) {
        $blog_category = implode(',', $options['lp_blog_categories']);
    } else {
        $blog_category = '0';
    }
    // HOW MANY POSTS
    if (isset($options['lp_num_posts'])) {
        $num_posts = $options['lp_num_posts'];
    } else {
        $num_posts = '3';
    }
    // Start the query
    query_posts(array('posts_per_page' => $num_posts, 'cat' => $blog_category));
    // GET THE NUMBER OF TOTAL POSTS RETURNED
    global $wp_query;
    // Start the loop
    while (have_posts()) {
        the_post();
        echo '<div class="span4 post">';
        $image = '';
        // Create the featured image html
        if (has_post_thumbnail($post->ID)) {
            $thumb = get_post_thumbnail_id($post->ID);
            $f_image = wp_get_attachment_url($thumb);
            if (!empty($f_image)) {
                $feature_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
                $image = vt_resize('', $f_image, 370, 200, true);
                $image = '<a href="' . get_permalink() . '" class="hoverBorder plus"><img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt=""/><h6>' . __("Read more", THEMENAME) . ' +</h6></a>';
            }
        }
        echo $image;
        echo '<em>';
        the_time('d F Y');
        echo ' ' . __("By", THEMENAME);
        echo ' ' . get_the_author();
        echo ' ' . __("in", THEMENAME) . ' ';
        the_category(", ");
        echo '</em>';
        echo '<h3 class="m_title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
        echo '</div>';
    }
    wp_reset_query();
    ?>
				</div>
			</div><!-- end // latest posts style 2 -->
		</div>

	<?php 
}
示例#27
0
        if (has_post_thumbnail() && !post_password_required()) {
            $thumb = get_post_thumbnail_id($post->ID);
            $f_image = wp_get_attachment_url($thumb);
            if (!empty($f_image)) {
                if (isset($data['sb_archive_use_full_image']) && $data['sb_archive_use_full_image'] == 'yes') {
                    $image = '<div class="zn_full_image"><a data-rel="prettyPhoto" href="' . $f_image . '" class="hoverBorder">' . get_the_post_thumbnail($post->ID, 'full-width-image') . '</a></div>';
                } else {
                    $image = '<div class="zn_post_image"><a href="' . get_permalink() . '" class="hoverBorder pull-left">' . get_the_post_thumbnail() . '</a></div>';
                }
            }
        } elseif ($data['zn_use_first_image'] == 'yes' && !post_password_required()) {
            $f_image = echo_first_image();
            if (!empty($f_image)) {
                if (isset($data['sb_archive_use_full_image']) && $data['sb_archive_use_full_image'] == 'yes') {
                    $feature_image = wp_get_attachment_url($thumb);
                    $size = zn_get_size('sixteen', $has_sidebar, 30);
                    $image = vt_resize('', $f_image, $size['width'], '', true);
                    $image = '<div class="zn_full_image"><a data-rel="prettyPhoto" href="' . $feature_image . '" class="hoverBorder"><img class="shadow" src="' . $image['url'] . '" alt=""/></a></div>';
                } else {
                    $image = vt_resize('', $f_image, 280, 187, true);
                    $image = '<a href="' . get_permalink() . '" class="hoverBorder pull-left" style="margin-right: 20px;margin-bottom:4px;"><img class="shadow" src="' . $image['url'] . '" alt=""/></a>';
                }
            }
        }
        ?>
					
					<div class="itemContainer post-<?php 
        the_ID();
        ?>
"> 
				
示例#28
0
    /**
     * This method is used to display the output of the element.
     *
     * @return void
     */
    function element()
    {
        $options = $this->data['options'];
        $rwStyle = $this->opt('rw_style', '1');
        $rwStyleMod = $rwStyle;
        $custom_img_size = $this->opt('custom_img_size') === 'yes' ? true : false;
        $col_left = 3;
        $col_right = 9;
        // For styles 2 and 3, do some re-spacing
        if ($rwStyle == 3 || $rwStyle == 2) {
            // Check if forced bigger description is enabled
            if ($this->opt('rw_forcebiggerdesc', '') != 1) {
                $col_left = 4;
                $col_right = 8;
            }
            $rwStyleMod = '2 rwc--3';
        }
        $rwheight = (int) $this->opt('rw_height', 165);
        $elm_classes = array();
        $elm_classes[] = $this->data['uid'];
        $elm_classes[] = $this->opt('css_class', '');
        $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', '');
        $elm_classes[] = 'recentwork--' . $color_scheme;
        $elm_classes[] = 'element-scheme--' . $color_scheme;
        $elm_classes[] = 'recentwork_carousel--' . (int) $rwStyleMod;
        // [wpk]
        // @since 4.0.9
        $autoplay = $this->opt('rw_slider_autoplay', 1) == 1 ? 1 : 0;
        $timeout = $this->opt('rw_slider_timeout', 5000);
        ?>

<div class="recentwork_carousel <?php 
        echo implode(' ', $elm_classes);
        ?>
 clearfix">

	<div class="row">

		<div class="col-sm-<?php 
        echo $col_left;
        ?>
">
			<div class="recentwork_carousel__left">
				<?php 
        // ELEMENT TITLE
        if (!empty($options['rw_title'])) {
            echo '<h3 class="recentwork_carousel__title element-scheme__hdg1">' . $options['rw_title'] . '</h3>';
        }
        // ELEMENT DESCRIPTION
        if (!empty($options['rw_desc'])) {
            echo '<p class="recentwork_carousel__desc">' . $options['rw_desc'] . '</p>';
        }
        // PORTFOLIO PAGE LINK
        if (!empty($options['rw_port_link']) && ($rwStyle == 2 || $rwStyle == 3)) {
            echo '<a href="' . $options['rw_port_link'] . '" class="btn btn-fullcolor">' . $this->opt('rw_port_link_text', 'VIEW ALL') . '</a>';
        }
        ?>
				<div class="controls recentwork_carousel__controls">
					<a href="#" class="prev recentwork_carousel__prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
					<?php 
        // PORTFOLIO PAGE LINK
        if (!empty($options['rw_port_link']) && ($rwStyle != 2 && $rwStyle != 3)) {
            echo '<a href="' . $options['rw_port_link'] . '" class="complete"><span class="glyphicon glyphicon-th"></span></a>';
        }
        ?>
					<a href="#" class="next recentwork_carousel__next"><span class="glyphicon glyphicon-chevron-right"></span></a>
				</div><!-- /.recentwork_carousel__controls -->
				</div><!-- /.recentwork_carousel__left -->
		</div>

		<div class="col-sm-<?php 
        echo $col_right;
        ?>
">
			<div class="recentwork_carousel__crsl-wrapper">
				<ul class="recent_works1 fixclear recentwork_carousel__crsl"
					data-autoplay="<?php 
        echo $autoplay;
        ?>
"
					data-timeout="<?php 
        echo $timeout;
        ?>
">
					<?php 
        global $post;
        $posts_per_page = $this->opt('ports_per_page', '4');
        // how many posts
        if (empty($options['portfolio_categories'])) {
            $options['portfolio_categories'] = '';
        }
        // Start the query
        $queryArgs = array('post_type' => 'portfolio', 'posts_per_page' => $posts_per_page, 'post_status' => 'publish');
        if (!empty($options['portfolio_categories'])) {
            $queryArgs['tax_query'] = array(array('taxonomy' => 'project_category', 'field' => 'id', 'terms' => $options['portfolio_categories']));
        }
        $theQuery = new WP_Query($queryArgs);
        // Start the loop
        if ($theQuery->have_posts()) {
            while ($theQuery->have_posts()) {
                $theQuery->the_post();
                echo '<li>';
                echo '<a href="' . get_permalink() . '" class="recentwork_carousel__link">';
                $port_media = get_post_meta($post->ID, 'zn_port_media', true);
                if (!empty($port_media) && is_array($port_media)) {
                    $size = zn_get_size('four');
                    $has_image = false;
                    if ($portfolio_image = $port_media[0]['port_media_image_comb']) {
                        if (is_array($portfolio_image)) {
                            if ($saved_image = $portfolio_image['image']) {
                                $has_image = true;
                            }
                        } else {
                            $saved_image = $portfolio_image;
                            $has_image = true;
                        }
                        if ($has_image) {
                            if ($custom_img_size) {
                                $img_width = $this->opt('img_width', 270);
                                $img_height = $this->opt('img_height', 320);
                                $image = vt_resize('', $saved_image, $img_width, $img_height, true);
                            } else {
                                $image = vt_resize('', $saved_image, $size['width'], '', true);
                            }
                        }
                    }
                    // Check to see if we have video
                    if ($portfolio_media = $port_media[0]['port_media_video_comb']) {
                    }
                    echo '<div class="hover recentwork_carousel__hover">';
                    // IMAGE
                    if (!empty($saved_image)) {
                        echo '<div style="height: ' . $rwheight . 'px; background-image:url(' . $image['url'] . ');" class="recentwork_carousel__img"></div>';
                    } elseif ($portfolio_media) {
                        echo get_video_from_link($portfolio_media, '', "100%", $rwheight);
                    }
                    echo '<span class="hov recentwork_carousel__hov"></span>';
                    echo '</div>';
                }
                $cat = '<span class="recentwork_carousel__cat">' . strip_tags(get_the_term_list($post->ID, 'project_category', '', ' , ', '')) . '</span>';
                echo '<div class="details recentwork_carousel__details">';
                echo '<span class="bg recentwork_carousel__bg"></span>';
                if ($rwStyle == 2 || $rwStyle == 3) {
                    echo $cat;
                }
                // GET THE POST TITLE
                echo '<h4 class="recentwork_carousel__crsl-title ' . ($rwStyle == '1' ? 'text-custom' : '') . '">' . get_the_title() . '</h4>';
                // GET ALL POST CATEGORIES
                if ($rwStyle != 2 && $rwStyle != 3) {
                    echo $cat;
                }
                echo '</div>';
                echo '</a>';
                echo '</li>';
            }
            wp_reset_query();
        }
        ?>

				</ul>
			</div><!-- /.recentwork_carousel__crsl-wrapper -->
		</div>
	</div>
</div><!-- end row // recentworks_carousel default-style -->



		<?php 
    }
示例#29
0
function _latest_posts3($options)
{
    $element_size = zn_get_size($options['_sizer']);
    ?>
	
							
		<div class="<?php 
    echo $element_size['sizer'];
    ?>
">
			<div class=" latest_posts style2">
				<h3 class="m_title"><?php 
    echo $options['lp_title'];
    ?>
</h3>
				<?php 
    if (!empty($options['lp_blog_page'])) {
        echo '<a href="' . $options['lp_blog_page'] . '" class="viewall">' . __("VIEW ALL", THEMENAME) . ' -</a>';
    }
    ?>
				<ul class="posts">
				<?php 
    global $post;
    // Check what categories were selected..if any
    if (isset($options['lp_blog_categories'])) {
        $blog_category = implode(',', $options['lp_blog_categories']);
    } else {
        $blog_category = '';
    }
    // HOW MANY POSTS
    if (isset($options['lp_num_posts'])) {
        $num_posts = $options['lp_num_posts'];
    } else {
        $num_posts = '2';
    }
    // Start the query
    query_posts(array('posts_per_page' => $num_posts, 'cat' => $blog_category));
    // GET THE NUMBER OF TOTAL POSTS RETURNED
    global $wp_query;
    // Start the loop
    while (have_posts()) {
        the_post();
        echo '<li class="post">';
        echo '<div class="details">';
        echo '<span class="date">';
        the_time('d/m/Y');
        echo '</span>';
        echo '<span class="cat">' . __('in ', THEMENAME);
        the_category(", ");
        echo '</span>';
        echo '</div>';
        // TITLE
        echo '<h4 class="title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h4>';
        // TEXT
        echo '<div class="text">';
        $excerpt = get_the_excerpt();
        $excerpt = strip_shortcodes($excerpt);
        $excerpt = strip_tags($excerpt);
        $the_str = mb_substr($excerpt, 0, 350);
        echo $the_str . '...';
        echo '</div>';
        echo '</li>';
    }
    wp_reset_query();
    ?>

				</ul>
			</div><!-- end // latest posts style 2 -->
		</div>

	<?php 
}
示例#30
0
    /**
     * This method is used to display the output of the element.
     *
     * @return void
     */
    function element()
    {
        $options = $this->data['options'];
        $rwheight = (int) $this->opt('rw_height', 165);
        // [wpk]
        // @since 4.0.9
        $autoplay = $this->opt('rw2_slider_autoplay', 1) == 1 ? 1 : 0;
        $timeout = $this->opt('rw2_slider_timeout', 5000);
        ?>

			<div class="recentwork_carousel recentwork_carousel_v2 <?php 
        echo $this->data['uid'];
        ?>
 <?php 
        echo $this->opt('css_class', '');
        ?>
">
				<?php 
        // ELEMENT TITLE
        if (!empty($options['rw_title'])) {
            echo '<h3 class="recentwork_carousel__title m_title m_title_ext text-custom">' . $options['rw_title'] . '</h3>';
        }
        ?>
				<div class="controls recentwork_carousel__controls">
					<a href="#" class="prev recentwork_carousel__prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
					<?php 
        // PORTFOLIO PAGE LINK
        if (!empty($options['rw_port_link'])) {
            echo '<a href="' . $options['rw_port_link'] . '" class="complete"><span class="glyphicon glyphicon-th"></span></a>';
        }
        ?>
					<a href="#" class="next recentwork_carousel__next"><span class="glyphicon glyphicon-chevron-right"></span></a>
				</div>

				<div class="work-carousel recentwork_carousel__crsl-wrapper">
					<ul class="recent_works2 recentwork_carousel__crsl clearfix"
						data-autoplay="<?php 
        echo $autoplay;
        ?>
"
						data-timeout="<?php 
        echo $timeout;
        ?>
">
						<?php 
        global $post;
        $posts_per_page = $this->opt('ports_per_page', '6');
        $categories = $this->opt('portfolio_categories', false);
        // Start the query
        $queryArgs = array('post_type' => 'portfolio', 'post_status' => 'publish', 'posts_per_page' => $posts_per_page);
        if (!empty($categories)) {
            $queryArgs['tax_query'] = array(array('taxonomy' => 'project_category', 'field' => 'id', 'terms' => $categories));
        }
        $theQuery = new WP_Query($queryArgs);
        // Start the loop
        if ($theQuery->have_posts()) {
            while ($theQuery->have_posts()) {
                $theQuery->the_post();
                echo '<li>';
                echo '<a href="' . get_permalink() . '" class="recentwork_carousel__link">';
                $port_media = get_post_meta($post->ID, 'zn_port_media', true);
                if (!empty($port_media) && is_array($port_media)) {
                    $size = zn_get_size('four');
                    $has_image = false;
                    if ($portfolio_image = $port_media[0]['port_media_image_comb']) {
                        if (is_array($portfolio_image)) {
                            if ($saved_image = $portfolio_image['image']) {
                                $has_image = true;
                            }
                        } else {
                            $saved_image = $portfolio_image;
                            $has_image = true;
                        }
                        if ($has_image) {
                            $image = vt_resize('', $saved_image, 450, $rwheight, true);
                        }
                    }
                    // Check to see if we have video
                    if ($portfolio_media = $port_media[0]['port_media_video_comb']) {
                    }
                    // IMAGE
                    if (!empty($saved_image)) {
                        echo '<div style="height: ' . $rwheight . 'px; background-image:url(' . $image['url'] . ');" class="recentwork_carousel__img"></div>';
                    } elseif ($portfolio_media) {
                        echo get_video_from_link($portfolio_media, '', '100%', $rwheight);
                    }
                }
                echo '<div class="details recentwork_carousel__details">';
                echo '<span class="plus recentwork_carousel__plus">+</span>';
                // GET THE POST TITLE
                echo '<h4 class="recentwork_carousel__crsl-title">' . get_the_title() . '</h4>';
                // GET ALL POST CATEGORIES
                echo '<span class="recentwork_carousel__cat">' . strip_tags(get_the_term_list($post->ID, 'project_category', '', ' , ', '')) . '</span>';
                echo '</div>';
                echo '</a>';
                echo '</li>';
            }
            wp_reset_query();
        }
        ?>
					</ul>
				</div>
		</div><!-- end -->

		<?php 
    }