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); }
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); }
function _rev_slider($options) { global $meta_fields; if (isset($options['ww_header_style']) && !empty($options['ww_header_style'])) { $style = 'uh_' . $options['ww_header_style']; } else { $style = ''; } ?> <div id="slideshow" class="<?php echo $style; ?> portfolio_devices zn_slideshow"> <div class="bgback"></div> <div data-images="<?php echo IMAGES_URL; ?> /" id="sparkles"></div> <?php echo do_shortcode('[rev_slider ' . $options['revslider_id'] . ']'); ?> <div class="zn_header_bottom_style"></div> </div><!-- end page_header --> <?php if ($options['revslider_paralax']) { $paralax = array('zn_paralax' => "\t\n\t\t\t\t\tvar parallax = new Parallax({\n\t\t\t\t\t\tcontainer: '#slideshow',\n\t\t\t\t\t\tlayers: [\n\t\t\t\t\t\t\t{ selector: '.para1', ratio: .020 },\n\t\t\t\t\t\t\t{ selector: '.para2', ratio: .010 },\n\t\t\t\t\t\t\t{ selector: '.para3', ratio: .008 },\n\t\t\t\t\t\t\t{ selector: '.para4', ratio: .005 },\n\t\t\t\t\t\t\t{ selector: '.para5', ratio: .005 }\n\t\t\t\t\t\t]\n\t\t\t\t\t});\n\n\t\t\t\t"); zn_update_array($paralax); } }
function _screenshoot_box($options) { ?> <div class="span12"> <div class="screenshot-box fixclear"> <div class="thescreenshot"> <div class="controls"><a href="#" class="prev"></a><a href="#" class="next"></a></div> <ul id="screenshot-carousel" class="fixclear zn_screenshot-carousel"> <?php if (!empty($options['ssb_imag_single']) && is_array($options['ssb_imag_single'])) { foreach ($options['ssb_imag_single'] as $image) { $image = vt_resize('', $image['ssb_single_screenshoot'], '580', '328', true); echo '<li><img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt=""></li>'; } } ?> </ul> </div> <div class="left-side"> <h3 class="title"><?php echo $options['ssb_title']; ?> </h3> <?php if (!empty($options['ssb_feat_single']) && is_array($options['ssb_feat_single'])) { echo '<ul class="features">'; foreach ($options['ssb_feat_single'] as $feat) { echo '<li>'; // FEATURE TITLE if (!empty($feat['ssb_single_title'])) { echo '<h4>' . $feat['ssb_single_title'] . '</h4>'; } // FEATURE DESC if (!empty($feat['ssb_single_desc'])) { echo '<span>' . $feat['ssb_single_desc'] . '</span>'; } echo '</li>'; } echo '</ul>'; } // BUTTON LINK if (!empty($options['ssb_link_text']) && !empty($options['ssb_button_link']['url'])) { echo '<a href="' . $options['ssb_button_link']['url'] . '" target="' . $options['ssb_button_link']['target'] . '" class="btn btn-large btn-flat redbtn">' . $options['ssb_link_text'] . '</a>'; } ?> </div> </div><!-- end screenshot-box --> </div> <?php $screenshoot_box = array('zn_screenshoot_box' => "jQuery(window).load(function() {\n\t\t\t\t\t\t// ** Screenshots carousel\n\t\t\t\t\t\tjQuery('.zn_screenshot-carousel').carouFredSel({\n\t\t\t\t\t\t\tresponsive: true,\n\t\t\t\t\t\t\tscroll: { fx: \"crossfade\", duration: \"1500\" },\n\t\t\t\t\t\t\titems: {\n\t\t\t\t\t\t\t\twidth: 580\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tauto: true,\n\t\t\t\t\t\t\tprev\t: {\t\n\t\t\t\t\t\t\t\tbutton\t: function(){return jQuery(this).closest('.thescreenshot').find('.prev');},\n\t\t\t\t\t\t\t\tkey\t\t: \"left\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnext\t: { \n\t\t\t\t\t\t\t\tbutton\t: function(){return jQuery(this).closest('.thescreenshot').find('.next');},\n\t\t\t\t\t\t\t\tkey\t\t: \"right\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// *** end Screenshots carousel\n\t\t\t\t\t\n\t\t\t\t});"); zn_update_array($screenshoot_box); }
function _icarousel($options) { if (isset($options['ic_header_style']) && !empty($options['ic_header_style']) && $options['ic_header_style'] != 'zn_def_header_style') { $style = 'uh_' . $options['ic_header_style']; } else { $style = 'zn_def_header_style'; } ?> <div id="slideshow" class="<?php echo $style; ?> "> <div class="bgback"></div> <div class="carousel-container"> <div id="icarousel"> <?php if (isset($options['single_icarousel']) && is_array($options['single_icarousel'])) { foreach ($options['single_icarousel'] as $slide) { $link_start = '<a href="#" class="slide">'; $link_end = '</a>'; $slide_class = 'class="slide"'; if (isset($slide['ic_slide_link']['url']) && !empty($slide['ic_slide_link']['url'])) { // Set defaults $link_start = '<a class="slide" href="' . $slide['ic_slide_link']['url'] . '" target="' . $slide['ic_slide_link']['target'] . '">'; $link_end = '</a>'; $slide_class = ''; } echo $link_start; if (isset($slide['ic_slide_image']) && !empty($slide['ic_slide_image'])) { $image = vt_resize('', $slide['ic_slide_image'], '480', '360', true); echo '<img ' . $slide_class . ' src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" />'; } if (isset($slide['ic_slide_title']) && !empty($slide['ic_slide_title'])) { echo '<h5><span>' . $slide['ic_slide_title'] . '</span></h5>'; } echo $link_end; } } ?> </div> </div> </div><!-- end slideshow --> <?php // Load JS and CSS wp_enqueue_style('icarousel_demo'); wp_enqueue_style('icarousel'); wp_enqueue_script('icarousel'); wp_enqueue_script('mousewheel'); wp_enqueue_script('raphael_min'); $icarousel = array('zn_icarousel_slider' => "\t\n\t\t\t\t\t\t\t\tjQuery('#icarousel').iCarousel({\n\t\t\t\t\t\t\t\t\teasing: 'easeInOutQuint',\n\t\t\t\t\t\t\t\t\tslides: 7,\n\t\t\t\t\t\t\t\t\tanimationSpeed: 700,\n\t\t\t\t\t\t\t\t\tpauseTime: 5000,\n\t\t\t\t\t\t\t\t\tperspective: 75,\n\t\t\t\t\t\t\t\t\tslidesSpace: 300,\n\t\t\t\t\t\t\t\t\tpauseOnHover: true,\n\t\t\t\t\t\t\t\t\tdirection: \"ltr\",\n\t\t\t\t\t\t\t\t\ttimer: \"Bar\",\n\t\t\t\t\t\t\t\t\ttimerOpacity: 0.4,\n\t\t\t\t\t\t\t\t\ttimerDiameter: 220,\n\t\t\t\t\t\t\t\t\tkeyboardNav: true,\n\t\t\t\t\t\t\t\t\tmouseWheel: true,\n\t\t\t\t\t\t\t\t\ttimerPadding: 3,\n\t\t\t\t\t\t\t\t\ttimerStroke: 4,\n\t\t\t\t\t\t\t\t\ttimerBarStroke: 0,\n\t\t\t\t\t\t\t\t\ttimerColor: \"#FFF\",\n\t\t\t\t\t\t\t\t\ttimerPosition: \"bottom-center\",\n\t\t\t\t\t\t\t\t\ttimerX: 15,\n\t\t\t\t\t\t\t\t\ttimerY: 30\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t;"); zn_update_array($icarousel); }
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); }
function _fancyslider($options) { ?> <div id="slideshow" class=""> <div class="container"> <div class="flexslider zn_fancy_slider"> <ul class="slides"> <?php if (isset($options['single_fancy']) && is_array($options['single_fancy'])) { foreach ($options['single_fancy'] as $slide) { $link_start = ''; $link_end = ''; if (isset($slide['ww_slide_link']['url']) && !empty($slide['ww_slide_link']['url'])) { // Set defaults $link_start = '<a class="link" href="' . $slide['ww_slide_link']['url'] . '" target="' . $slide['ww_slide_link']['target'] . '">'; $link_end = '</a>'; } echo '<li data-color="' . $slide['ww_slide_color'] . '">'; echo $link_start; if (isset($slide['ww_slide_image']) && !empty($slide['ww_slide_image'])) { $image = vt_resize('', $slide['ww_slide_image'], '940', '', true); echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" />'; } echo $link_end; echo '</li>'; } } ?> </ul> </div><!-- end #flexslider --> </div> <div class="shadowUP"></div> <div class="shadowUP"></div> </div><!-- end slideshow --> <?php // LOAD CSS AND JS wp_enqueue_style('flex_slider_fancy'); wp_enqueue_script('flex_slider'); wp_enqueue_script('flex_slider_colors'); $zn_fancy_slider = array('zn_fancy_slider' => "\n\t\t\t\t(function(\$) {\n\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\tfunction slideCompleteFancy(args) {\n\t\t\t\t\t\t\t//console.log(args);\n\t\t\t\t\t\t\tvar _arg = \$(args),\n\t\t\t\t\t\t\t\tslideshow = _arg.closest('#slideshow'),\n\t\t\t\t\t\t\t\tcolor = \$(args.slides).eq(args.animatingTo).attr('data-color');\n\t\t\t\t\t\t\t\tconsole.log(color)\n\t\t\t\t\t\t\tif( _arg.css('background-image') != 'none') _arg.css('background-image', 'none');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tslideshow.animate({backgroundColor: color}, 400);\n\t\t\t\t\t\t\t//slideshow.css({'background-color': color});\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\$(\".flexslider.zn_fancy_slider\").flexslider({\n\t\t\t\t\t\t\tanimation: \"slide\",\t\t\t\t//String: Select your animation type, \"fade\" or \"slide\"\n\t\t\t\t\t\t\tdirection: \"vertical\",\t\t\t//String: Select the sliding direction, \"horizontal\" or \"vertical\"\n\t\t\t\t\t\t\tslideshow: true,\t\t\t\t//Boolean: Animate slider automatically\n\t\t\t\t\t\t\tslideshowSpeed: 7000,\t\t\t//Integer: Set the speed of the slideshow cycling, in milliseconds\n\t\t\t\t\t\t\tanimationDuration: 600,\t\t\t//Integer: Set the speed of animations, in milliseconds\n\t\t\t\t\t\t\tdirectionNav: true,\t\t\t\t//Boolean: Create navigation for previous/next navigation? (true/false)\n\t\t\t\t\t\t\tcontrolNav: true,\t\t\t\t//Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage\n\t\t\t\t\t\t\tkeyboardNav: true,\t\t\t\t//Boolean: Allow slider navigating via keyboard left/right keys\n\t\t\t\t\t\t\tmousewheel: false,\t\t\t\t//{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel\n\t\t\t\t\t\t\tsmoothHeight: true,\n\t\t\t\t\t\t\trandomize: false,\t\t\t\t//Boolean: Randomize slide order\n\t\t\t\t\t\t\tslideToStart: 0,\t\t\t\t//Integer: The slide that the slider should start on. Array notation (0 = first slide)\n\t\t\t\t\t\t\tanimationLoop: true,\t\t\t//Boolean: Should the animation loop? If false, directionNav will received \"disable\" classes at either end\n\t\t\t\t\t\t\tpauseOnAction: true,\t\t\t//Boolean: Pause the slideshow when interacting with control elements, highly recommended.\n\t\t\t\t\t\t\tpauseOnHover: false,\t\t\t//Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering\n\t\t\t\t\t\t\tstart: slideCompleteFancy,\n\t\t\t\t\t\t\tbefore: slideCompleteFancy\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t})(jQuery);\n\t\t\t"); zn_update_array($zn_fancy_slider); }
function widget($args, $instance) { $instance['title'] = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); echo $args['before_widget']; if (!empty($instance['title'])) { echo $args['before_title'] . $instance['title'] . $args['after_title']; } echo '<div class="flickrfeed loading">'; echo '<ul class="flickr_feeds fixclear" data-size="' . $instance['flickr_size'] . '"></ul>'; echo '</div><!-- end // flickrfeed -->'; echo $args['after_widget']; $flickr = array('zn_flickr_feed' => "\n\t\t\t\t(function(\$){\n\t\t\t\tjQuery(window).load(function() {\n\t\t\t\t\t// load flicker photos\n\t\t\t\t\t\n\t\t\t\t\tvar ff_container = jQuery('.flickr_feeds'),\n\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\n\t\t\t\t\tff_container.parent().removeClass('loading');\n\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\n\t\t\t\t\tff_container.jflickrfeed({\n\t\t\t\t\t\tlimit: " . $instance['flickr_num'] . ",\n\t\t\t\t\t\tqstrings: {\n\t\t\t\t\t\t\tid: '" . $instance['flickr_id'] . "'\n\t\t\t\t\t\t},\n\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}, function(data) {\n\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//jQuery(\".flickr_feeds li:nth-child(3n)\").addClass(\"last\");\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\t})(jQuery);\n\t\t\t"); zn_update_array($flickr); }
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); } }
function _portfolio_carousel($options) { $element_size = zn_get_size($options['_sizer']); global $post, $paged; $posts_per_page = isset($options['ports_per_page']) ? $options['ports_per_page'] : '4'; // how many posts if (is_front_page()) { $paged = get_query_var('page') ? get_query_var('page') : 1; } else { $paged = get_query_var('paged') ? get_query_var('paged') : 1; } $query = array('post_type' => 'portfolio', 'paged' => $paged, 'posts_per_page' => $posts_per_page, 'tax_query' => array(array('taxonomy' => 'project_category', 'field' => 'id', 'terms' => $options['portfolio_categories'])), 'showposts' => $options['ports_per_page_visible']); // Start the query query_posts($query); $i = 1; ?> <div class="span12"> <?php if (have_posts()) { 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); ?> <div class="row-fluid hg-portfolio-carousel"> <div class="span6"> <div class="ptcontent"> <h3 class="title"> <a href="<?php the_permalink(); ?> "><span class="name"><?php the_title(); ?> </span></a> </h3> <div class="pt-cat-desc"> <?php if (preg_match('/<!--more(.*?)?-->/', $post->post_content)) { the_content(''); } else { the_excerpt(); } ?> </div><!-- end item desc --> <div class="itemLinks"> <?php if (!empty($post_meta_fields['sp_link']['url'])) { echo '<span><a href="' . $post_meta_fields['sp_link']['url'] . '" target="' . $post_meta_fields['sp_link']['target'] . '" >' . __("Live Preview: ", THEMENAME) . '<strong>' . $post_meta_fields['sp_link']['url'] . '</strong></a></span>'; } ?> <span class="seemore"> <a href="<?php the_permalink(); ?> " ><?php _e('See more →', THEMENAME); ?> </a> </span> </div><!-- end item links --> </div><!-- end item content --> </div> <div class="span6"> <div class="ptcarousel"> <?php if (count($post_meta_fields['port_media']) > 1) { ?> <div class="controls"> <a href="#" class="prev"><span class="icon-chevron-left icon-white"></span></a> <a href="#" class="next"><span class="icon-chevron-right icon-white"></span></a> </div> <?php } ?> <ul class="ptcarousel1"> <?php if (!empty($post_meta_fields['port_media']) && is_array($post_meta_fields['port_media'])) { foreach ($post_meta_fields['port_media'] as $media) { $size = zn_get_size('eight'); $has_image = false; // Modified portfolio display // Check to see if we have images if ($portfolio_image = $media['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'], '', true); } } // Check to see if we have video if ($portfolio_media = $media['port_media_video_comb']) { } // Display the media if (!empty($saved_image) && $portfolio_media) { echo '<li>'; echo '<a href="' . $portfolio_media . '" data-type="video" rel="prettyPhoto" class="hoverLink">'; echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" ' . $saved_alt . ' ' . $saved_title . ' />'; echo '</a>'; echo '</li>'; } elseif (!empty($saved_image)) { echo '<li>'; echo '<a href="' . $saved_image . '" data-type="image" rel="prettyPhoto" class="hoverLink">'; echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" ' . $saved_alt . ' ' . $saved_title . ' />'; echo '</a>'; echo '</li>'; } elseif ($portfolio_media) { echo '<li>'; echo get_video_from_link($portfolio_media, '', $size['width'], $size['height']); echo '</li>'; } } } ?> </ul> </div><!-- end ptcarousel --> </div> <?php if ($i % $options['ports_per_page_visible'] != 0) { echo '<div class="span12"><hr class="bs-docs-separator"></div>'; } $i++; ?> </div><!-- end portfolio layout --> <?php } ?> <?php } ?> <?php echo '<div class="clear"></div>'; echo '<div class="span12" >'; zn_pagination(); wp_reset_query(); echo '</div>'; ?> </div> <?php $zn_pcarousel = array('zn_pcarousel' => "\n\t\t\t\t(function(\$) {\n\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t// ** Portfolio Carousel\n\t\t\t\t\t\tvar carousels =\tjQuery('.ptcarousel1');\n\t\t\t\t\t\tcarousels.each(function(index, element) {\n\n\t\t\t\t\t\t\tif ( \$(this).children().length > 1 ){\n\t\t\t\t\t\t\t\t\$(this).carouFredSel({\n\t\t\t\t\t\t\t\t\tresponsive: true,\n\t\t\t\t\t\t\t\t\titems: { width: 570 },\n\t\t\t\t\t\t\t\t\tprev\t: {\tbutton : \$(this).parent().find('a.prev'), key : \"left\" },\n\t\t\t\t\t\t\t\t\tnext\t: { button : \$(this).parent().find('a.next'), key : \"right\" },\n\t\t\t\t\t\t\t\t\tauto: {timeoutDuration: 5000},\n\t\t\t\t\t\t\t\t\tscroll: { fx: \"crossfade\", duration: \"1500\" }\n\t\t\t\t\t\t\t\t});\t\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t});\n\t\t\t\t\t\t// *** end Portfolio Carousel\n\t\t\t\t\t});\n\t\t\t\t})(jQuery);\n\t\t\t"); zn_update_array($zn_pcarousel); }
function _partners_logos($options) { $element_size = zn_get_size($options['_sizer']); preg_match('|\\d+|', $element_size['sizer'], $new_size); $new_size = $new_size[0] - 2; ?> <div class="span2 partners_carousel"> <?php if (!empty($options['pl_title']) && $options['pl_title_style'] == 'style1') { echo '<h5 class="title"><span>' . $options['pl_title'] . '</span></h5>'; } elseif (!empty($options['pl_title']) && $options['pl_title_style'] == 'style2') { echo '<h4 class="m_title"><span>' . $options['pl_title'] . '</span></h4>'; } ?> <div class="controls"> <a href="#" class="prev"><span class="icon-chevron-left"></span></a> <a href="#" class="next"><span class="icon-chevron-right"></span></a> </div> </div> <div class="span<?php echo $new_size; ?> partners_carousel"> <ul id="partners_carousel" class="fixclear partners_carousel_trigger"> <?php if (!empty($options['partners_single']) && is_array($options['partners_single'])) { foreach ($options['partners_single'] as $partner) { $link_start = '<a href="#">'; $link_end = '</a>'; if ($slide_image = $partner['lp_single_logo']) { if (!empty($partner['lp_link']['url'])) { $link_start = '<a href="' . $partner['lp_link']['url'] . '" target="' . $partner['lp_link']['target'] . '">'; $link_end = '</a>'; } $saved_alt = ''; $saved_title = ''; if (is_array($slide_image)) { if ($saved_image = $slide_image['image']) { // Image alt if (!empty($slide_image['alt'])) { $saved_alt = 'alt="' . $slide_image['alt'] . '"'; } // Image title if (!empty($slide_image['title'])) { $saved_title = 'title="' . $slide_image['title'] . '"'; } echo '<li>'; echo $link_start; echo '<img src="' . $saved_image . '" ' . $saved_alt . ' ' . $saved_title . '/>'; echo $link_end; echo '</li>'; } } else { $saved_image = $slide_image; echo '<li>'; echo $link_start; echo '<img src="' . $saved_image . '" ' . $saved_alt . ' ' . $saved_title . '/>'; echo $link_end; echo '</li>'; } } } } ?> </ul> </div> <?php $partners_logos = array('zn_partners_logo' => "jQuery(window).load(function(){\n\t\t\t// ** partners carousel\n\t\t\tjQuery('.partners_carousel_trigger').carouFredSel({\n\t\t\t\tresponsive: true,\n\t\t\t\tscroll: 1,\n\t\t\t\tauto: false,\n\t\t\t\titems: {\n\t\t\t\t\twidth: 250,\n\t\t\t\t\tvisible: {\n\t\t\t\t\t\tmin: 3,\n\t\t\t\t\t\tmax: 10\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tprev\t: {\t\n\t\t\t\t\tbutton\t: function(){return jQuery(this).closest('.row,.row-fluid').find('.prev');},\n\t\t\t\t\tkey\t\t: \"left\"\n\t\t\t\t},\n\t\t\t\tnext\t: { \n\t\t\t\t\tbutton\t: function(){return jQuery(this).closest('.row,.row-fluid').find('.next');},\n\t\t\t\t\tkey\t\t: \"right\"\n\t\t\t\t}\n\t\t\t});\n\t\t\t// *** end partners carousel\n\t\t\t});"); zn_update_array($partners_logos); }
function _static7($options) { if (isset($options['ww_header_style']) && !empty($options['ww_header_style'])) { $style = 'uh_' . $options['ww_header_style']; } else { $style = ''; } ?> <div id="slideshow" class="<?php echo $style; ?> "> <div class="bgback"></div> <div data-images="<?php echo IMAGES_URL; ?> /" id="sparkles"></div> <div class="zn_slideshow"> <div class="container"> <div class="static-content event-style"> <div class="row"> <div class="span7"> <?php // TITLE if (isset($options['sc_ec_title']) && !empty($options['sc_ec_title'])) { echo '<h3>' . do_shortcode($options['sc_ec_title']) . '</h3>'; } ?> <div class="ud_counter"> <ul id="Counter"> <li>0<span>day</span></li> <li>00<span>hours</span></li> <li>00<span>min</span></li> <li>00<span>sec</span></li> </ul> <?php echo '<span class="till_lauch"><img src="' . MASTER_THEME_DIR . '/images/rocket.png"></span>'; ?> </div><!-- end counter --> <?php if (!empty($options['sc_ec_mlid'])) { echo '<div class="mail_when_ready">'; echo ' <form method="post" class="newsletter_subscribe newsletter-signup" data-url="' . trailingslashit(home_url()) . '" name="newsletter_form">'; echo ' <input type="text" name="zn_mc_email" class="nl-email" value="" placeholder="' . __("*****@*****.**", THEMENAME) . '" />'; echo ' <input type="hidden" name="zn_list_class" class="nl-lid" value="' . $options['sc_ec_mlid'] . '" />'; echo ' <input type="submit" name="submit" class="nl-submit" value="' . __("JOIN US", THEMENAME) . '" />'; echo ' </form>'; echo '<span class="zn_mailchimp_result"></span>'; echo '</div>'; } if (!empty($options['sc_ec_mlid']) && isset($options['single_ec_social']) && is_array($options['single_ec_social'])) { echo '<span class="or">' . __("-or stay connected: ", THEMENAME) . '</span>'; } if (isset($options['single_ec_social']) && is_array($options['single_ec_social'])) { $icon_class = ''; if ($options['sc_ec_social_color'] == 'colored') { $icon_class = 'colored'; } echo '<ul class="social-icons ' . $icon_class . ' fixclear">'; foreach ($options['single_ec_social'] as $key => $icon) { $link = ''; $target = ''; if (isset($icon['sc_ec_social_link']) && is_array($icon['sc_ec_social_link'])) { $link = $icon['sc_ec_social_link']['url']; $target = 'target="' . $icon['sc_ec_social_link']['target'] . '"'; } echo '<li class="' . $icon['sc_ec_social_icon'] . '"><a href="' . $link . '" ' . $target . '>' . $icon['sc_ec_social_title'] . '</a></li>'; } echo '</ul>'; } ?> <div class="clear"></div> </div> <?php echo '<div class="span5">'; // Text if (isset($options['sc_ec_vid_desc']) && !empty($options['sc_ec_vid_desc'])) { echo '<h5 style="text-align:right;">' . $options['sc_ec_vid_desc'] . '</h5>'; } // VIDEO if (isset($options['sc_ec_vime']) && !empty($options['sc_ec_vime'])) { echo get_video_from_link($options['sc_ec_vime'], 'black_border full_width', '520px', '270px'); } echo '</div>'; ?> </div> </div><!-- end static content / event style --> </div> </div> <div class="zn_header_bottom_style"></div><!-- header bottom style --> </div><!-- end slideshow --> <?php $zn_event_countdown = array('zn_event_countdown' => "\n\t\t\t\tvar counter = {\n\t\t\t\t\tinit: function (d)\n\t\t\t\t\t{\n\t\t\t\t\t\tjQuery('#Counter').countdown({\n\t\t\t\t\t\t\tuntil: new Date(d),\n\t\t\t\t\t\t\tlayout: counter.layout(),\n\t\t\t\t\t\t\tlabels: ['" . __('years', THEMENAME) . "', '" . __('months', THEMENAME) . "', '" . __('weeks', THEMENAME) . "', '" . __('days', THEMENAME) . "', '" . __('hours', THEMENAME) . "', '" . __('min', THEMENAME) . "', '" . __('sec', THEMENAME) . "'],\n\t\t\t\t\t\t\tlabels1: ['" . __('year', THEMENAME) . "', '" . __('month', THEMENAME) . "', '" . __('week', THEMENAME) . "', '" . __('day', THEMENAME) . "', '" . __('hour', THEMENAME) . "', '" . __('min', THEMENAME) . "', '" . __('sec', THEMENAME) . "']\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t\tlayout: function ()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn '<li>{dn}<span>{dl}</span></li>' + \n\t\t\t\t\t\t\t\t\t'<li>{hnn}<span>{hl}</span></li>' + \n\t\t\t\t\t\t\t\t\t'<li>{mnn}<span>{ml}</span></li>' + \n\t\t\t\t\t\t\t\t\t'<li>{snn}<span>{sl}</span></li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// initialize the counter\n\t\t\t\tcounter.init(\"" . $options['sc_ec_date']['date'] . " " . $options['sc_ec_date']['time'] . "\");\n\t\t\t"); zn_update_array($zn_event_countdown); $zn_mailchimp = array('zn_mailchimp' => "// PREPARE THE NEWSLETTER AND SEND DATA TO MAILCHIMP\n\t\t\t\t\t\tjQuery('.nl-submit').click(function() {\n\n\t\t\t\t\t\t\tajax_url = jQuery(this).parent().attr('data-url');\n\t\t\t\t\t\t\tresult_placeholder = jQuery(this).parent().next('span.zn_mailchimp_result');\n\n\n\t\t\t\t\t\t\tjQuery.ajax({\n\t\t\t\t\t\t\t\turl: ajax_url,\n\t\t\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\tzn_mc_email: jQuery(this).prevAll('.nl-email').val(),\n\t\t\t\t\t\t\t\t\tzn_mailchimp_list: jQuery(this).prev('.nl-lid').val(),\n\t\t\t\t\t\t\t\t\tzn_ajax: '' // Change here with something different\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tsuccess: function(data){\n\t\t\t\t\t\t\t\t\tresult_placeholder.html(data);\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\terror: function() {\n\t\t\t\t\t\t\t\t\tresult_placeholder.html('ERROR.').css('color', 'red');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\t\t\t\t\t"); zn_update_array($zn_mailchimp); }
function _flexslider($options) { if (isset($options['fs_header_style']) && !empty($options['fs_header_style'])) { $style = 'uh_' . $options['fs_header_style']; } else { $style = ''; } if ($options['fs_show_thumbs']) { $thumbs = 'zn_has_thumbs'; } else { $thumbs = ''; } ?> <div id="slideshow" class="notPadded <?php echo $style; ?> "> <div class="bgback"></div> <div data-images="<?php echo IMAGES_URL; ?> /" id="sparkles"></div> <div class="container zn_slideshow"> <div data-transition="<?php echo $options['fs_transition']; ?> " class="flexslider showOnMouseover zn_normal_flex <?php echo $thumbs; ?> drop-shadow <?php echo $options['fs_shadow']; ?> "> <ul class="slides"> <?php if (isset($options['single_flex']) && is_array($options['single_flex'])) { foreach ($options['single_flex'] as $slide) { $thumb = ''; $link_start = ''; $link_end = ''; if (isset($slide['fs_slide_link']['url']) && !empty($slide['fs_slide_link']['url'])) { // Set defaults $link_start = '<a class="slide" href="' . $slide['fs_slide_link']['url'] . '" target="' . $slide['fs_slide_link']['target'] . '">'; $link_end = '</a>'; } if (isset($slide['fs_slide_image']) && !empty($slide['fs_slide_image'])) { $image = vt_resize('', $slide['fs_slide_image'], '1170', '', true); $full_image = '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" />'; if ($options['fs_show_thumbs']) { $small_thumb = vt_resize('', $slide['fs_slide_image'], '150', '60', true); $thumb = 'data-thumb="' . $small_thumb['url'] . '"'; } } echo '<li ' . $thumb . '>'; echo $link_start; echo $full_image; echo $link_end; if (isset($slide['fs_slide_title']) && !empty($slide['fs_slide_title'])) { echo '<h2 class="flex-caption">' . $slide['fs_slide_title'] . '</h2>'; } echo '</li>'; } } ?> </ul> </div><!-- end #flexslider --> </div> <div class="zn_header_bottom_style"></div><!-- header bottom style --> </div><!-- end slideshow --> <?php // LOAD CSS AND JS wp_enqueue_style('flex_slider'); wp_enqueue_style('zn_shadows'); wp_enqueue_script('flex_slider'); $zn_normal_flex = array('zn_normal_flex' => "\n\t\t\t\t\t\t\t(function(\$) {\n\t\t\t\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfunction slideCompletezn_normal_flex(args) {\n\t\t\t\t\t\t\t\t\t\tvar caption = \$(args.container).find('.flex-caption').attr('style', ''),\n\t\t\t\t\t\t\t\t\t\t\tthisCaption = \$('.flexslider.zn_normal_flex .slides > li.flex-active-slide').find('.flex-caption');\n\t\t\t\t\t\t\t\t\t\tthisCaption.animate({left:20, opacity:1}, 500, 'easeOutQuint');\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\t\tif ( jQuery('.flexslider.zn_normal_flex').hasClass('zn_has_thumbs') ) {\n\t\t\t\t\t\t\t\t\t\tthumbs = 'thumbnails';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tthumbs = true;\n\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\ttransition = jQuery(\".flexslider.zn_normal_flex\").attr('data-transition');\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$(\".flexslider.zn_normal_flex\").flexslider({\n\t\t\t\t\t\t\t\t\t\tanimation: transition,\t\t\t\t//String: Select your animation type, \"fade\" or \"slide\"\n\t\t\t\t\t\t\t\t\t\tslideDirection: \"horizontal\",\t//String: Select the sliding direction, \"horizontal\" or \"vertical\"\n\t\t\t\t\t\t\t\t\t\tslideshow: true,\t\t\t\t//Boolean: Animate slider automatically\n\t\t\t\t\t\t\t\t\t\tslideshowSpeed: 7000,\t\t\t//Integer: Set the speed of the slideshow cycling, in milliseconds\n\t\t\t\t\t\t\t\t\t\tanimationDuration: 600,\t\t\t//Integer: Set the speed of animations, in milliseconds\n\t\t\t\t\t\t\t\t\t\tdirectionNav: true,\t\t\t\t//Boolean: Create navigation for previous/next navigation? (true/false)\n\t\t\t\t\t\t\t\t\t\tcontrolNav: thumbs,\t\t\t\t//Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage\n\t\t\t\t\t\t\t\t\t\tkeyboardNav: true,\t\t\t\t//Boolean: Allow slider navigating via keyboard left/right keys\n\t\t\t\t\t\t\t\t\t\tmousewheel: false,\t\t\t\t//{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel\n\t\t\t\t\t\t\t\t\t\tsmoothHeight: true,\n\t\t\t\t\t\t\t\t\t\trandomize: false,\t\t\t\t//Boolean: Randomize slide order\n\t\t\t\t\t\t\t\t\t\tslideToStart: 0,\t\t\t\t//Integer: The slide that the slider should start on. Array notation (0 = first slide)\n\t\t\t\t\t\t\t\t\t\tanimationLoop: true,\t\t\t//Boolean: Should the animation loop? If false, directionNav will received \"disable\" classes at either end\n\t\t\t\t\t\t\t\t\t\tpauseOnAction: true,\t\t\t//Boolean: Pause the slideshow when interacting with control elements, highly recommended.\n\t\t\t\t\t\t\t\t\t\tpauseOnHover: false,\t\t\t//Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering\n\t\t\t\t\t\t\t\t\t\tstart: slideCompletezn_normal_flex,\n\t\t\t\t\t\t\t\t\t\tafter: slideCompletezn_normal_flex\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})(jQuery);\n\t\t\t\t\t\t"); zn_update_array($zn_normal_flex); }
function _circ1($options) { global $data; $responsive_check = 'zn_responsive'; if ($data['zn_responsive'] == 'no') { $responsive_check = 'zn_not_responsive'; } if (isset($options['ww_header_style']) && !empty($options['ww_header_style'])) { $style = 'uh_' . $options['ww_header_style']; } else { $style = ''; } ?> <div id="slideshow" class="<?php echo $style; ?> "> <div class="bgback"></div> <div data-images="<?php echo IMAGES_URL; ?> /" id="sparkles"></div> <div class="container zn_slideshow <?php echo $responsive_check; ?> "> <div id="ca-container" class="ca-container"> <div class="ca-wrapper"> <?php if (isset($options['single_circ1']) && is_array($options['single_circ1'])) { $i = 1; $thumbs = ''; foreach ($options['single_circ1'] as $slide) { echo '<div class="ca-item ca-item-' . $i . '">'; echo '<div class="ca-item-main">'; echo '<div class="background"></div><!-- background color -->'; if (isset($slide['ww_slide_image']) && !empty($slide['ww_slide_image'])) { echo '<div class="ca-icon">'; $image = vt_resize('', $slide['ww_slide_image'], '336', '200', true); echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" />'; echo '</div>'; } // TITle if (isset($slide['ww_slide_title']) && !empty($slide['ww_slide_title'])) { echo '<h3>' . $slide['ww_slide_title'] . '</h3>'; } // DESC if (isset($slide['ww_slide_desc']) && !empty($slide['ww_slide_desc'])) { echo '<h4>' . $slide['ww_slide_desc'] . '</h4>'; } // DESC if (isset($slide['ww_slide_read_text']) && !empty($slide['ww_slide_read_text'])) { echo '<a href="#" class="ca-more">' . $slide['ww_slide_read_text'] . ' <span class="icon-chevron-right icon-white"></span></a>'; } // Bottom Title if (isset($slide['ww_slide_bottom_title']) && !empty($slide['ww_slide_bottom_title'])) { echo '<span class="ca-starting">' . $slide['ww_slide_bottom_title'] . '</span>'; } echo '</div>'; echo '<div class="ca-content-wrapper">'; echo '<div class="ca-content">'; // Content Title if (isset($slide['ww_slide_content_title']) && !empty($slide['ww_slide_content_title'])) { echo '<h6>' . $slide['ww_slide_content_title'] . '</h6>'; } echo '<a href="#" class="ca-close"><span class="icon-remove"></span></a>'; // Content description if (isset($slide['ww_slide_desc_full']) && !empty($slide['ww_slide_desc_full'])) { echo '<div class="ca-content-text">'; echo $slide['ww_slide_desc_full']; echo '</div>'; } // Link if (isset($slide['ww_slide_read_text_content']) && !empty($slide['ww_slide_read_text_content']) && isset($slide['ww_slide_link']['url']) && !empty($slide['ww_slide_link']['url'])) { echo '<a href="' . $slide['ww_slide_link']['url'] . '" target="' . $slide['ww_slide_link']['target'] . '">' . $slide['ww_slide_read_text_content'] . '</a>'; } echo '</div>'; echo '</div>'; echo '</div><!-- end ca-item -->'; $i++; } } ?> </div><!-- end ca-wrapper --> </div><!-- end circular content carousel --> </div> <div class="zn_header_bottom_style"></div><!-- header bottom style --> </div><!-- end slideshow --> <?php $contentcarousel = array('zn_contentcarousel' => "\t\n\t\t\tjQuery('#ca-container').contentcarousel();\n\t\t\t\n\t\t\tsetTimeout(function() {\n\t\t\t\tjQuery('#ca-container .ca-icon').css('backgroundImage', 'none');\n\t\t\t}, 1000);\n\t\t\t;"); zn_update_array($contentcarousel); }
function _iosSlider($options) { if (isset($options['io_header_style']) && !empty($options['io_header_style'])) { $style = 'uh_' . $options['io_header_style']; } else { $style = ''; } if (isset($options['io_s_fade']) && !empty($options['io_s_fade'])) { $faded = 'faded'; } else { $faded = ''; } if (isset($options['io_s_scroll']) && !empty($options['io_s_scroll'])) { $scroll = 'slider_fixedd'; } else { $scroll = ''; } if (!empty($options['io_s_width'])) { $padded = 'notPadded'; $fluid_start = '<div class="fluidHeight"><div class="sliderContainer ">'; $fluid_end = '</div></div>'; $wid_fixed = 'fixed'; } else { $padded = ''; $fluid_start = ''; $fluid_end = ''; $wid_fixed = ''; } if (!empty($options['io_s_s_height']) && empty($options['io_s_width'])) { $s_height = 'style="padding:0 0 ' . $options['io_s_s_height'] . '% 0;overflow:hidden;"'; } else { $s_height = ''; } ?> <div id="slideshow" class="<?php echo $style; ?> <?php echo $faded; ?> <?php echo $padded; ?> <?php echo $scroll; ?> " <?php echo $s_height; ?> > <div class="bgback"></div> <div data-images="<?php echo IMAGES_URL; ?> /" id="sparkles"></div> <?php echo $fluid_start; ?> <div class = "iosSlider <?php echo $faded; ?> <?php echo $wid_fixed; ?> zn_slideshow"> <div class="slider"> <?php if (isset($options['single_iosslider']) && is_array($options['single_iosslider'])) { $thumbs = ''; $i = 0; $bullets = ''; foreach ($options['single_iosslider'] as $slide) { if ($i == 0) { $slide_num = 'first selected'; } else { $slide_num = ''; } $c_style = 'style1'; $c_pos = ''; $bullets .= '<div class="item ' . $slide_num . '"></div>'; echo '<div class = "item">'; $img_link_start = ''; $img_link_end = ''; if (!empty($slide['io_slide_link']['url']) && !empty($slide['io_slide_link_image']) && $slide['io_slide_link_image'] == 'yes') { $img_link_start = '<a class="zn_slide_image_link" href="' . $slide['io_slide_link']['url'] . '" target="' . $slide['io_slide_link']['target'] . '">'; $img_link_end = '</a>'; } // Slide Image if ($slide_image = $slide['io_slide_image']) { if (is_array($slide_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 = ''; } if ($options['io_s_width']) { $image = vt_resize('', $saved_image, '1170', '', true); echo $img_link_start . '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" ' . $saved_title . ' ' . $saved_alt . ' />' . $img_link_end; } else { echo $img_link_start . '<img src="' . $saved_image . '" ' . $saved_title . ' ' . $saved_alt . '/>' . $img_link_end; } if (isset($options['io_s_navigation']) && $options['io_s_navigation'] == 'thumbs') { $image = vt_resize('', $saved_image, '150', '60', true); $thumbs .= '<div class="item ' . $slide_num . '"><img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" ' . $saved_title . ' ' . $saved_alt . ' /></div>'; } } // Slide Caption Style if (isset($slide['io_slide_caption_style']) && !empty($slide['io_slide_caption_style'])) { $c_style = $slide['io_slide_caption_style']; } // Slide Caption Position if (isset($slide['io_slide_caption_pos']) && !empty($slide['io_slide_caption_pos'])) { $c_pos = $slide['io_slide_caption_pos']; } echo '<div class="caption ' . $c_style . ' ' . $c_pos . '">'; // Slide Main TITLE if (isset($slide['io_slide_m_title']) && !empty($slide['io_slide_m_title'])) { echo '<h2 class="main_title">' . $slide['io_slide_m_title'] . '</h2>'; } // Slide BIG TITLE if (isset($slide['io_slide_b_title']) && !empty($slide['io_slide_b_title'])) { echo '<h3 class="title_big">' . $slide['io_slide_b_title'] . '</h3>'; } if (!empty($slide['io_slide_link']['url']) && $slide['io_slide_caption_style'] != 'style3') { echo '<a class="more" href="' . $slide['io_slide_link']['url'] . '" target="' . $slide['io_slide_link']['target'] . '"><img width="10" height="16" src="' . MASTER_THEME_DIR . '/sliders/iosslider/arr01.png" alt=""></a>'; } // Slide SMALL TITLE if (isset($slide['io_slide_s_title']) && !empty($slide['io_slide_s_title'])) { echo '<h4 class="title_small">' . $slide['io_slide_s_title'] . '</h4>'; } echo $img_link_start . $img_link_end; echo '</div>'; echo '</div><!-- end item -->'; $i++; } } echo '</div>'; $infinite_slide = 'false'; if (count($options['single_iosslider']) > 1) { // This will fix the Ios Slider when using only one slide $infinite_slide = 'true'; echo '<div class="prev"><div class="btn-label">' . __('PREV', THEMENAME) . '</div></div>'; echo '<div class="next"><div class="btn-label">' . __('NEXT', THEMENAME) . '</div></div>'; if (!$options['io_s_width'] && $options['io_s_navigation'] == 'thumbs') { ?> <div class="selectorsBlock thumbs"> <a href="#" class="thumbTrayButton"><span class="icon-minus icon-white"></span></a> <div class="selectors"> <?php echo $thumbs; ?> </div> </div> <?php } echo '</div><!-- end iosSlider -->'; if ($options['io_s_width'] || $options['io_s_navigation'] != 'thumbs') { ?> <div class="selectorsBlock bullets"> <div class="selectors"> <?php echo $bullets; ?> </div> </div> <?php } } else { echo '</div><!-- end iosSlider -->'; } ?> <div class="scrollbarContainer"></div> <div class="zn_header_bottom_style"></div><!-- header bottom style --> <?php echo $fluid_end; ?> </div><!-- end slideshow --> <div class="zn_fixed_slider_fill"></div> <?php // Load CSS and JS wp_enqueue_style('ios_slider'); wp_enqueue_script('ios_slider_min'); wp_enqueue_script('ios_slider_kalypso'); $trans = '5000'; if (!empty($options['io_s_trans'])) { $trans = $options['io_s_trans']; } $ios_slider = array('zn_ios_slider' => "\t\n\t\t\t\tjQuery('.iosSlider').each(function(){\n\n\t\t\t\t\tjQuery(this).iosSlider({\n\t\t\t\t\t\tsnapToChildren: true,\n\t\t\t\t\t\tdesktopClickDrag: true,\n\t\t\t\t\t\tkeyboardControls: true,\n\t\t\t\t\t\tautoSlideTimer: " . $trans . ",\n\t\t\t\t\t\tnavNextSelector: jQuery(this).closest('.iosSlider').find('.next'),\n\t\t\t\t\t\tnavPrevSelector: jQuery(this).closest('.iosSlider').find('.prev'),\n\t\t\t\t\t\tnavSlideSelector: jQuery('.selectors .item'),\n\t\t\t\t\t\tscrollbar: true,\n\t\t\t\t\t\tscrollbarContainer: '#slideshow .scrollbarContainer',\n\t\t\t\t\t\tscrollbarMargin: '0',\n\t\t\t\t\t\tscrollbarBorderRadius: '4px',\n\t\t\t\t\t\tonSlideComplete: slideComplete,\n\t\t\t\t\t\tonSliderLoaded: function(args){\n\t\t\t\t\t\t\tvar otherSettings = {\n\t\t\t\t\t\t\t\thideControls : true, // Bool, if true, the NAVIGATION ARROWS will be hidden and shown only on mouseover the slider\n\t\t\t\t\t\t\t\thideCaptions : false // Bool, if true, the CAPTIONS will be hidden and shown only on mouseover the slider\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsliderLoaded(args, otherSettings);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonSlideChange: slideChange,\n\t\t\t\t\t\tkeyboardControls: true,\n\t\t\t\t\t\tinfiniteSlider: " . $infinite_slide . ",\n\t\t\t\t\t\tautoSlide: true\n\t\t\t\t\t});\n\n\t\t\t\t})\n\n\t\t\t;"); zn_update_array($ios_slider); }
function _woo_products($options) { global $woocommerce; if (empty($woocommerce)) { return; } $element_size = zn_get_size($options['_sizer']); ?> <div class="<?php echo $element_size['sizer']; ?> "> <div class="shop-latest"> <div class="tabbable"> <ul class="nav fixclear"> <?php $css = ''; if ($options['woo_lp_prod']) { if (!empty($options['woo_lp_title'])) { echo '<li class="active"><a href="#tabpan1" data-toggle="tab">' . $options['woo_lp_title'] . '</a></li>'; } else { echo '<li class="active"><a href="#tabpan1" data-toggle="tab">' . __("LATEST PRODUCTS", THEMENAME) . '</a></li>'; } } else { $css = 'active'; } // Best selling products title if ($options['woo_bs_prod']) { if (!empty($options['woo_bsp_title'])) { echo '<li class="' . $css . '"><a href="#tabpan2" data-toggle="tab">' . $options['woo_bsp_title'] . '</a></li>'; } else { echo '<li class="' . $css . '"><a href="#tabpan2" data-toggle="tab">' . __("BEST SELLING PRODUCTS", THEMENAME) . '</a></li>'; } } ?> </ul> <?php if ($options['woo_lp_prod']) { ?> <div class="tab-content"> <div class="tab-pane active" id="tabpan1"> <div class="shop-latest-carousel"> <ul id="latest_products"> <?php $query_args = array('posts_per_page' => $options['prods_per_page'], 'tax_query' => array(array('taxonomy' => 'product_cat', 'field' => 'id', 'terms' => $options['woo_categories'])), 'no_found_rows' => 1, 'post_status' => 'publish', 'post_type' => 'product'); $r = new WP_Query($query_args); if ($r->have_posts()) { while ($r->have_posts()) { $r->the_post(); global $product, $data; /* CHECK STOCK */ if (!$product->is_in_stock()) { $zlink = '<a href="' . apply_filters('out_of_stock_add_to_cart_url', get_permalink($product->id)) . '" class="">' . apply_filters('out_of_stock_add_to_cart_text', __('Read More', THEMENAME)) . '</a>'; } else { ?> <?php switch ($product->product_type) { case "variable": $link = apply_filters('variable_add_to_cart_url', get_permalink($product->id)); $label = apply_filters('variable_add_to_cart_text', __('Select options', THEMENAME)); break; case "grouped": $link = apply_filters('grouped_add_to_cart_url', get_permalink($product->id)); $label = apply_filters('grouped_add_to_cart_text', __('View options', THEMENAME)); break; case "external": $link = apply_filters('external_add_to_cart_url', get_permalink($product->id)); $label = apply_filters('external_add_to_cart_text', __('Read More', THEMENAME)); break; default: $link = apply_filters('add_to_cart_url', esc_url($product->add_to_cart_url())); $label = apply_filters('add_to_cart_text', __('ADD TO CART', THEMENAME)); break; } $zlink = '<a href="' . $link . '" rel="nofollow" data-product_id="' . $product->id . '" class="add_to_cart_button product_type_' . $product->product_type . '">' . $label . '</a>'; } $new_badge = ''; /* CHECK BADGE */ if ($data['woo_new_badge'] == 1) { $now = time(); $diff = get_the_time('U') > $now ? get_the_time('U') - $now : $now - get_the_time('U'); $val = floor($diff / 86400); $days = floor(get_the_time('U') / 86400); if ($data['woo_new_badge_days'] >= $val) { $new_badge = '<span class="znew">' . __('NEW!', THEMENAME) . '</span>'; } } /* CHECK ON SALE */ $on_sale = ''; if ($product->is_on_sale() && $product->is_in_stock()) { $on_sale = '<span class="zonsale">' . __('SALE!', THEMENAME) . '</span>'; } ?> <li> <div class="product-list-item "> <span class="hover"></span> <div class="zn_badge_container"> <?php echo $on_sale; ?> <?php echo $new_badge; ?> </div> <?php /** * woocommerce_before_shop_loop_item_title hook * @hooked woocommerce_template_loop_product_thumbnail - 10 */ do_action('woocommerce_before_shop_loop_item_title'); ?> <div class="details fixclear"> <h3><a href="<?php echo get_permalink(); ?> "><?php the_title(); ?> </a></h3> <?php if (!isset($data['woo_hide_small_desc']) || isset($data['woo_hide_small_desc']) && $data['woo_hide_small_desc'] == 'no') { echo apply_filters('woocommerce_short_description', get_the_excerpt()); } ?> <div class="actions"> <?php if (empty($data['woo_catalog_mode']) || !empty($data['woo_catalog_mode']) && $data['woo_catalog_mode'] == 'no') { echo $zlink; } ?> <a href="<?php echo get_permalink(); ?> "><?php _e("MORE INFO", THEMENAME); ?> </a> </div> <?php if ($price_html = $product->get_price_html()) { ?> <div class="price"><?php echo $price_html; ?> </div> <?php } ?> </div> </div><!-- end product-item --> </li> <?php } } // Reset the global $the_post as this query will have stomped on it wp_reset_query(); ?> </ul><!-- shop product list --> <div class="controls"> <a href="#" class="prev"><span class="icon-chevron-left"></span></a> <a href="#" class="next"><span class="icon-chevron-right"></span></a> </div> <div class="clear"></div> </div><!--end shop-latest-carousel --> </div><!-- end tab pane --> <?php } ?> <?php if ($options['woo_bs_prod']) { ?> <div class="tab-pane <?php echo $css; ?> " id="tabpan2"> <div class="shop-latest-carousel"> <ul id="bestselling_products"> <?php $query_args = array('posts_per_page' => $options['prods_per_page'], 'tax_query' => array(array('taxonomy' => 'product_cat', 'field' => 'id', 'terms' => $options['woo_categories'])), 'no_found_rows' => 1, 'post_status' => 'publish', 'post_type' => 'product', 'meta_key' => 'total_sales', 'orderby' => 'meta_value'); $r = new WP_Query($query_args); if ($r->have_posts()) { while ($r->have_posts()) { $r->the_post(); global $product, $data; /* CHECK STOCK */ if (!$product->is_in_stock()) { $zlink = '<a href="' . apply_filters('out_of_stock_add_to_cart_url', get_permalink($product->id)) . '" class="">' . apply_filters('out_of_stock_add_to_cart_text', __('Read More', THEMENAME)) . '</a>'; } else { ?> <?php switch ($product->product_type) { case "variable": $link = apply_filters('variable_add_to_cart_url', get_permalink($product->id)); $label = apply_filters('variable_add_to_cart_text', __('Select options', THEMENAME)); break; case "grouped": $link = apply_filters('grouped_add_to_cart_url', get_permalink($product->id)); $label = apply_filters('grouped_add_to_cart_text', __('View options', THEMENAME)); break; case "external": $link = apply_filters('external_add_to_cart_url', get_permalink($product->id)); $label = apply_filters('external_add_to_cart_text', __('Read More', THEMENAME)); break; default: $link = apply_filters('add_to_cart_url', esc_url($product->add_to_cart_url())); $label = apply_filters('add_to_cart_text', __('ADD TO CART', THEMENAME)); break; } $zlink = '<a href="' . $link . '" rel="nofollow" data-product_id="' . $product->id . '" class="add_to_cart_button product_type_' . $product->product_type . '">' . $label . '</a>'; } /* CHECK BADGE */ if ($data['woo_new_badge']) { $now = time(); $diff = get_the_time('U') > $now ? get_the_time('U') - $now : $now - get_the_time('U'); $val = floor($diff / 86400); $days = floor(get_the_time('U') / 86400); if ($data['woo_new_badge_days'] >= $val) { $new_badge = '<span class="znew">' . __('NEW!', THEMENAME) . '</span>'; } } /* CHECK ON SALE */ $on_sale = ''; if ($product->is_on_sale()) { $on_sale = '<span class="zonsale">' . __('SALE!', THEMENAME) . '</span>'; } ?> <li> <div class="product-list-item "> <span class="hover"></span> <div class="zn_badge_container"> <?php echo $on_sale; ?> <?php echo $new_badge; ?> </div> <?php /** * woocommerce_before_shop_loop_item_title hook * @hooked woocommerce_template_loop_product_thumbnail - 10 */ do_action('woocommerce_before_shop_loop_item_title'); ?> <div class="details fixclear"> <h3><a href="<?php echo get_permalink(); ?> "><?php the_title(); ?> </a></h3> <?php echo apply_filters('woocommerce_short_description', get_the_excerpt()); ?> <div class="actions"> <?php if (empty($data['woo_catalog_mode']) || !empty($data['woo_catalog_mode']) && $data['woo_catalog_mode'] == 'no') { echo $zlink; } ?> <a href="<?php echo get_permalink(); ?> "><?php _e("MORE INFO", THEMENAME); ?> </a> </div> <?php if ($price_html = $product->get_price_html()) { ?> <div class="price"><?php echo $price_html; ?> </div> <?php } ?> </div> </div><!-- end product-item --> </li> <?php } } // Reset the global $the_post as this query will have stomped on it wp_reset_query(); ?> </ul><!-- shop product list --> <div class="controls"> <a href="#" class="prev"><span class="icon-chevron-left"></span></a> <a href="#" class="next"><span class="icon-chevron-right"></span></a> </div> <div class="clear"></div> </div><!--end shop-latest-carousel --> </div><!-- end tab pane --> <?php } ?> </div><!-- /.tab-content --> </div><!-- /.tabbable --> </div><!-- end shop latest --> </div> <?php $woo_products = array('woo_products' => "\t\n\t\t\t(function(\$){\n\t\t\t\t\$(window).load(function() {\n\t\t\t\t\t// latest & bestsellers carousels\n\t\t\t\t\tjQuery('.shop-latest-carousel > ul').each(function(index, element) {\n\t\t\t\t\t\tjQuery(this).carouFredSel({\n\t\t\t\t\t\t\tresponsive: true,\n\t\t\t\t\t\t\tscroll: 1,\n\t\t\t\t\t\t\tauto: false,\n\t\t\t\t\t\t\titems: {width:300, visible: { min: 1, max: 4 } },\n\t\t\t\t\t\t\tprev\t: {\tbutton : jQuery(this).parent().find('a.prev'), key : \"left\" },\n\t\t\t\t\t\t\tnext\t: { button : jQuery(this).parent().find('a.next'), key : \"right\" },\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t})(jQuery);\n\t\t\t"); zn_update_array($woo_products); }
function zn_add_script() { global $data; if (!is_admin()) { // ENQUEUE DEFAULT SCRIPTS // Adds JavaScript to pages with the comment form to support sites with // threaded comments (when in use). if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } wp_enqueue_script('jquery'); wp_enqueue_script('bootstrap', MASTER_THEME_DIR . '/js/bootstrap.min.js', array('jquery'), '1.3', true); wp_enqueue_script('modernizr', '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js', array(), '2.6.2'); wp_enqueue_script('jquery-zplugins', MASTER_THEME_DIR . '/js/plugins.js', array('jquery'), '1.3', true); wp_enqueue_script('jquerysuperfish', MASTER_THEME_DIR . '/addons/superfish_responsive/superfish_menu.js', array('jquery'), '1.4.8', true); // Menu Follow if ($data['menu_follow'] == 'yes') { $zn_chaser = array('zn_chaser' => "\n\t\t\t\t\t\t(function(\$){ \n\t\t\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t\t\tvar doc = \$(document), \n\t\t\t\t\t\t\t\t\twin = \$(window), chaser, forch,\n\t\t\t\t\t\t\t\t\tforchBottom, visible;\n\t\t\t\t\t\t\t\tfunction shown() { visible = true; }\n\t\t\t\t\t\t\t\tfunction hidden() { visible = false; }\n\t\t\t\t\t\t\t\tchaser = \$('#main_menu ul.sf-menu').clone().hide()\n\t\t\t\t\t\t\t\t\t.appendTo(document.body)\n\t\t\t\t\t\t\t\t\t.wrap(\"<div class='chaser'><div class='container'><div class='row'><div class='span12'></div></div></div></div>\");\n\t\t\t\t\t\t\t\tif ( \$('#content').length > 0 ) {\t\n\t\t\t\t\t\t\t\t\tforch = \$('#content').first();\n\t\t\t\t\t\t\t\t\tforchBottom = forch.offset().top + 2;\n\t\t\t\t\t\t\t\t\thidden();\n\t\t\t\t\t\t\t\t\twin.on('scroll', function () {\n\n\t\t\t\t\t\t\t\t\t\tvar top = doc.scrollTop();\n\t\t\t\t\t\t\t\t\t\tif (!visible && top > forchBottom) {\n\t\t\t\t\t\t\t\t\t\t\t//chaser.slideDown(300, shown);\n\t\t\t\t\t\t\t\t\t\t\tchaser.fadeIn(300, shown);\n\t\t\t\t\t\t\t\t\t\t} else if (visible && top < forchBottom) {\n\t\t\t\t\t\t\t\t\t\t\t//chaser.slideUp(200, hidden);\n\t\t\t\t\t\t\t\t\t\t\tchaser.fadeOut(200, hidden);\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}\n\t\t\t\t\t\t\t\t/* Activate Superfish Menu for Chaser */\n\t\t\t\t\t\t\t\t\$('.chaser ul.sf-menu').supersubs({ minWidth: 12, maxWidth: 27, extraWidth: 1}).superfish({delay:250, dropShadows:false, autoArrows:true, speed:300});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})(jQuery);\n\t\t\t\t\t\t"); zn_update_array($zn_chaser); } if ($data['page_preloader'] == 'yes') { $zn_preloader = array('zn_preloader' => "\n\t\t\t\t\t\t(function(\$){ \n\t\t\t\t\t\t\tvar pageLoading = \$('#page-loading');\n\t\t\t\t\t\t\tif(pageLoading.length > 0){\n\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\tpageLoading.fadeOut();\n\t\t\t\t\t\t\t\t}, 1000);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})(jQuery);\n\t\t\t\t\t\t"); zn_update_array($zn_preloader); } // RESPONSIVE MENU if ($data['res_menu_style'] == 'select' && $data['zn_responsive'] == 'yes') { $zn_smooth_menu = array('zn_smooth_menu' => "\n\t\t\t\t\t\t(function(\$){ \n\t\t\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t\t\t/* Activate Superfish Menu */\n\t\t\t\t\t\t\t\tvar sfDelay = 600;\n\t\t\t\t\t\t\t\tif(\$('html').hasClass('isie'))\n\t\t\t\t\t\t\t\t\tsfDelay = 300;\n\t\t\t\t\t\t\t\t\$('#main_menu > ul')\n\t\t\t\t\t\t\t\t.supersubs({ \n\t\t\t\t\t\t\t\t\tminWidth: 12, // minimum width of sub-menus in em units \n\t\t\t\t\t\t\t\t\tmaxWidth: 27, // maximum width of sub-menus in em units \n\t\t\t\t\t\t\t\t\textraWidth: 1 // extra width can ensure lines don't sometimes turn over \n\t\t\t\t\t\t\t\t}).superfish({\n\t\t\t\t\t\t\t\t\tdelay:sfDelay,\n\t\t\t\t\t\t\t\t\tdropShadows:false,\n\t\t\t\t\t\t\t\t\tautoArrows:true,\n\t\t\t\t\t\t\t\t\tspeed:300\n\t\t\t\t\t\t\t\t}).mobileMenu({\n\t\t\t\t\t\t\t\t\tswitchWidth: 960,\n\t\t\t\t\t\t\t\t\ttopOptionText: '" . __("SELECT A PAGE", THEMENAME) . "',\n\t\t\t\t\t\t\t\t\tindentString: ' '\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})(jQuery);\n\t\t\t\t\t\t"); zn_update_array($zn_smooth_menu); } elseif ($data['res_menu_style'] == 'smooth' && $data['zn_responsive'] == 'yes') { $zn_smooth_menu = array('zn_smooth_menu' => "\n\t\t\t\t\t\t(function(\$){ \n\t\t\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t\t\t/* Activate Superfish Menu */\n\t\t\t\t\t\t\t\tvar sfDelay = 600;\n\t\t\t\t\t\t\t\tif(\$('html').hasClass('isie'))\n\t\t\t\t\t\t\t\t\tsfDelay = 300;\n\t\t\t\t\t\t\t\t\$('#main_menu > ul')\n\t\t\t\t\t\t\t\t.supersubs({ \n\t\t\t\t\t\t\t\t\tminWidth: 12, // minimum width of sub-menus in em units \n\t\t\t\t\t\t\t\t\tmaxWidth: 27, // maximum width of sub-menus in em units \n\t\t\t\t\t\t\t\t\textraWidth: 1 // extra width can ensure lines don't sometimes turn over \n\t\t\t\t\t\t\t\t}).superfish({\n\t\t\t\t\t\t\t\t\tdelay:sfDelay,\n\t\t\t\t\t\t\t\t\tdropShadows:false,\n\t\t\t\t\t\t\t\t\tautoArrows:true,\n\t\t\t\t\t\t\t\t\tspeed:300\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\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$(window).resize(function() {\n\t\t\t\t\t\t\t\t\$('#main_menu > ul')\n\t\t\t\t\t\t\t\t.supersubs({ \n\t\t\t\t\t\t\t\t\tminWidth: 12, // minimum width of sub-menus in em units \n\t\t\t\t\t\t\t\t\tmaxWidth: 27, // maximum width of sub-menus in em units \n\t\t\t\t\t\t\t\t\textraWidth: 1 // extra width can ensure lines don't sometimes turn over \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\n\t\t\t\t\t\t})(jQuery);\n\t\t\t\t\t\t"); zn_update_array($zn_smooth_menu); } else { $zn_smooth_menu = array('zn_smooth_menu' => "\n\t\t\t\t\t\t(function(\$){ \n\t\t\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t\t\t/* Activate Superfish Menu */\n\t\t\t\t\t\t\t\tvar sfDelay = 600;\n\t\t\t\t\t\t\t\tif(\$('html').hasClass('isie'))\n\t\t\t\t\t\t\t\t\tsfDelay = 300;\n\t\t\t\t\t\t\t\t\$('#main_menu > ul')\n\t\t\t\t\t\t\t\t.supersubs({ \n\t\t\t\t\t\t\t\t\tminWidth: 12, // minimum width of sub-menus in em units \n\t\t\t\t\t\t\t\t\tmaxWidth: 27, // maximum width of sub-menus in em units \n\t\t\t\t\t\t\t\t\textraWidth: 1 // extra width can ensure lines don't sometimes turn over \n\t\t\t\t\t\t\t\t}).superfish({\n\t\t\t\t\t\t\t\t\tdelay:sfDelay,\n\t\t\t\t\t\t\t\t\tdropShadows:false,\n\t\t\t\t\t\t\t\t\tautoArrows:true,\n\t\t\t\t\t\t\t\t\tspeed:300\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})(jQuery);\n\t\t\t\t\t\t"); zn_update_array($zn_smooth_menu); } // REGISTER IOS SLIDER wp_register_script('ios_slider_min', MASTER_THEME_DIR . '/sliders/iosslider/jquery.iosslider.min.js', array('jquery'), '1.3', true); wp_register_script('ios_slider_kalypso', MASTER_THEME_DIR . '/sliders/iosslider/jquery.iosslider.kalypso.js', array('jquery'), '1.3', true); // REGISTER CSS3 Panels wp_register_style('css3_panels', MASTER_THEME_DIR . '/sliders/css3panels/css3panels.css', 'style'); wp_register_script('css3_panels', MASTER_THEME_DIR . '/sliders/css3panels/css3panels.js', array('jquery'), '1.3', true); // REGISTER iCarousel wp_register_style('icarousel_demo', MASTER_THEME_DIR . '/sliders/icarousel/css/demo3.css', 'style'); wp_register_style('icarousel', MASTER_THEME_DIR . '/sliders/icarousel/css/icarousel.css', 'style'); wp_register_script('icarousel', MASTER_THEME_DIR . '/sliders/icarousel/js/icarousel.packed.js', array('jquery'), '1.3', true); wp_register_script('mousewheel', MASTER_THEME_DIR . '/sliders/icarousel/js/jquery.mousewheel.js', array('jquery'), '1.3', true); wp_register_script('raphael_min', MASTER_THEME_DIR . '/sliders/icarousel/js/raphael-min.js', array('jquery'), '1.3', true); // REGISTER Laptop SLIDEr wp_register_style('lslider', MASTER_THEME_DIR . '/sliders/flex_slider/css/flexslider-laptop.css', 'style'); wp_register_script('flex_slider', MASTER_THEME_DIR . '/sliders/flex_slider/js/jquery.flexslider-min.js', array('jquery'), '1.3', true); // REGISTER FLEX SLIDER wp_register_style('flex_slider', MASTER_THEME_DIR . '/sliders/flex_slider/css/flexslider.css', 'style'); wp_register_style('zn_shadows', MASTER_THEME_DIR . '/css/shadows.css', 'style'); // REGISTER FANCY SLIDER wp_register_style('flex_slider_fancy', MASTER_THEME_DIR . '/sliders/flex_slider/css/flexslider-fancy.css', 'style'); wp_register_script('flex_slider_colors', MASTER_THEME_DIR . '/sliders/flex_slider/js/jquery.animate-colors-min.js', array('jquery'), '1.3', true); // Prety photo wp_enqueue_script('pretty_photo', MASTER_THEME_DIR . '/addons/prettyphoto/jquery.prettyPhoto.js', array('jquery'), '1.3', true); if (is_active_widget(false, false, 'tp_widget_recent_tweets', true)) { wp_enqueue_script('flex_slider'); $twitter_fader = array('zn_twitter_fader' => "\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tjQuery('.twitter-feed').flexslider({\n\t\t\t\t\t\t\t\t\tselector: '.tweets > div',\n\t\t\t\t\t\t\t\t\tcontrolNav:false,\n\t\t\t\t\t\t\t\t\tdirectionNav:false\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t"); zn_update_array($twitter_fader); } if (is_tax('project_category') && $data['portfolio_style'] == 'portfolio_sortable') { wp_enqueue_script('isotope', MASTER_THEME_DIR . '/js/jquery.isotope.min.js', array('jquery'), '1.4.8', true); $zn_isotope = array('zn_isotope' => "\n\t\t\t\t\t\t(function(\$){ \n\t\t\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// settings\n\t\t\t\t\t\t\t\tvar sortBy = 'date', \t\t\t// SORTING: date / name\n\t\t\t\t\t\t\t\t\tsortAscending = true, \t\t// SORTING ORDER: true = Ascending / false = Descending\n\t\t\t\t\t\t\t\t\ttheFilter = '';\t// DEFAULT FILTERING CATEGORY \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\$('#sortBy li a').each(function(index, element) {\n\t\t\t\t\t\t\t\t\tvar t = \$(this);\n\t\t\t\t\t\t\t\t\tif(t.attr('data-option-value') == sortBy)\n\t\t\t\t\t\t\t\t\t\tt.addClass('selected');\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\$('#sort-direction li a').each(function(index, element) {\n\t\t\t\t\t\t\t\t\tvar t = \$(this);\n\t\t\t\t\t\t\t\t\tif(t.attr('data-option-value') == sortAscending.toString())\n\t\t\t\t\t\t\t\t\t\tt.addClass('selected');\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\$('#portfolio-nav li a').each(function(index, element) {\n\t\t\t\t\t\t\t\t\tvar t = \$(this),\n\t\t\t\t\t\t\t\t\t\ttpar = t.parent();\n\t\t\t\t\t\t\t\t\tif(t.attr('data-filter') == theFilter) {\n\t\t\t\t\t\t\t\t\t\t\$('#portfolio-nav li a').parent().removeClass('current');\n\t\t\t\t\t\t\t\t\t\ttpar.addClass('current');\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\t\t\t\n\t\t\t\t\t\t\t\t// don't edit below unless you know what you're doing\n\t\t\t\t\t\t\t\tif (\$(\"ul#thumbs\").length > 0){\n\t\t\t\t\t\t\t\t\tvar container = \$(\"ul#thumbs\");\n\t\t\t\t\t\t\t\t\tcontainer.isotope({\n\t\t\t\t\t\t\t\t\t itemSelector : \".item\",\n\t\t\t\t\t\t\t\t\t animationEngine : \"jquery\",\n\t\t\t\t\t\t\t\t\t animationOptions: {\n\t\t\t\t\t\t\t\t\t\t duration: 250,\n\t\t\t\t\t\t\t\t\t\t easing: \"easeOutExpo\",\n\t\t\t\t\t\t\t\t\t\t queue: false\n\t\t\t\t\t\t\t\t\t },\n\t\t\t\t\t\t\t\t\t filter: theFilter,\n\t\t\t\t\t\t\t\t\t sortAscending : sortAscending,\n\t\t\t\t\t\t\t\t\t getSortData : {\n\t\t\t\t\t\t\t\t\t\t name : function ( elem ) {\n\t\t\t\t\t\t\t\t\t\t\t return elem.find(\"span.name\").text();\n\t\t\t\t\t\t\t\t\t\t },\n\t\t\t\t\t\t\t\t\t\t date : function ( elem ) {\n\t\t\t\t\t\t\t\t\t\t\t return elem.attr(\"data-date\");\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\t sortBy: sortBy\n\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}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})(jQuery);\n\t\t\t\t\t\t"); zn_update_array($zn_isotope); } if (is_tax('project_category') && $data['portfolio_style'] == 'portfolio_carousel') { wp_enqueue_script('isotope', MASTER_THEME_DIR . '/js/jquery.isotope.min.js', array('jquery'), '1.4.8', true); wp_enqueue_script('pslider', MASTER_THEME_DIR . '/sliders/caroufredsel/jquery.carouFredSel-6.0.4-packed.js', array('jquery'), '6.0.4', true); $zn_pcarousel = array('zn_pcarousel' => "\n\t\t\t\t\t\t\t(function(\$) {\n\t\t\t\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t\t\t\t// ** Portfolio Carousel\n\t\t\t\t\t\t\t\t\tvar carousels =\tjQuery('.ptcarousel1');\n\t\t\t\t\t\t\t\t\tcarousels.each(function(index, element) {\n\t\t\t\t\t\t\t\t\t\t\$(this).carouFredSel({\n\t\t\t\t\t\t\t\t\t\t\tresponsive: true,\n\t\t\t\t\t\t\t\t\t\t\titems: { width: 570 },\n\t\t\t\t\t\t\t\t\t\t\tprev\t: {\tbutton : \$(this).parent().find('a.prev'), key : \"left\" },\n\t\t\t\t\t\t\t\t\t\t\tnext\t: { button : \$(this).parent().find('a.next'), key : \"right\" },\n\t\t\t\t\t\t\t\t\t\t\tauto: {timeoutDuration: 5000},\n\t\t\t\t\t\t\t\t\t\t\tscroll: { fx: \"crossfade\", duration: \"1500\" }\n\t\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\t// *** end Portfolio Carousel\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t})(jQuery);\n\t\t\t\t\t\t"); zn_update_array($zn_pcarousel); } // WOOCOMMERCE CART include_once ABSPATH . 'wp-admin/includes/plugin.php'; if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { global $data; if ($data['woo_show_cart']) { global $woocommerce; $zn_woo_cart = array('zn_woo_cart' => "\n\t\t\t\t\t\t\t(function(\$) {\n\t\t\t\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t\t\t\t\$('body').bind('added_to_cart',function (evt,ret) { \n\n\t\t\t\t\t\t\t\t\t\tvar mycart = \$('#mycartbtn'), // trebuie adaugat id-ul\n\t\t\t\t\t\t\t\t\t\t\tmycartTop = mycart.offset().top;\n\t\t\t\t\t\t\t\t\t\t\tmycartLeft = mycart.offset().left,\n\t\t\t\t\t\t\t\t\t\t\tbutonCart = \$('.to_cart button.addtocart '),\n\t\t\t\t\t\t\t\t\t\t\tbuttonCartHome = \$('.add_to_cart_button '),\n\t\t\t\t\t\t\t\t\t\t\tplaceholderdiv = \$(\"<div class='popupaddcart'>" . __("Item Added to cart!", THEMENAME) . "</div>\"),\n\t\t\t\t\t\t\t\t\t\t\t\$('body').append(placeholderdiv);\n\t\t\t\t\t\t\t\t\t\t\t\$(placeholderdiv).hide();\n\n\t\t\t\t\t\t\t\t\t\t\t\$(placeholderdiv).fadeIn('slow', 'easeInOutExpo',function(){\n\n\t\t\t\t\t\t\t\t\t\t\t\tvar zn_pos_top = \$(this).offset().top,\n\t\t\t\t\t\t\t\t\t\t\t\t\tzn_pos_left = \$(this).offset().left;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\$(this).css({margin:0,left:zn_pos_left,top:zn_pos_top,position:\"absolute\"}).delay(800).animate({\"top\": mycartTop, left:mycartLeft, opacity:1}, 2000, 'easeInOutExpo',function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\$(this).remove();\n\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\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});\n\t\t\t\t\t\t\t})(jQuery);\n\t\t\t\t\t\t"); zn_update_array($zn_woo_cart); } } global $pagenow; // Event Countdown if ($data['cs_enable'] == 'yes' && !is_user_logged_in() && !is_admin() && $pagenow != 'wp-login.php') { wp_enqueue_script('zn_event_countdown', MASTER_THEME_DIR . '/js/jquery.countdown.js', array('jquery'), '1.3', true); $zn_event_countdown_coming_soon = array('zn_event_countdown_coming_soon' => "\n\t\t\t\t\t\t(function(\$) {\n\t\t\t\t\t\t\tvar counter = {\n\t\t\t\t\t\t\t\tinit: function (d)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tjQuery('#Counter').countdown({\n\t\t\t\t\t\t\t\t\t\tuntil: new Date(d),\n\t\t\t\t\t\t\t\t\t\tlayout: counter.layout(),\n\t\t\t\t\t\t\t\t\t\tlabels: ['" . __('years', THEMENAME) . "', '" . __('months', THEMENAME) . "', '" . __('weeks', THEMENAME) . "', '" . __('days', THEMENAME) . "', '" . __('hours', THEMENAME) . "', '" . __('min', THEMENAME) . "', '" . __('sec', THEMENAME) . "'],\n\t\t\t\t\t\t\t\t\t\tlabels1: ['" . __('year', THEMENAME) . "', '" . __('month', THEMENAME) . "', '" . __('week', THEMENAME) . "', '" . __('day', THEMENAME) . "', '" . __('hour', THEMENAME) . "', '" . __('min', THEMENAME) . "', '" . __('sec', THEMENAME) . "']\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\tlayout: function ()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\treturn '<li>{dn}<span>{dl}</span></li>' + \n\t\t\t\t\t\t\t\t\t\t\t\t'<li>{hnn}<span>{hl}</span></li>' + \n\t\t\t\t\t\t\t\t\t\t\t\t'<li>{mnn}<span>{ml}</span></li>' + \n\t\t\t\t\t\t\t\t\t\t\t\t'<li>{snn}<span>{sl}</span></li>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// initialize the counter\n\t\t\t\t\t\t\tjQuery(document).ready(function() {\n\t\t\t\t\t\t\t\tcounter.init(\"" . $data['cs_date']['date'] . " " . $data['cs_date']['time'] . "\");\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})(jQuery);\n\t\t\t\t\t\t"); zn_update_array($zn_event_countdown_coming_soon); $zn_mailchimp = array('zn_mailchimp' => "// PREPARE THE NEWSLETTER AND SEND DATA TO MAILCHIMP\n\t\t\t\t\t\tjQuery('.nl-submit').click(function() {\n\n\t\t\t\t\t\t\tajax_url = jQuery(this).parent().attr('data-url');\n\t\t\t\t\t\t\tresult_placeholder = jQuery(this).parent().next('span.zn_mailchimp_result');\n\n\n\t\t\t\t\t\t\tjQuery.ajax({\n\t\t\t\t\t\t\t\turl: ajax_url,\n\t\t\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\tzn_mc_email: jQuery(this).prevAll('.nl-email').val(),\n\t\t\t\t\t\t\t\t\tzn_mailchimp_list: jQuery(this).prev('.nl-lid').val(),\n\t\t\t\t\t\t\t\t\tzn_ajax: '' // Change here with something different\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tsuccess: function(data){\n\t\t\t\t\t\t\t\t\tresult_placeholder.html(data);\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\terror: function() {\n\t\t\t\t\t\t\t\t\tresult_placeholder.html('ERROR.').css('color', 'red');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\t\t\t\t\t"); zn_update_array($zn_mailchimp); } // Load the theme scripts wp_enqueue_script('zn-script', MASTER_THEME_DIR . '/js/znscript.js', array('jquery'), '1.0.0', true); wp_localize_script('zn-script', 'zn_do_login', array('ajaxurl' => admin_url('admin-ajax.php'))); } }
function _woo_limited($options) { global $woocommerce; if (empty($woocommerce)) { return; } $element_size = zn_get_size($options['_sizer']); ?> <div class="<?php echo $element_size['sizer']; ?> "> <?php if (!empty($options['woo_lo_title'])) { echo '<h3 class="m_title">' . $options['woo_lo_title'] . '</h3>'; } ?> <div class="limited-offers-carousel fixclear"> <ul id="limited_offers" class="zn_limited_offers"> <?php // Get products on sale if (false === ($product_ids_on_sale = get_transient('wc_products_onsale'))) { $meta_query = array(); $meta_query[] = array('key' => '_sale_price', 'value' => 0, 'compare' => '>', 'type' => 'NUMERIC'); $on_sale = get_posts(array('post_type' => array('product', 'product_variation'), 'posts_per_page' => -1, 'post_status' => 'publish', 'meta_query' => $meta_query, 'fields' => 'id=>parent')); $product_ids = array_keys($on_sale); $parent_ids = array_values($on_sale); // Check for scheduled sales which have not started foreach ($product_ids as $key => $id) { if (get_post_meta($id, '_sale_price_dates_from', true) > current_time('timestamp')) { unset($product_ids[$key]); } } $product_ids_on_sale = array_unique(array_merge($product_ids, $parent_ids)); set_transient('wc_products_onsale', $product_ids_on_sale); } $product_ids_on_sale[] = 0; $meta_query = array(); $meta_query[] = $woocommerce->query->visibility_meta_query(); $meta_query[] = $woocommerce->query->stock_status_meta_query(); if (empty($options['woo_categories'])) { $options['woo_categories'] = ''; } $query_args = array('posts_per_page' => $options['prods_per_page'], 'tax_query' => array(array('taxonomy' => 'product_cat', 'field' => 'id', 'terms' => $options['woo_categories'])), 'no_found_rows' => 1, 'post_status' => 'publish', 'post_type' => 'product', 'orderby' => 'date', 'order' => 'ASC', 'meta_query' => $meta_query, 'post__in' => $product_ids_on_sale); $r = new WP_Query($query_args); if ($r->have_posts()) { while ($r->have_posts()) { $r->the_post(); global $product, $data; //echo $product->product_type; if ($product->product_type == 'variable') { $old_price = $product->min_variation_regular_price; $new_price = $product->min_variation_price; } else { $old_price = $product->regular_price; $new_price = $product->sale_price; } $reduced = 0; if ($old_price != 0) { $reduced = round(100 - $new_price * 100 / $old_price, 0); } echo '<li class="product-list-item" data-discount="' . $reduced . '%">'; //echo $product->product_type; do_action('woocommerce_before_shop_loop_item_title'); echo '<h5><a href="' . get_permalink() . '">' . get_the_title() . '</a></h5>'; echo '<h6 class="price">' . $product->get_price_html() . '</h6>'; echo '</li>'; } } wp_reset_query(); ?> </ul> <div class="controls"> <a href="#" class="prev"><span class="icon-chevron-left"></span></a> <a href="#" class="next"><span class="icon-chevron-right"></span></a> </div> </div> <!-- end limited offers carousel --> </div> <?php // Load JS $woo_offers = array('woo_offers' => "\t\n\t\t\t(function(\$){\n\t\t\t\t\$(window).load(function() {\n\t\t\t\t\t// latest & bestsellers carousels\n\t\t\t\t\tjQuery('.zn_limited_offers').carouFredSel({\n\t\t\t\t\t\tresponsive: true,\n\t\t\t\t\t\twidth: '92%',\n\t\t\t\t\t\tscroll: 1,\n\t\t\t\t\t\t/*auto: true,*/\n\t\t\t\t\t\titems: {width:190, visible: { min: 2, max: 4 } },\n\t\t\t\t\t\tprev\t: {\t\n\t\t\t\t\t\t\tbutton\t: function(){return jQuery(this).closest('.limited-offers-carousel').find('.prev');},\n\t\t\t\t\t\t\tkey\t\t: \"left\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\tnext\t: { \n\t\t\t\t\t\t\tbutton\t: function(){return jQuery(this).closest('.limited-offers-carousel').find('.next');},\n\t\t\t\t\t\t\tkey\t\t: \"right\"\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t})(jQuery);\n\t\t\t"); zn_update_array($woo_offers); }
function _c_form($options) { require_once TEMPLATEPATH . '/template-helpers/contact_form.php'; $contact_form = array('zn_contact_form' => "\n\t\t\t\t(function(\$){\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\$('#submit-form').click(function(e){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar form = \$(this).closest('.zn_form');\n\t\t\t\t\t\t\tvar success = \$('#success',form);\n\t\t\t\t\t\t\tvar has_error = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tvar reg = /^([A-Za-z0-9_\\-\\.])+\\@([A-Za-z0-9_\\-\\.])+\\.([A-Za-z]{2,4})\$/;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$('input.zn_required_field, textarea.zn_required_field',form).each(function(){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ( \$(this).val().length == 0 ) {\n\t\t\t\t\t\t\t\t\t\$(this).closest('.control-group').addClass('error');\n\t\t\t\t\t\t\t\t\thas_error = true;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\telse if( \$(this).hasClass( 'zn_email_field' ) && reg.test(\$(this).val()) == false ) {\n\n\t\t\t\t\t\t\t\t\t\t\$(this).closest('.control-group').addClass('error');\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\thas_error = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\$(this).closest('.control-group').removeClass('error');\n\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\n\t\t\t\t\t\t\tif (has_error) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\$.ajax({\n\t\t\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\t\t\turl: location.href,\n\t\t\t\t\t\t\t\tdata: \$(form).serialize(),\n\t\t\t\t\t\t\t\tsuccess: function(msg){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (msg == 'sent'){\n\t\t\t\t\t\t\t\t\t\tif (typeof Recaptcha != 'undefined' ) {\n\t\t\t\t\t\t\t\t\t\t\tRecaptcha.reload();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tsuccess.html('<div class=\"alert alert-success\">" . htmlspecialchars(__('Message successfully sent!', THEMENAME), ENT_QUOTES) . "</div>') ;\n\t\t\t\t\t\t\t\t\t\t\$('input:not(#submit-form), textarea',form).val('')\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\telse if ( msg == 'mail_not_sent' ){\n\t\t\t\t\t\t\t\t\t\tsuccess.html('<div class=\"alert alert-error\">" . htmlspecialchars(__('Message not sent! Please Try Again!', THEMENAME), ENT_QUOTES) . "</div>');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tif (typeof Recaptcha != 'undefined' ) {\n\t\t\t\t\t\t\t\t\t\t\tRecaptcha.reload();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tsuccess.html('<div class=\"alert alert-error\">'+msg+'</div>');\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\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"); zn_update_array($contact_form); }
function _pslider($options) { $title = ''; $link = ''; if (isset($options['ps_header_style']) && !empty($options['ps_header_style']) && $options['ps_header_style'] != 'zn_def_header_style') { $style = 'uh_' . $options['ps_header_style']; } else { $style = 'zn_def_header_style'; } if (isset($options['ps_slider_desc']) && !empty($options['ps_slider_desc'])) { $slider_desc = '<h3 class="centered">' . do_shortcode($options['ps_slider_desc']) . '</h3>'; } else { $slider_desc = ''; } if ($options['ps_sliding_direction'] == 'Horizontal') { $hclass = 'horizontal-mode'; $container_start = ''; $container_end = ''; } else { $hclass = ''; $container_start = '<div class="container">'; $container_end = '</div>'; } ?> <div id="slideshow" class="gradient <?php echo $style; ?> "> <div class="bgback"></div> <div data-images="<?php echo IMAGES_URL; ?> /" id="sparkles"></div> <div class="portfolio-slider-frames <?php echo $hclass; ?> zn_slideshow"> <?php echo $container_start; ?> <?php echo $slider_desc; ?> <div id="carousel-wrapper"> <div id="carousel" class="animating_frames"> <?php if (isset($options['single_pslides']) && is_array($options['single_pslides'])) { foreach ($options['single_pslides'] as $slide) { echo '<div>'; if (isset($slide['ps_slide_title']) && !empty($slide['ps_slide_title'])) { $title = '<span class="project_title">' . $slide['ps_slide_title'] . '</span>'; } if (isset($slide['ps_slide_link']['url']) && !empty($slide['ps_slide_link']['url'])) { $link = '<a class="project_url" href="' . $slide['ps_slide_link']['url'] . '" target="' . $slide['ps_slide_link']['target'] . '">' . $slide['ps_slide_link']['url'] . '</a>'; } // Front Image if (isset($slide['ps_slide_image1']) && !empty($slide['ps_slide_image1'])) { echo '<div class="img-front">'; echo $title; echo $link; $image = vt_resize('', $slide['ps_slide_image1'], '460', '320', true); echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="" />'; echo '</div>'; } // Right Image if (isset($slide['ps_slide_image3']) && !empty($slide['ps_slide_image3'])) { $image = vt_resize('', $slide['ps_slide_image3'], '460', '320', true); echo '<img class="img-back" src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="" />'; } // Left Image if (isset($slide['ps_slide_image2']) && !empty($slide['ps_slide_image2'])) { $image = vt_resize('', $slide['ps_slide_image2'], '460', '320', true); echo '<img class="img-back2" src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="" />'; } echo '</div>'; } } ?> </div> <a id="prev" href="#"><span class="icon-chevron-left icon-white"></span></a> <a id="next" href="#"><span class="icon-chevron-right icon-white"></span></a> </div><!-- end Carousel wrapper --> <?php echo $container_end; ?> </div> <div class="zn_header_bottom_style"></div> </div><!-- end slideshow --> <?php if ($options['ps_sliding_direction'] == 'Vertical') { $zn_portfolio_slider = array('zn_portfolio_slider' => "\n\t\t\t\t\t\t\t(function(\$){\n\t\t\t\t\t\t\t\tvar left = {\n\t\t\t\t\t\t\t\t\t\timgFront\t: 365,\n\t\t\t\t\t\t\t\t\t\timgBack\t\t: 365,\n\t\t\t\t\t\t\t\t\t\timgBack2\t: 365\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tcurrent = {\n\t\t\t\t\t\t\t\t\t\timgFront\t: 0,\n\t\t\t\t\t\t\t\t\t\timgBack\t\t: 80,\n\t\t\t\t\t\t\t\t\t\timgBack2\t: 50\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tright = {\n\t\t\t\t\t\t\t\t\t\timgFront\t: 365,\n\t\t\t\t\t\t\t\t\t\timgBack\t\t: 365,\n\t\t\t\t\t\t\t\t\t\timgBack2\t: 365\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tcSpeed = 400,\n\t\t\t\t\t\t\t\t\tcEasing = 'easeOutExpo',\n\t\t\t\t\t\t\t\t\tisScrolling = false;\n\n\t\t\t\t\t\t\t\t\$('#carousel').carouFredSel({\n\t\t\t\t\t\t\t\t\tscroll\t: {\n\t\t\t\t\t\t\t\t\t\tduration\t\t: -1,\n\t\t\t\t\t\t\t\t\t\ttimeoutDuration\t: 3000\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tauto\t: false,\n\t\t\t\t\t\t\t\t\tprev\t: {\n\t\t\t\t\t\t\t\t\t\tbutton\t\t: '#prev',\n\t\t\t\t\t\t\t\t\t\tconditions\t: function() {\n\t\t\t\t\t\t\t\t\t\t\treturn (!isScrolling);\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonBefore\t: function( data ) {\n\t\t\t\t\t\t\t\t\t\t\tisScrolling = true;\n\t\t\t\t\t\t\t\t\t\t\t\$(this).delay(900);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('.img-front').delay(700).animate({top: right.imgFront}, cSpeed, cEasing);\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back').delay(500).animate({top: right.imgBack}, cSpeed, cEasing);\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back2').delay(300).animate({top: right.imgBack2}, cSpeed, cEasing);\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonAfter: function( data ) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('.img-front').css({top: current.imgFront});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back').css({top: current.imgBack});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back2').css({top: current.imgBack2});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('.img-front').css({top: left.imgFront}).delay(700).animate({top: current.imgFront}, cSpeed, cEasing, function() {\n\t\t\t\t\t\t\t\t\t\t\t\tisScrolling = false;\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('img.img-back').css({top: left.imgBack}).delay(500).animate({top: current.imgBack}, cSpeed, cEasing);\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('img.img-back2').css({top: left.imgBack2}).delay(300).animate({top: current.imgBack2}, cSpeed, cEasing);\n\t\t\t\t\t\t\t\t\t\t\t\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\tnext\t: {\n\t\t\t\t\t\t\t\t\t\tbutton\t\t: '#next',\n\t\t\t\t\t\t\t\t\t\tconditions\t: function() {\n\t\t\t\t\t\t\t\t\t\t\treturn (!isScrolling);\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonBefore\t: function( data ) {\n\t\t\t\t\t\t\t\t\t\t\tisScrolling = true;\n\t\t\t\t\t\t\t\t\t\t\t\$(this).delay(900);\t//\tdelay the onafter\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('.img-front').animate({top: left.imgFront}, cSpeed, cEasing);\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back').delay(300).animate({top: left.imgBack}, cSpeed, cEasing);\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back2').delay(500).animate({top: left.imgBack2}, cSpeed, cEasing);\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonAfter: function( data ) {\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('.img-front').css({top: current.imgFront});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back').css({top: current.imgBack});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back2').css({top: current.imgBack2});\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('.img-front').css({top: right.imgFront}).animate({top: current.imgFront}, cSpeed, cEasing);\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('img.img-back').css({top: right.imgBack}).delay(200).animate({top: current.imgBack}, cSpeed, cEasing);\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('img.img-back2').css({top: right.imgBack2}).delay(300).animate({top: current.imgBack2}, cSpeed, cEasing, function() {\n\t\t\t\t\t\t\t\t\t\t\t\tisScrolling = false;\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\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\t\n\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\tif(\$('#carousel').hasClass('animating_frames')) {\n\t\t\t\t\t\t\t\t\tvar _tf = \$('#carousel .img-front'),\n\t\t\t\t\t\t\t\t\t\t_tb = \$('#carousel img.img-back'),\n\t\t\t\t\t\t\t\t\t\t_tbl = \$('#carousel img.img-back2'),\n\t\t\t\t\t\t\t\t\t\t_spd = 250, \n\t\t\t\t\t\t\t\t\t\t_eas = 'easeOutExpo';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t_tb.hover(function(){\n\t\t\t\t\t\t\t\t\t\t\$(this).animate({'margin-top':-40}, _spd, _eas);\n\t\t\t\t\t\t\t\t\t\t_tf.animate({'margin-left':-90}, _spd, _eas);\n\t\t\t\t\t\t\t\t\t\t_tbl.animate({'margin-left':-30}, _spd, _eas);\n\t\t\t\t\t\t\t\t\t},function(){\n\t\t\t\t\t\t\t\t\t\t\$(this).animate({'margin-top':0}, _spd, _eas);\n\t\t\t\t\t\t\t\t\t\t_tf.animate({'margin-left':0}, _spd, _eas);\n\t\t\t\t\t\t\t\t\t\t_tbl.animate({'margin-left':0}, _spd, _eas);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t_tbl.hover(function(){\n\t\t\t\t\t\t\t\t\t\t\$(this).animate({'margin-top':-20}, _spd, _eas);\n\t\t\t\t\t\t\t\t\t\t_tf.animate({'margin-left':90}, _spd, _eas);\n\t\t\t\t\t\t\t\t\t\t_tb.animate({'margin-left':20}, _spd, _eas);\n\t\t\t\t\t\t\t\t\t},function(){\n\t\t\t\t\t\t\t\t\t\t\$(this).animate({'margin-top':0}, _spd, _eas);\n\t\t\t\t\t\t\t\t\t\t_tf.animate({'margin-left':0}, _spd, _eas);\n\t\t\t\t\t\t\t\t\t\t_tb.animate({'margin-left':0}, _spd, _eas);\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})(jQuery);\n\t\t\t\t\t\t"); } else { $zn_portfolio_slider = array('zn_portfolio_slider' => "\n\t\t\t\t\t\t\t(function(\$){\n\t\t\t\t\t\t\t\tvar left = {\n\t\t\t\t\t\t\t\t\timgFront\t: -1200,\n\t\t\t\t\t\t\t\t\timgBack\t\t: -1200,\n\t\t\t\t\t\t\t\t\timgBack2\t: -1200\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tvar current = {\n\t\t\t\t\t\t\t\t\timgFront\t: 261,\n\t\t\t\t\t\t\t\t\timgBack\t\t: 470,\n\t\t\t\t\t\t\t\t\timgBack2\t: 60\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tvar right = {\n\t\t\t\t\t\t\t\t\timgFront\t: 2200,\n\t\t\t\t\t\t\t\t\timgBack\t\t: 2200,\n\t\t\t\t\t\t\t\t\timgBack2\t: 2200\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar isScrolling = false;\n\n\t\t\t\t\t\t\t\t\$('#carousel').carouFredSel({\n\t\t\t\t\t\t\t\t\tscroll\t: {\n\t\t\t\t\t\t\t\t\t\tduration\t\t: 0,\n\t\t\t\t\t\t\t\t\t\ttimeoutDuration\t: 3000\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tauto\t: false,\n\t\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\t\tprev\t: {\n\t\t\t\t\t\t\t\t\t\tbutton\t\t: '#prev',\n\t\t\t\t\t\t\t\t\t\tconditions\t: function() {\n\t\t\t\t\t\t\t\t\t\t\treturn (!isScrolling);\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonBefore\t: function( data ) {\n\t\t\t\t\t\t\t\t\t\t\tisScrolling = true;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\$(this).delay(900);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('.img-front').delay(400).animate({left: right.imgFront});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back').delay(300).animate({left: right.imgBack});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back2').delay(200).animate({left: right.imgBack2});\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonAfter: function( data ) {\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('.img-front').css({left: current.imgFront});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back').css({left: current.imgBack});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back2').css({left: current.imgBack2});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('.img-front').css({left: left.imgFront}).delay(400).animate({left: current.imgFront}, function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tisScrolling = false;\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('img.img-back').css({left: left.imgBack}).delay(300).animate({left: current.imgBack});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('img.img-back2').css({left: left.imgBack2}).delay(200).animate({left: current.imgBack2});\n\t\t\t\t\t\t\t\t\t\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\tnext\t: {\n\t\t\t\t\t\t\t\t\t\tbutton\t\t: '#next',\n\t\t\t\t\t\t\t\t\t\tconditions\t: function() {\n\t\t\t\t\t\t\t\t\t\t\treturn (!isScrolling);\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonBefore\t: function( data ) {\n\t\t\t\t\t\t\t\t\t\t\tisScrolling = true;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\$(this).delay(900);\t//\tdelay the onafter\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('.img-front').animate({left: left.imgFront});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back').delay(100).animate({left: left.imgBack});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back2').delay(200).animate({left: left.imgBack2});\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tonAfter: function( data ) {\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('.img-front').css({left: current.imgFront});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back').css({left: current.imgBack});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.old.find('img.img-back2').css({left: current.imgBack2});\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('.img-front').css({left: right.imgFront}).animate({left: current.imgFront});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('img.img-back').css({left: right.imgBack}).delay(100).animate({left: current.imgBack});\n\t\t\t\t\t\t\t\t\t\t\tdata.items.visible.find('img.img-back2').css({left: right.imgBack2}).delay(200).animate({left: current.imgBack2}, function() {\n\t\t\t\t\t\t\t\t\t\t\t\tisScrolling = false;\n\t\t\t\t\t\t\t\t\t\t\t}); \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});\n\n\n\t\t\t\t\t\t\t})(jQuery);\n\t\t\t\t\t\t"); } zn_update_array($zn_portfolio_slider); }
function _wowslider($options) { if (isset($options['ww_header_style']) && !empty($options['ww_header_style'])) { $style = 'uh_' . $options['ww_header_style']; } else { $style = ''; } ?> <div id="slideshow" class="<?php echo $style; ?> "> <div class="bgback"></div> <div data-images="<?php echo IMAGES_URL; ?> /" id="sparkles"></div> <div class="container zn_slideshow"> <div id="wowslider-container" class="drop-shadow <?php echo $options['ww_shadow']; ?> "" data-transition="<?php echo $options['ww_transition']; ?> "> <div class="ws_images"> <ul> <?php if (isset($options['single_wow']) && is_array($options['single_wow'])) { $i = 0; $thumbs = ''; foreach ($options['single_wow'] as $slide) { $link_start = ''; $link_end = ''; $title = ''; if (isset($slide['ww_slide_link']['url']) && !empty($slide['ww_slide_link']['url'])) { // Set defaults $link_start = '<a class="link" href="' . $slide['ww_slide_link']['url'] . '" target="' . $slide['ww_slide_link']['target'] . '">'; $link_end = '</a>'; } if (isset($slide['ww_slide_title']) && !empty($slide['ww_slide_title'])) { $title = $slide['ww_slide_title']; } echo '<li>'; echo $link_start; if (isset($slide['ww_slide_image']) && !empty($slide['ww_slide_image'])) { $image = vt_resize('', $slide['ww_slide_image'], '1170', '', true); echo '<img id="wows1_' . $i . '" title="' . $title . '" src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" />'; $image_thumb = vt_resize('', $slide['ww_slide_image'], '150', '60', true); $thumbs .= '<a href="#" title="slide' . $i . '"><img src="' . $image_thumb['url'] . '" />' . $i . '</a>'; } echo $link_end; echo '</li>'; $i++; } } ?> </ul> </div><!-- end ws_images --> <div class="ws_bullets"> <div> <?php echo $thumbs; ?> </div> </div><!-- end ws-bullets --> </div><!-- end #wow slider --> </div> <div class="zn_header_bottom_style"></div><!-- header bottom style --> </div><!-- end slideshow --> <?php $zn_wow_slider = array('zn_wow_slider' => "\n\t\t\t\t(function(\$) {\n\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\ttransition = jQuery(\"#wowslider-container\").attr('data-transition');\n\t\t\t\t\t\n\t\t\t\t\t\tjQuery(\"#wowslider-container\").wowSlider({\n\t\t\t\t\t\t\teffect:transition,\n\t\t\t\t\t\t\tduration:900,\n\t\t\t\t\t\t\tdelay:2000,\n\t\t\t\t\t\t\twidth:1170,\n\t\t\t\t\t\t\theight:465,\n\t\t\t\t\t\t\tcols:6,\n\t\t\t\t\t\t\tautoPlay:true,\n\t\t\t\t\t\t\tstopOnHover:true,\n\t\t\t\t\t\t\tloop:true,\n\t\t\t\t\t\t\tbullets:true,\n\t\t\t\t\t\t\tcaption:true,\n\t\t\t\t\t\t\tcontrols:true,\n\t\t\t\t\t\t\tcaptionEffect:\"slide\",\n\t\t\t\t\t\t\tlogo:\"image/loading_light.gif\",\n\t\t\t\t\t\t\timages:0\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t})(jQuery);\n\t\t\t"); zn_update_array($zn_wow_slider); }
function _lslider($options) { if (isset($options['ls_header_style']) && !empty($options['ls_header_style']) && $options['ls_header_style'] != 'zn_def_header_style') { $style = 'uh_' . $options['ls_header_style']; } else { $style = 'zn_def_header_style'; } if (isset($options['ls_slider_desc']) && !empty($options['ls_slider_desc'])) { $slider_desc = '<h3 class="centered">' . do_shortcode($options['ls_slider_desc']) . '</h3>'; } else { $slider_desc = ''; } ?> <div id="slideshow" class="gradient noGlare <?php echo $style; ?> "> <div class="bgback"></div> <div class="laptop-slider-wrapper"> <div class="container"> <?php echo $slider_desc; ?> <div class="laptop-mask"> <div class="flexslider zn_laptop_slider"> <ul class="slides"> <?php if (isset($options['single_lslides']) && is_array($options['single_lslides'])) { foreach ($options['single_lslides'] as $slide) { $link_start = ''; $link_end = ''; $caption = ''; $alt = ''; if (isset($slide['ls_slide_link']['url']) && !empty($slide['ls_slide_link']['url'])) { // Link $link_start = '<a class="link" href="' . $slide['ls_slide_link']['url'] . '" target="' . $slide['ls_slide_link']['target'] . '">'; $link_end = '</a>'; } if (isset($slide['ls_slide_title']) && !empty($slide['ls_slide_title'])) { // Caption $caption = '<h2 class="flex-caption">' . $slide['ls_slide_title'] . '</h2>'; $alt = $slide['ls_slide_title']; } echo '<li>'; echo $link_start; if (isset($slide['ls_slide_image']) && !empty($slide['ls_slide_image'])) { $image = vt_resize('', $slide['ls_slide_image'], '607', '380', true); echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="' . $alt . '" />'; } echo $caption; echo $link_end; echo '</li>'; } } ?> </ul> </div><!-- end #flexslider --> </div><!-- laptop mask --> </div> </div> </div><!-- end slideshow --> <?php // LOAD CSS AND JS wp_enqueue_style('lslider'); wp_enqueue_script('flex_slider'); $zn_laptop_slider = array('zn_laptop_slider' => "\n\t\t\t(function(\$){ \n\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\n\t\t\t\t\tfunction slideCompletezn_laptop_slider(args) {\n\t\t\t\t\t\tvar caption = \$(args.container).find('.flex-caption').attr('style', ''),\n\t\t\t\t\t\t\tthisCaption = \$('.flexslider.zn_laptop_slider .slides > li.flex-active-slide').find('.flex-caption');\n\t\t\t\t\t\tthisCaption.animate({left:20, opacity:1}, 500, 'easeOutQuint');\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\$(\".flexslider.zn_laptop_slider\").flexslider({\n\t\t\t\t\t\tanimation: \"fade\",\t\t\t\t//String: Select your animation type, \"fade\" or \"slide\"\n\t\t\t\t\t\tslideDirection: \"horizontal\",\t//String: Select the sliding direction, \"horizontal\" or \"vertical\"\n\t\t\t\t\t\tslideshow: true,\t\t\t\t//Boolean: Animate slider automatically\n\t\t\t\t\t\tslideshowSpeed: 7000,\t\t\t//Integer: Set the speed of the slideshow cycling, in milliseconds\n\t\t\t\t\t\tanimationDuration: 9600,\t\t\t//Integer: Set the speed of animations, in milliseconds\n\t\t\t\t\t\tdirectionNav: true,\t\t\t\t//Boolean: Create navigation for previous/next navigation? (true/false)\n\t\t\t\t\t\tcontrolNav: false,\t\t\t\t//Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage\n\t\t\t\t\t\tkeyboardNav: true,\t\t\t\t//Boolean: Allow slider navigating via keyboard left/right keys\n\t\t\t\t\t\tmousewheel: false,\t\t\t\t//{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel\n\t\t\t\t\t\tsmoothHeight: false,\n\t\t\t\t\t\trandomize: false,\t\t\t\t//Boolean: Randomize slide order\n\t\t\t\t\t\tslideToStart: 0,\t\t\t\t//Integer: The slide that the slider should start on. Array notation (0 = first slide)\n\t\t\t\t\t\tanimationLoop: true,\t\t\t//Boolean: Should the animation loop? If false, directionNav will received \"disable\" classes at either end\n\t\t\t\t\t\tpauseOnAction: true,\t\t\t//Boolean: Pause the slideshow when interacting with control elements, highly recommended.\n\t\t\t\t\t\tpauseOnHover: false,\t\t\t//Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering\n\t\t\t\t\t\tstart: slideCompletezn_laptop_slider,\n\t\t\t\t\t\tafter: slideCompletezn_laptop_slider\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t})(jQuery);\n\t\t\t"); zn_update_array($zn_laptop_slider); }
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); }
function _nivoslider($options) { if (isset($options['nv_header_style']) && !empty($options['nv_header_style'])) { $style = 'uh_' . $options['nv_header_style']; } else { $style = ''; } ?> <div id="slideshow" class="<?php echo $style; ?> "> <div class="bgback"></div> <div data-images="<?php echo IMAGES_URL; ?> /" id="sparkles"></div> <div class="container zn_slideshow"> <div id="nivoslider" class="nivoContainer "> <div class="nivoSlider drop-shadow <?php echo $options['nv_shadow']; ?> " data-transition="<?php echo $options['nv_transition']; ?> "> <?php if (isset($options['single_nivo']) && is_array($options['single_nivo'])) { foreach ($options['single_nivo'] as $slide) { $link_start = ''; $link_end = ''; $title = ''; if (isset($slide['nv_slide_link']['url']) && !empty($slide['nv_slide_link']['url'])) { // Set defaults $link_start = '<a class="link" href="' . $slide['nv_slide_link']['url'] . '" target="' . $slide['nv_slide_link']['target'] . '">'; $link_end = '</a>'; } if (isset($slide['nv_slide_title']) && !empty($slide['nv_slide_title'])) { $title = $slide['nv_slide_title']; } echo $link_start; if (isset($slide['nv_slide_image']) && !empty($slide['nv_slide_image'])) { $image = vt_resize('', $slide['nv_slide_image'], '1170', '', true); echo '<img title="' . $title . '" src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" />'; } echo $link_end; } } ?> </div> </div><!-- end #nivoslider --> </div> <div class="zn_header_bottom_style"></div><!-- header bottom style --> </div><!-- end slideshow --> <?php if (isset($options['nv_auto_slide'])) { $nv_auto_slide = $options['nv_auto_slide']; } else { $nv_auto_slide = 1; } if (isset($options['nv_pause_time'])) { $nv_pause_time = $options['nv_pause_time']; } else { $nv_pause_time = 5000; } $zn_nivo_slider = array('zn_nivo_slider' => "\n\t\t\t\t\t\t\t(function(\$) {\n\t\t\t\t\t\t\t\t\$(window).load(function(){\n\t\t\t\t\t\t\t\t\tvar slider = \$('#nivoslider .nivoSlider');\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfunction slideFirst() {\n\t\t\t\t\t\t\t\t\t\tvar caption = slider.find('.nivo-caption');\n\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\t\t\t\tcaption.css('min-width',400).animate({left:20, opacity:1}, 500, 'easeOutQuint');\n\t\t\t\t\t\t\t\t\t\t}, 1000);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfunction slideIn() {\n\t\t\t\t\t\t\t\t\t\tslider.find('.nivo-caption').css('min-width','').animate({left:20, opacity:1}, 500, 'easeOutQuint');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfunction slideOut() {\n\t\t\t\t\t\t\t\t\t\tslider.find('.nivo-caption').css('min-width','').animate({left:120, opacity:0}, 500, 'easeOutQuint');\n\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\ttransition = slider.attr('data-transition');\n\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\tslider.nivoSlider({\n\t\t\t\t\t\t\t\t\t\teffect:transition,\t\t// Specify sets like: 'fold,fade,sliceDown'\n\t\t\t\t\t\t\t\t\t\tboxCols: 8,\t\t\t\t// For box animations\n\t\t\t\t\t\t\t\t\t\tboxRows: 4,\t\t\t\t// For box animations\n\t\t\t\t\t\t\t\t\t\tslices:15,\t\t\t\t// For slice animations\n\t\t\t\t\t\t\t\t\t\tanimSpeed:500,\t\t\t// Slide transition speed\n\t\t\t\t\t\t\t\t\t\tpauseTime:" . $nv_pause_time . ",\t\t\t// How long each slide will show\n\t\t\t\t\t\t\t\t\t\tstartSlide:0,\t\t\t// Set starting Slide (0 index)\n\t\t\t\t\t\t\t\t\t\tdirectionNav:1,\t\t\t// Next & Prev navigation\n\t\t\t\t\t\t\t\t\t\tcontrolNav:1,\t\t\t// 1,2,3... navigation\n\t\t\t\t\t\t\t\t\t\tcontrolNavThumbs:0,\t\t// Use thumbnails for Control Nav\n\t\t\t\t\t\t\t\t\t\tpauseOnHover:1,\t\t\t// Stop animation while hovering\n\t\t\t\t\t\t\t\t\t\tmanualAdvance:" . $nv_auto_slide . ",\t\t// Force manual transitions\n\t\t\t\t\t\t\t\t\t\tafterLoad: slideFirst,\n\t\t\t\t\t\t\t\t\t\tbeforeChange: slideOut,\n\t\t\t\t\t\t\t\t\t\tafterChange: slideIn\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})(jQuery);\n\t\t\t\t\t\t"); zn_update_array($zn_nivo_slider); }