コード例 #1
0
ファイル: stripe-steps.php プロジェクト: ugurozer/little
<div class="stripe steps pad">

	<?php 
$steps = get_sub_field('steps');
if ($steps) {
    echo '<ul class="steps' . count($steps) . '">';
    $count = 1;
    foreach ($steps as $step) {
        $attachment = wp_get_attachment($step['image']);
        echo '<li><i>' . $count . '</i><strong>' . $step['title'] . '</strong><p>' . $step['description'] . '</p><a href="' . $attachment[src] . '" data-target="flare" data-flare-scale="fillmax"><img src="' . $attachment[large] . '"/></a></li>';
        $count++;
    }
    echo '</ul>';
}
?>

</div>
コード例 #2
0
function front_end_slider($images, $paramssld, $slider)
{
    ob_start();
    if (isset($slider)) {
        $sliderID = $slider[0]->id;
        $slidertitle = $slider[0]->name;
        $sliderheight = $slider[0]->sl_height;
        $sliderwidth = $slider[0]->sl_width;
        $slidereffect = $slider[0]->slider_list_effects_s;
        $slidepausetime = $slider[0]->description + $slider[0]->param;
        $sliderpauseonhover = $slider[0]->pause_on_hover;
        $sliderposition = $slider[0]->sl_position;
        $slidechangespeed = $slider[0]->param;
        $sliderloadingicon = $slider[0]->sl_loading_icon;
        $sliderthumbslider = $slider[0]->show_thumb;
        $slideshow_title_position = explode('-', trim($paramssld['slider_title_position']));
        $slideshow_description_position = explode('-', trim($paramssld['slider_description_position']));
    }
    $hasyoutube = false;
    $hasvimeo = false;
    foreach ($images as $key => $image_row) {
        if (strpos($image_row->image_url, 'youtube') !== false || strpos($image_row->image_url, 'youtu.be') !== false) {
            $hasyoutube = true;
        }
        if (strpos($image_row->image_url, 'vimeo') !== false) {
            $hasvimeo = true;
        }
    }
    $GLOBALS['pause_time'] = $slidepausetime;
    $GLOBALS['thumbnail_width'] = $sliderwidth;
    $GLOBALS['changespeed'] = $slider[0]->param;
    ?>
<script>
	var huge_video_playing={};
	var autoplayMatch={};
	
	

</script>


<?php 
    if ($hasvimeo == true) {
        ?>
<script src="<?php 
        echo plugins_url('js/vimeo.lib.js', __FILE__);
        ?>
"></script>
<script src="https://f.vimeocdn.com/js/froogaloop2.min.js "></script>
<script>
jQuery(function(){
	var vimeoPlayer = document.querySelector('iframe');

	var volumes = [];
	var colors = [];
	var i=0;		
	<?php 
        $i = 0;
        //$vimeoparams=array_reverse($images);
        foreach ($images as $key => $image_row) {
            if ($image_row->sl_type == "video" and strpos($image_row->image_url, 'vimeo') !== false) {
                ?>
		volumes[<?php 
                echo $i;
                ?>
] = '<?php 
                echo intval($image_row->description) / 100;
                ?>
';
		colors[<?php 
                echo $i;
                ?>
] = '<?php 
                echo $image_row->link_target;
                ?>
';
	<?php 
                $i++;
            }
        }
        ?>
		
	jQuery('iframe').each(function(){
				Froogaloop(this).addEvent('ready', ready);
	});
	jQuery(".sidedock,.controls").remove();
	function ready(player_id) {
	
		froogaloop = $f(player_id);
	
		function setupEventListeners() {
			function setVideoVolume(player_id,value) {
				Froogaloop(player_id).api('setVolume',value);
			}	
			function setVideoColor(player_id,value) {
				Froogaloop(player_id).api('setColor',value);
			}			
			function onPlay() {
				froogaloop.addEvent('play',
				function(){
					huge_video_playing['video_is_playing_'+<?php 
        echo $sliderID;
        ?>
]=true;
				});
			}
			function onPause() {
				froogaloop.addEvent('pause',
				function(){
					huge_video_playing['video_is_playing_'+<?php 
        echo $sliderID;
        ?>
]=false;
				});
			}					
			function stopVimeoVideo(player){
				Froogaloop(player).api('pause');
			}
			setVideoVolume(player_id,volumes[i]);
			setVideoColor(player_id,colors[i]);
			i++;			
			
			onPlay();
			onPause();
			jQuery('#huge_it_slideshow_left_<?php 
        echo $sliderID;
        ?>
, #huge_it_slideshow_right_<?php 
        echo $sliderID;
        ?>
,.huge_it_slideshow_dots_<?php 
        echo $sliderID;
        ?>
').click(function(){
				stopVimeoVideo(player_id);
			});
		}
		setupEventListeners();
	}
});		
</script>
<?php 
    }
    ?>

<?php 
    if ($hasyoutube == true) {
        ?>

<script src="<?php 
        echo plugins_url('js/youtube.lib.js', __FILE__);
        ?>
"></script>
<script> 
  <?php 
        if (!function_exists('get_youtube_id_from_url')) {
            function get_youtube_id_from_url($url)
            {
                if (preg_match('%(?:youtube(?:-nocookie)?\\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\\.be/)([^"&?/ ]{11})%i', $url, $match)) {
                    return $match[1];
                }
            }
        }
        $i = 0;
        foreach ($images as $key => $image_row) {
            if ($image_row->sl_type == "video" and strpos($image_row->image_url, 'youtu') !== false) {
                ?>
 
		var player_<?php 
                echo $image_row->id;
                ?>
;
<?php 
            } else {
                if (strpos($image_row->image_url, 'vimeo') !== false) {
                    ?>
				
<?php 
                } else {
                    continue;
                }
            }
            $i++;
        }
        ?>
		huge_video_playing['video_is_playing_'+<?php 
        echo $sliderID;
        ?>
]=false;
		function onYouTubeIframeAPIReady() {
			<?php 
        foreach ($images as $key => $image_row) {
            ?>
							
				<?php 
            if ($image_row->sl_type == "video" and strpos($image_row->image_url, 'youtube') !== false) {
                ?>
 
				player_<?php 
                echo $image_row->id;
                ?>
 = new YT.Player('video_id_<?php 
                echo $sliderID;
                ?>
_<?php 
                echo $key;
                ?>
', {
				  height: '<?php 
                echo $sliderheight;
                ?>
',
				  width: '<?php 
                echo $sliderwidth;
                ?>
',
				  videoId: '<?php 
                echo get_youtube_id_from_url($image_row->image_url);
                ?>
',
				   playerVars: {
					'controls': <?php 
                if ($images[$key]->sl_url == "on") {
                    echo 1;
                } else {
                    echo 0;
                }
                ?>
,           
					'showinfo': <?php 
                if ($images[$key]->link_target == "on") {
                    echo 1;
                } else {
                    echo 0;
                }
                ?>
,
					'rel':0
				  },
				  events: {
					'onReady': onPlayerReady_<?php 
                echo $image_row->id;
                ?>
,
					'onStateChange': onPlayerStateChange_<?php 
                echo $image_row->id;
                ?>
,
					'loop':1
				  }
				});
			<?php 
            } else {
                continue;
            }
        }
        ?>
		}
		
		
<?php 
        foreach ($images as $key => $image_row) {
            if ($image_row->sl_type == "video" and strpos($image_row->image_url, 'youtu') !== false) {
                ?>
 
		  function onPlayerReady_<?php 
                echo $image_row->id;
                ?>
(event) {	
			 player_<?php 
                echo $image_row->id;
                ?>
.setVolume(<?php 
                echo $images[$key]->description;
                ?>
);
		  }
		  
		  function onPlayerStateChange_<?php 
                echo $image_row->id;
                ?>
(event) {
			//(event.data);
			
   //jQuery("iframe[class^='huge_it_video_frame_']")[myid].src;

			if (event.data == YT.PlayerState.PLAYING) {
				event.target.setPlaybackQuality('<?php 
                echo $images[$key]->name;
                ?>
');
				huge_video_playing['video_is_playing_'+<?php 
                echo $sliderID;
                ?>
]=true;
				
			}
			else if(event.data == YT.PlayerState.PAUSED){
				huge_video_playing['video_is_playing_'+<?php 
                echo $sliderID;
                ?>
]=false;
				
			}
		  }
<?php 
            } else {
                continue;
            }
        }
        ?>
	function stopYoutubeVideo() {
		<?php 
        $i = 0;
        foreach ($images as $key => $image_row) {
            if ($image_row->sl_type == "video" and strpos($image_row->image_url, 'youtube') !== false) {
                ?>
			player_<?php 
                echo $image_row->id;
                ?>
.pauseVideo();
		<?php 
            } else {
                continue;
            }
            $i++;
        }
        ?>
	}

</script>
<?php 
    }
    ?>
	
	
<script>

	jQuery(document).ready(function($) {

  $('.thumb_wrapper').on('click', function(ev) {
  	var hugeid=$(this).data('rowid');
  	var myid=hugeid;
  	myid=parseInt(myid);
  	eval('player_'+myid+'.playVideo()')
   ev.preventDefault();
 
  });
});

	if(typeof sliderID_array =="undefined"){
		var sliderID_array=[];
	}
	
	var data_<?php 
    echo $sliderID;
    ?>
 = [];      
	var event_stack_<?php 
    echo $sliderID;
    ?>
 = [];
	huge_video_playing['video_is_playing_'+<?php 
    echo $sliderID;
    ?>
]=false;
	<?php 
    $args = array('numberposts' => 10, 'offset' => 0, 'category' => 0, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => 'draft, publish, future, pending, private', 'suppress_filters' => true);
    //	$images=array_reverse($images);
    $recent_posts = wp_get_recent_posts($args, ARRAY_A);
    $i = 0;
    foreach ($images as $image) {
        $imagerowstype = $image->sl_type;
        if ($image->sl_type == '') {
            $imagerowstype = 'image';
        }
        switch ($imagerowstype) {
            case 'image':
                echo 'data_' . $sliderID . '["' . $i . '"]=[];';
                echo 'data_' . $sliderID . '["' . $i . '"]["id"]="' . $i . '";';
                echo 'data_' . $sliderID . '["' . $i . '"]["image_url"]="' . $image->image_url . '";';
                $strdesription = str_replace('"', "'", $image->description);
                $strdesription = preg_replace("/\r|\n/", " ", $strdesription);
                echo 'data_' . $sliderID . '["' . $i . '"]["description"]="' . $strdesription . '";';
                $stralt = str_replace('"', "'", $image->name);
                $stralt = preg_replace("/\r|\n/", " ", $stralt);
                echo 'data_' . $sliderID . '["' . $i . '"]["alt"]="' . $stralt . '";';
                $i++;
                break;
            case 'video':
                echo 'data_' . $sliderID . '["' . $i . '"]=[];';
                echo 'data_' . $sliderID . '["' . $i . '"]["id"]="' . $i . '";';
                echo 'data_' . $sliderID . '["' . $i . '"]["image_url"]="' . $image->image_url . '";';
                $strdesription = str_replace('"', "'", $image->description);
                $strdesription = preg_replace("/\r|\n/", " ", $strdesription);
                echo 'data_' . $sliderID . '["' . $i . '"]["description"]="' . $strdesription . '";';
                $stralt = str_replace('"', "'", $image->name);
                $stralt = preg_replace("/\r|\n/", " ", $stralt);
                echo 'data_' . $sliderID . '["' . $i . '"]["alt"]="' . $stralt . '";';
                $i++;
                break;
            case 'last_posts':
                $keyForStoping = 0;
                foreach ($recent_posts as $keyl => $recentimage) {
                    if ($image->name == "0") {
                        if (get_the_post_thumbnail($recentimage["ID"], 'thumbnail') != '') {
                            if ($keyl < $image->sl_url) {
                                echo 'data_' . $sliderID . '["' . $i . '"]=[];';
                                echo 'data_' . $sliderID . '["' . $i . '"]["id"]="' . $i . '";';
                                echo 'data_' . $sliderID . '["' . $i . '"]["image_url"]="' . $recentimage['guid'] . '";';
                                $strdesription = str_replace('"', "'", $recentimage['post_content']);
                                $strdesription = preg_replace("/\r|\n/", " ", $strdesription);
                                $strdesription = substr_replace($strdesription, "", $image->description);
                                echo 'data_' . $sliderID . '["' . $i . '"]["description"]="' . $strdesription . '";';
                                $stralt = str_replace('"', "'", $recentimage['post_title']);
                                $stralt = preg_replace("/\r|\n/", " ", $stralt);
                                echo 'data_' . $sliderID . '["' . $i . '"]["alt"]="' . $stralt . '";';
                                $i++;
                            }
                        }
                    } else {
                        $category_id = get_cat_ID($image->name);
                        //       USER CHOOSED CATEGORY
                        $category_id_from_posts = wp_get_post_categories($recentimage['ID']);
                        //       GETTING ALL CATEGORIES FOR THIS POST
                        if ($keyForStoping < $image->sl_url) {
                            if (in_array($category_id, $category_id_from_posts)) {
                                if (get_the_post_thumbnail($recentimage["ID"], 'thumbnail') != '') {
                                    $keyForStoping++;
                                    //                                                        if($keyl < $image->sl_url){
                                    echo 'data_' . $sliderID . '["' . $i . '"]=[];';
                                    echo 'data_' . $sliderID . '["' . $i . '"]["id"]="' . $i . '";';
                                    echo 'data_' . $sliderID . '["' . $i . '"]["image_url"]="' . $recentimage['guid'] . '";';
                                    $strdesription = str_replace('"', "'", $recentimage['post_content']);
                                    $strdesription = preg_replace("/\r|\n/", " ", $strdesription);
                                    $strdesription = substr_replace($strdesription, "", $image->description);
                                    echo 'data_' . $sliderID . '["' . $i . '"]["description"]="' . $strdesription . '";';
                                    $stralt = str_replace('"', "'", $recentimage['post_title']);
                                    $stralt = preg_replace("/\r|\n/", " ", $stralt);
                                    echo 'data_' . $sliderID . '["' . $i . '"]["alt"]="' . $stralt . '";';
                                    $i++;
                                    //                                                        }
                                }
                            }
                        }
                    }
                }
                break;
        }
    }
    ?>
	
	

      var huge_it_trans_in_progress_<?php 
    echo $sliderID;
    ?>
 = false;
      var huge_it_transition_duration_<?php 
    echo $sliderID;
    ?>
 = <?php 
    echo $slidechangespeed;
    ?>
;
      var huge_interval ={};
      var id_array_index=sliderID_array.length

	  <?php 
    $huge_sliderId = '';
    if (isset($huge_sliderId)) {
        $huge_sliderId = $huge_sliderId;
    } else {
        $huge_sliderId = '';
    }
    if ($huge_sliderId == ';') {
        $huge_sliderId = '';
    }
    if ($slider[0]->show_thumb == 'thumbnails') {
        $huge_sliderId = $slider[0]->id;
    }
    ?>

      
	  var ifhasthumb ="<?php 
    echo $sliderthumbslider;
    ?>
";
	  sliderID_array[id_array_index] = <?php 
    echo $huge_sliderId;
    ?>
      // Stop autoplay.
      window.clearInterval(huge_interval['huge_it_playInterval_'+<?php 
    echo $sliderID;
    ?>
]);
	  
     var huge_it_current_key_<?php 
    echo $sliderID;
    ?>
 = '<?php 
    echo isset($current_key) ? $current_key : '';
    ?>
';
	 function huge_it_move_dots_<?php 
    echo $sliderID;
    ?>
() {
        var image_left = jQuery(".huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
").position().left;
        var image_right = jQuery(".huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
").position().left + jQuery(".huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
").outerWidth(true);
       
      }
      function huge_it_testBrowser_cssTransitions_<?php 
    echo $sliderID;
    ?>
() {
        return huge_it_testDom_<?php 
    echo $sliderID;
    ?>
('Transition');
      }
      function huge_it_testBrowser_cssTransforms3d_<?php 
    echo $sliderID;
    ?>
() {
        return huge_it_testDom_<?php 
    echo $sliderID;
    ?>
('Perspective');
      }
      function huge_it_testDom_<?php 
    echo $sliderID;
    ?>
(prop) {
        // Browser vendor CSS prefixes.
        var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-'];
        // Browser vendor DOM prefixes.
        var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml'];
        var i = domPrefixes.length;
        while (i--) {
          if (typeof document.body.style[domPrefixes[i] + prop] !== 'undefined') {
            return true;
          }
        }
        return false;
      }
		function huge_it_cube_<?php 
    echo $sliderID;
    ?>
(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) {
		
        /* If browser does not support 3d transforms/CSS transitions.*/
        if (!huge_it_testBrowser_cssTransitions_<?php 
    echo $sliderID;
    ?>
()) {
			jQuery(".huge_it_slideshow_dots_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
");
        jQuery("#huge_it_dots_" + huge_it_current_key_<?php 
    echo $sliderID;
    ?>
 + "_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
");
          return huge_it_fallback_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction);
        }
        if (!huge_it_testBrowser_cssTransforms3d_<?php 
    echo $sliderID;
    ?>
()) {
          return huge_it_fallback3d_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction);
        }
			//alert(current_image_class+' '+next_image_class);
		  jQuery(current_image_class).css({'z-index': 'none'});
          jQuery(next_image_class).css({'z-index' : 2});
        huge_it_trans_in_progress_<?php 
    echo $sliderID;
    ?>
 = true;
        /* Set active thumbnail.*/
		jQuery(".huge_it_slideshow_dots_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
");  
		jQuery("#huge_it_dots_" + huge_it_current_key_<?php 
    echo $sliderID;
    ?>
 + "_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
");
        jQuery(".huge_it_slide_bg_<?php 
    echo $sliderID;
    ?>
").css('perspective', 1000);
        jQuery(current_image_class).css({
          transform : 'translateZ(' + tz + 'px)',
          backfaceVisibility : 'hidden'
        });
		
		 jQuery(".huge_it_slideshow_image_wrap_<?php 
    echo $sliderID;
    ?>
,.huge_it_slide_bg_<?php 
    echo $sliderID;
    ?>
,.huge_it_slideshow_image_item_<?php 
    echo $sliderID;
    ?>
,.huge_it_slideshow_image_second_item_<?php 
    echo $sliderID;
    ?>
 ").css('overflow', 'visible');
		
        jQuery(next_image_class).css({
          opacity : 1,
          filter: 'Alpha(opacity=100)',
          backfaceVisibility : 'hidden',
          transform : 'translateY(' + nty + 'px) translateX(' + ntx + 'px) rotateY('+ nry +'deg) rotateX('+ nrx +'deg)'
        });
        jQuery(".huge_it_slider_<?php 
    echo $sliderID;
    ?>
").css({
          transform: 'translateZ(-' + tz + 'px)',
          transformStyle: 'preserve-3d'
        });
        /* Execution steps.*/
        setTimeout(function () {
          jQuery(".huge_it_slider_<?php 
    echo $sliderID;
    ?>
").css({
            transition: 'all ' + huge_it_transition_duration_<?php 
    echo $sliderID;
    ?>
 + 'ms ease-in-out',
            transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)'
          });
        }, 20);
        /* After transition.*/
        jQuery(".huge_it_slider_<?php 
    echo $sliderID;
    ?>
").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(huge_it_after_trans));
        function huge_it_after_trans() {
          /*if (huge_it_from_focus_<?php 
    echo $sliderID;
    ?>
) {
            huge_it_from_focus_<?php 
    echo $sliderID;
    ?>
 = false;
            return;
          }*/
		  jQuery(".huge_it_slide_bg_<?php 
    echo $sliderID;
    ?>
,.huge_it_slideshow_image_item_<?php 
    echo $sliderID;
    ?>
,.huge_it_slideshow_image_second_item_<?php 
    echo $sliderID;
    ?>
 ").css('overflow', 'hidden');
		  jQuery(".huge_it_slide_bg_<?php 
    echo $sliderID;
    ?>
").removeAttr('style');
          jQuery(current_image_class).removeAttr('style');
          jQuery(next_image_class).removeAttr('style');
          jQuery(".huge_it_slider_<?php 
    echo $sliderID;
    ?>
").removeAttr('style');
		 // alert(current_image_class+' '+next_image_class);
          jQuery(current_image_class).css({'opacity' : 0, filter: 'Alpha(opacity=0)', 'z-index': 1});
          jQuery(next_image_class).css({'opacity' : 1, filter: 'Alpha(opacity=100)', 'z-index' : 2});
         // huge_it_change_watermark_container_<?php 
    echo $sliderID;
    ?>
();
          huge_it_trans_in_progress_<?php 
    echo $sliderID;
    ?>
 = false;
          if (typeof event_stack_<?php 
    echo $sliderID;
    ?>
 !== 'undefined' && event_stack_<?php 
    echo $sliderID;
    ?>
.length > 0) {
            key = event_stack_<?php 
    echo $sliderID;
    ?>
[0].split("-");
            event_stack_<?php 
    echo $sliderID;
    ?>
.shift();
            huge_it_change_image_<?php 
    echo $sliderID;
    ?>
(key[0], key[1], data_<?php 
    echo $sliderID;
    ?>
, true,false);
          }
        }
      }
      function huge_it_cubeH_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        /* Set to half of image width.*/
        var dimension = jQuery(current_image_class).width() / 2;
        if (direction == 'right') {
          huge_it_cube_<?php 
    echo $sliderID;
    ?>
(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction);
        }
        else if (direction == 'left') {
          huge_it_cube_<?php 
    echo $sliderID;
    ?>
(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction);
        }
      }
      function huge_it_cubeV_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        /* Set to half of image height.*/
        var dimension = jQuery(current_image_class).height() / 2;
        /* If next slide.*/
        if (direction == 'right') {
          huge_it_cube_<?php 
    echo $sliderID;
    ?>
(dimension, 0, -dimension, 90, 0, -90, 0, current_image_class, next_image_class, direction);
        }
        else if (direction == 'left') {
          huge_it_cube_<?php 
    echo $sliderID;
    ?>
(dimension, 0, dimension, -90, 0, 90, 0, current_image_class, next_image_class, direction);
        }
      }
      /* For browsers that does not support transitions.*/
      function huge_it_fallback_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        huge_it_fade_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction);
      }
      /* For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).*/
      function huge_it_fallback3d_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        huge_it_sliceV_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction);
      }
      function huge_it_none_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
        jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});

        /* Set active thumbnail.*/
        jQuery(".huge_it_slideshow_dots_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
");
        jQuery("#huge_it_dots_" + huge_it_current_key_<?php 
    echo $sliderID;
    ?>
 + "_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
");
      }
      function huge_it_fade_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
		if (huge_it_testBrowser_cssTransitions_<?php 
    echo $sliderID;
    ?>
()) {
			
          jQuery(next_image_class).css('transition', 'opacity ' + huge_it_transition_duration_<?php 
    echo $sliderID;
    ?>
 + 'ms linear');
		  jQuery(current_image_class).css('transition', 'opacity ' + huge_it_transition_duration_<?php 
    echo $sliderID;
    ?>
 + 'ms linear');
          jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
          jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
        }
        else {
		
          jQuery(current_image_class).animate({'opacity' : 0, 'z-index' : 1}, huge_it_transition_duration_<?php 
    echo $sliderID;
    ?>
);
          jQuery(next_image_class).animate({
              'opacity' : 1,
              'z-index': 2
            }, {
              duration: huge_it_transition_duration_<?php 
    echo $sliderID;
    ?>
,
              complete: function () {return false;}
            });
          // For IE.
          jQuery(current_image_class).fadeTo(huge_it_transition_duration_<?php 
    echo $sliderID;
    ?>
, 0);
          jQuery(next_image_class).fadeTo(huge_it_transition_duration_<?php 
    echo $sliderID;
    ?>
, 1);
        }

		jQuery(".huge_it_slideshow_dots_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
");
		jQuery("#huge_it_dots_" + huge_it_current_key_<?php 
    echo $sliderID;
    ?>
 + "_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
");
      }
      function huge_it_grid_<?php 
    echo $sliderID;
    ?>
(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) {
        /* If browser does not support CSS transitions.*/
        if (!huge_it_testBrowser_cssTransitions_<?php 
    echo $sliderID;
    ?>
()) {
			jQuery(".huge_it_slideshow_dots_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
");
        jQuery("#huge_it_dots_" + huge_it_current_key_<?php 
    echo $sliderID;
    ?>
 + "_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
");
          return huge_it_fallback_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction);
		  
        }
        huge_it_trans_in_progress_<?php 
    echo $sliderID;
    ?>
 = true;
        /* Set active thumbnail.*/
		jQuery(".huge_it_slideshow_dots_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
");
        jQuery("#huge_it_dots_" + huge_it_current_key_<?php 
    echo $sliderID;
    ?>
 + "_<?php 
    echo $sliderID;
    ?>
").removeClass("huge_it_slideshow_dots_deactive_<?php 
    echo $sliderID;
    ?>
").addClass("huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
");
        /* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/
        var count = (huge_it_transition_duration_<?php 
    echo $sliderID;
    ?>
) / (cols + rows);
        /* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/
        function huge_it_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
          var delay = (c + r) * count;
          /* Return a gridlet elem with styles for specific transition.*/
          return jQuery('<div class="huge_it_gridlet_<?php 
    echo $sliderID;
    ?>
" />').css({
            width : width,
            height : height,
            top : top,
            left : left,
            backgroundImage : 'url("' + src + '")',
            backgroundColor: jQuery(".huge_it_slideshow_image_wrap_<?php 
    echo $sliderID;
    ?>
").css("background-color"),
            /*backgroundColor: rgba(0, 0, 0, 0),*/
            backgroundRepeat: 'no-repeat',
            backgroundPosition : img_left + 'px ' + img_top + 'px',
            backgroundSize : imgWidth + 'px ' + imgHeight + 'px',
            transition : 'all ' + huge_it_transition_duration_<?php 
    echo $sliderID;
    ?>
 + 'ms ease-in-out ' + delay + 'ms',
            transform : 'none'
          });
        }
        /* Get the current slide's image.*/
        var cur_img = jQuery(current_image_class).find('img');
        /* Create a grid to hold the gridlets.*/
        var grid = jQuery('<div />').addClass('huge_it_grid_<?php 
    echo $sliderID;
    ?>
');
        /* Prepend the grid to the next slide (i.e. so it's above the slide image).*/
        jQuery(current_image_class).prepend(grid);
        /* vars to calculate positioning/size of gridlets*/
        var cont = jQuery(".huge_it_slide_bg_<?php 
    echo $sliderID;
    ?>
");
        var imgWidth = cur_img.width();
        var imgHeight = cur_img.height();
        var contWidth = cont.width(),
            contHeight = cont.height(),
            imgSrc = cur_img.attr('src'),/*.replace('/thumb', ''),*/
            colWidth = Math.floor(contWidth / cols),
            rowHeight = Math.floor(contHeight / rows),
            colRemainder = contWidth - (cols * colWidth),
            colAdd = Math.ceil(colRemainder / cols),
            rowRemainder = contHeight - (rows * rowHeight),
            rowAdd = Math.ceil(rowRemainder / rows),
            leftDist = 0,
            img_leftDist = (jQuery(".huge_it_slide_bg_<?php 
    echo $sliderID;
    ?>
").width() - cur_img.width()) / 2;
        /* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/
        tx = tx === 'auto' ? contWidth : tx;
        tx = tx === 'min-auto' ? - contWidth : tx;
        ty = ty === 'auto' ? contHeight : ty;
        ty = ty === 'min-auto' ? - contHeight : ty;
        /* Loop through cols*/
        for (var i = 0; i < cols; i++) {
          var topDist = 0,
              img_topDst = (jQuery(".huge_it_slide_bg_<?php 
    echo $sliderID;
    ?>
").height() - cur_img.height()) / 2,
              newColWidth = colWidth;
          /* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/
          if (colRemainder > 0) {
            var add = colRemainder >= colAdd ? colAdd : colRemainder;
            newColWidth += add;
            colRemainder -= add;
          }
          /* Nested loop to create row gridlets for each col.*/
          for (var j = 0; j < rows; j++)  {
            var newRowHeight = rowHeight,
                newRowRemainder = rowRemainder;
            /* If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.*/
            if (newRowRemainder > 0) {
              add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
              newRowHeight += add;
              newRowRemainder -= add;
            }
            /* Create & append gridlet to grid.*/
            grid.append(huge_it_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j));
            topDist += newRowHeight;
            img_topDst -= newRowHeight;
          }
          img_leftDist -= newColWidth;
          leftDist += newColWidth;
        }
        /* Set event listener on last gridlet to finish transitioning.*/
        var last_gridlet = grid.children().last();
        /* Show grid & hide the image it replaces.*/
        grid.show();
        cur_img.css('opacity', 0);
        /* Add identifying classes to corner gridlets (useful if applying border radius).*/
        grid.children().first().addClass('rs-top-left');
        grid.children().last().addClass('rs-bottom-right');
        grid.children().eq(rows - 1).addClass('rs-bottom-left');
        grid.children().eq(- rows).addClass('rs-top-right');
        /* Execution steps.*/
        setTimeout(function () {
          grid.children().css({
            opacity: op,
            transform: 'rotate('+ ro +'deg) translateX('+ tx +'px) translateY('+ ty +'px) scale('+ sc +')'
          });
        }, 1);
        jQuery(next_image_class).css('opacity', 1);
        /* After transition.*/
        jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(huge_it_after_trans));
        function huge_it_after_trans() {
          jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
          jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
          cur_img.css('opacity', 1);
          grid.remove();
          huge_it_trans_in_progress_<?php 
    echo $sliderID;
    ?>
 = false;
          if (typeof event_stack_<?php 
    echo $sliderID;
    ?>
 !== 'undefined' && event_stack_<?php 
    echo $sliderID;
    ?>
.length > 0) {
            key = event_stack_<?php 
    echo $sliderID;
    ?>
[0].split("-");
            event_stack_<?php 
    echo $sliderID;
    ?>
.shift();
            huge_it_change_image_<?php 
    echo $sliderID;
    ?>
(key[0], key[1], data_<?php 
    echo $sliderID;
    ?>
, true,false);
          }
        }
      }
      function huge_it_sliceH_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        if (direction == 'right') {
          var translateX = 'min-auto';
        }
        else if (direction == 'left') {
          var translateX = 'auto';
        }
        huge_it_grid_<?php 
    echo $sliderID;
    ?>
(1, 8, 0, translateX, 0, 1, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_sliceV_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        if (direction == 'right') {
          var translateY = 'min-auto';
        }
        else if (direction == 'left') {
          var translateY = 'auto';
        }
        huge_it_grid_<?php 
    echo $sliderID;
    ?>
(10, 1, 0, 0, translateY, 1, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_slideV_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        if (direction == 'right') {
          var translateY = 'auto';
        }
        else if (direction == 'left') {
          var translateY = 'min-auto';
        }
        huge_it_grid_<?php 
    echo $sliderID;
    ?>
(1, 1, 0, 0, translateY, 1, 1, current_image_class, next_image_class, direction);
      }
      function huge_it_slideH_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        if (direction == 'right') {
          var translateX = 'min-auto';
        }
        else if (direction == 'left') {
          var translateX = 'auto';
        }
        huge_it_grid_<?php 
    echo $sliderID;
    ?>
(1, 1, 0, translateX, 0, 1, 1, current_image_class, next_image_class, direction);
      }
      function huge_it_scaleOut_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php 
    echo $sliderID;
    ?>
(1, 1, 0, 0, 0, 1.5, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_scaleIn_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php 
    echo $sliderID;
    ?>
(1, 1, 0, 0, 0, 0.5, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_blockScale_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php 
    echo $sliderID;
    ?>
(8, 6, 0, 0, 0, .6, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_kaleidoscope_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php 
    echo $sliderID;
    ?>
(10, 8, 0, 0, 0, 1, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_fan_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        if (direction == 'right') {
          var rotate = 45;
          var translateX = 100;
        }
        else if (direction == 'left') {
          var rotate = -45;
          var translateX = -100;
        }
        huge_it_grid_<?php 
    echo $sliderID;
    ?>
(1, 10, rotate, translateX, 0, 1, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_blindV_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php 
    echo $sliderID;
    ?>
(1, 8, 0, 0, 0, .7, 0, current_image_class, next_image_class);
      }
      function huge_it_blindH_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php 
    echo $sliderID;
    ?>
(10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class);
      }
      function huge_it_random_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction) {
        var anims = ['sliceH', 'sliceV', 'slideH', 'slideV', 'scaleOut', 'scaleIn', 'blockScale', 'kaleidoscope', 'fan', 'blindH', 'blindV'];
        /* Pick a random transition from the anims array.*/
        this["huge_it_" + anims[Math.floor(Math.random() * anims.length)] + "_<?php 
    echo $sliderID;
    ?>
"](current_image_class, next_image_class, direction);
      }
      
      function iterator_<?php 
    echo $sliderID;
    ?>
() {
        var iterator = 1;

        return iterator;
     }
	 
     function huge_it_change_image_<?php 
    echo $sliderID;
    ?>
(current_key, key, data_<?php 
    echo $sliderID;
    ?>
, from_effect,clicked) {
		
        if (data_<?php 
    echo $sliderID;
    ?>
[key]) {
		
			if(huge_video_playing['video_is_playing_'+<?php 
    echo $sliderID;
    ?>
] && !clicked){
				return false;
			}
         
		 
		 
          if (!from_effect) {
            // Change image key.
            jQuery("#huge_it_current_image_key_<?php 
    echo $sliderID;
    ?>
").val(key);
             // if (current_key == '-2') { /* Dots.*/
				current_key = jQuery(".huge_it_slideshow_dots_active_<?php 
    echo $sliderID;
    ?>
").attr("data-image_key");
			//  }
          }

          if (huge_it_trans_in_progress_<?php 
    echo $sliderID;
    ?>
) {
			//errorlogjQuery(".huge_it_slideshow_image_wrap_<?php 
    echo $sliderID;
    ?>
").after(" --IN TRANSACTION-- <br />");
            event_stack_<?php 
    echo $sliderID;
    ?>
.push(current_key + '-' + key);
            return;
          }
		  
          var direction = 'right';
          if (huge_it_current_key_<?php 
    echo $sliderID;
    ?>
 > key) {
            var direction = 'left';
          }
          else if (huge_it_current_key_<?php 
    echo $sliderID;
    ?>
 == key) {
            return false;
          }
         
          // Set active thumbnail position.
      
          huge_it_current_key_<?php 
    echo $sliderID;
    ?>
 = key;
          //Change image id, title, description.
          jQuery("#huge_it_slideshow_image_<?php 
    echo $sliderID;
    ?>
").attr('data-image_id', data_<?php 
    echo $sliderID;
    ?>
[key]["id"]);
		  
		  
		  jQuery(".huge_it_slideshow_title_text_<?php 
    echo $sliderID;
    ?>
").html(data_<?php 
    echo $sliderID;
    ?>
[key]["alt"]);
          jQuery(".huge_it_slideshow_description_text_<?php 
    echo $sliderID;
    ?>
").html(data_<?php 
    echo $sliderID;
    ?>
[key]["description"]);
        
		  var current_image_class = "#image_id_<?php 
    echo $sliderID;
    ?>
_" + data_<?php 
    echo $sliderID;
    ?>
[current_key]["id"];
          var next_image_class = "#image_id_<?php 
    echo $sliderID;
    ?>
_" + data_<?php 
    echo $sliderID;
    ?>
[key]["id"];
          
		  
		
		 if(jQuery(current_image_class).find('.huge_it_video_frame_<?php 
    echo $sliderID;
    ?>
').length>0) {
			var streffect='<?php 
    echo $slidereffect;
    ?>
';
			if(streffect=="cubeV" || streffect=="cubeH" || streffect=="none" || streffect=="fade"){
				huge_it_<?php 
    echo $slidereffect;
    ?>
_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction);
			}else{	
				huge_it_fade_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction);
			}	
		  }else{	
				huge_it_<?php 
    echo $slidereffect;
    ?>
_<?php 
    echo $sliderID;
    ?>
(current_image_class, next_image_class, direction);
		  }	
		  
		  
		jQuery('.huge_it_slideshow_title_text_<?php 
    echo $sliderID;
    ?>
').removeClass('none');
		if(jQuery('.huge_it_slideshow_title_text_<?php 
    echo $sliderID;
    ?>
').html()==""){jQuery('.huge_it_slideshow_title_text_<?php 
    echo $sliderID;
    ?>
').addClass('none');}

		jQuery('.huge_it_slideshow_description_text_<?php 
    echo $sliderID;
    ?>
').removeClass('none');
		if(jQuery('.huge_it_slideshow_description_text_<?php 
    echo $sliderID;
    ?>
').html()==""){jQuery('.huge_it_slideshow_description_text_<?php 
    echo $sliderID;
    ?>
').addClass('none');}
	  
		  
		  
		  jQuery(current_image_class).find('.huge_it_slideshow_title_text_<?php 
    echo $sliderID;
    ?>
').addClass('none');
		  jQuery(current_image_class).find('.huge_it_slideshow_description_text_<?php 
    echo $sliderID;
    ?>
').addClass('none');
		
		

		  
		  //errorlogjQuery(".huge_it_slideshow_image_wrap_<?php 
    echo $sliderID;
    ?>
").after("--cur-key="+current_key+" --cur-img-class="+current_image_class+" nxt-img-class="+next_image_class+"--");
			 huge_it_move_dots_<?php 
    echo $sliderID;
    ?>
();
			<?php 
    foreach ($images as $key => $image_row) {
        if ($image_row->sl_type == "video" and strpos($image_row->image_url, 'youtube') !== false) {
            ?>
				stopYoutubeVideo();
			<?php 
        }
    }
    ?>
			window.clearInterval(huge_interval['huge_it_playInterval_'+<?php 
    echo $sliderID;
    ?>
]);
			play_<?php 
    echo $sliderID;
    ?>
();
        }

      }
	   var staticthumbWidth;
      jQuery(window).load(function(){
      	 staticthumbWidth=jQuery('#huge_it_thumb_slider>li').width()
	  	
      })
     function huge_it_popup_resize_<?php 
    echo $sliderID;
    ?>
() {

		var staticsliderwidth=<?php 
    echo $sliderwidth;
    ?>
;
		var sliderwidth=<?php 
    echo $sliderwidth;
    ?>
;
		
		var thumbWidth=jQuery(".huge_it_slideshow_thumbnails_<?php 
    echo $sliderID;
    ?>
").width();
		
		//alert(thumbHeight)
		//alert(thumbWidth/2)
		var bodyWidth=jQuery(window).width();
        var parentWidth = jQuery(".huge_it_slideshow_image_wrap_<?php 
    echo $sliderID;
    ?>
").parent().width();
		//if responsive js late responsive.js @  take body size and not parent div
		jQuery(".huge_it_slideshow_thumbnails_<?php 
    echo $sliderID;
    ?>
").css({height: <?php 
    echo $paramssld['slider_thumb_height'];
    ?>
});
		if(sliderwidth>parentWidth){sliderwidth=parentWidth;}
		if(sliderwidth>bodyWidth){sliderwidth=bodyWidth;}
		var str=(<?php 
    echo $sliderheight;
    ?>
/staticsliderwidth); 
		
			
			jQuery(".huge_it_slideshow_thumbnails_<?php 
    echo $sliderID;
    ?>
").css({width: thumbWidth});
			
				var str2=(<?php 
    echo $paramssld['slider_thumb_height'];
    ?>
/staticthumbWidth);
			
			jQuery(".huge_it_slideshow_thumbnails_<?php 
    echo $sliderID;
    ?>
").css({height: thumbWidth*str2});
			jQuery(".bx-viewport").css({height: thumbWidth*str2});
			
			
			
		
		
		
		jQuery(".huge_it_slideshow_image_wrap_<?php 
    echo $sliderID;
    ?>
").css({width: (sliderwidth)});
		jQuery(".huge_it_slideshow_image_wrap_<?php 
    echo $sliderID;
    ?>
").css({height: ((sliderwidth) * str)});
		
		jQuery(".huge_it_slideshow_image_container_<?php 
    echo $sliderID;
    ?>
").css({width: (sliderwidth)});
		jQuery(".huge_it_slideshow_image_container_<?php 
    echo $sliderID;
    ?>
").css({height: ((sliderwidth) * str)});
			
		if("<?php 
    echo $slideshow_title_position[1];
    ?>
"=="middle"){var titlemargintopminus=jQuery(".huge_it_slideshow_title_text_<?php 
    echo $sliderID;
    ?>
").outerHeight()/2;}		
		if("<?php 
    echo $slideshow_title_position[0];
    ?>
"=="center"){var titlemarginleftminus=jQuery(".huge_it_slideshow_title_text_<?php 
    echo $sliderID;
    ?>
").outerWidth()/2;}		
		jQuery(".huge_it_slideshow_title_text_<?php 
    echo $sliderID;
    ?>
").css({cssText: "margin-top:-" + titlemargintopminus + "px; margin-left:-"+titlemarginleftminus+"px;"});
		
		if("<?php 
    echo $slideshow_description_position[1];
    ?>
"=="middle"){var descriptionmargintopminus=jQuery(".huge_it_slideshow_description_text_<?php 
    echo $sliderID;
    ?>
").outerHeight()/2;}	
		if("<?php 
    echo $slideshow_description_position[0];
    ?>
"=="center"){var descriptionmarginleftminus=jQuery(".huge_it_slideshow_description_text_<?php 
    echo $sliderID;
    ?>
").outerWidth()/2;}
		jQuery(".huge_it_slideshow_description_text_<?php 
    echo $sliderID;
    ?>
").css({cssText: "margin-top:-" + descriptionmargintopminus + "px; margin-left:-"+descriptionmarginleftminus+"px;"});
		        jQuery("#huge_it_loading_image_<?php 
    echo $sliderID;
    ?>
").css({display: "none"});
                jQuery(".huge_it_slideshow_image_wrap1_<?php 
    echo $sliderID;
    ?>
").css({display: "block"});
				jQuery(".huge_it_slideshow_image_wrap_<?php 
    echo $sliderID;
    ?>
").removeClass("nocolor");

		
		
		if("<?php 
    echo $paramssld['slider_crop_image'];
    ?>
"=="resize"){
			jQuery(".huge_it_slideshow_image_<?php 
    echo $sliderID;
    ?>
,  .huge_it_slideshow_image_container_<?php 
    echo $sliderID;
    ?>
 img").css({
				cssText: "width:" + sliderwidth + "px; height:" + ((sliderwidth) * str)	+"px;"
			});
		}else {
			jQuery(".huge_it_slideshow_image_<?php 
    echo $sliderID;
    ?>
,.huge_it_slideshow_image_item2_<?php 
    echo $sliderID;
    ?>
").css({
			cssText: "max-width: " + sliderwidth + "px !important; max-height: " + (sliderwidth * str) + "px !important;"
		  });
		}
		
		jQuery('.huge_it_video_frame_<?php 
    echo $sliderID;
    ?>
').each(function (e) {
          jQuery(this).width(sliderwidth);
          jQuery(this).height(sliderwidth * str);
        });
      }
      
      jQuery(window).load(function () {
		jQuery(window).resize(function() {
			huge_it_popup_resize_<?php 
    echo $sliderID;
    ?>
();
		});
		
		jQuery('#huge_it_slideshow_left_<?php 
    echo $sliderID;
    ?>
').on('click',function(){
			huge_it_change_image_<?php 
    echo $sliderID;
    ?>
(parseInt(jQuery('#huge_it_current_image_key_<?php 
    echo $sliderID;
    ?>
').val()), (parseInt(jQuery('#huge_it_current_image_key_<?php 
    echo $sliderID;
    ?>
').val()) - iterator_<?php 
    echo $sliderID;
    ?>
()) >= 0 ? (parseInt(jQuery('#huge_it_current_image_key_<?php 
    echo $sliderID;
    ?>
').val()) - iterator_<?php 
    echo $sliderID;
    ?>
()) % data_<?php 
    echo $sliderID;
    ?>
.length : data_<?php 
    echo $sliderID;
    ?>
.length - 1, data_<?php 
    echo $sliderID;
    ?>
,false,true);
			return false;
		});
		
		jQuery('#huge_it_slideshow_right_<?php 
    echo $sliderID;
    ?>
').on('click',function(){
			huge_it_change_image_<?php 
    echo $sliderID;
    ?>
(parseInt(jQuery('#huge_it_current_image_key_<?php 
    echo $sliderID;
    ?>
').val()), (parseInt(jQuery('#huge_it_current_image_key_<?php 
    echo $sliderID;
    ?>
').val()) + iterator_<?php 
    echo $sliderID;
    ?>
()) % data_<?php 
    echo $sliderID;
    ?>
.length, data_<?php 
    echo $sliderID;
    ?>
,false,true);
			return false;
		});
	

		
	
		
		huge_it_popup_resize_<?php 
    echo $sliderID;
    ?>
();
        /* Disable right click.*/
        jQuery('div[id^="huge_it_container"]').bind("contextmenu", function () {
          return false;
        });
        			
		/*HOVER SLIDESHOW*/
		jQuery("#huge_it_slideshow_image_container_<?php 
    echo $sliderID;
    ?>
, .huge_it_slideshow_image_container_<?php 
    echo $sliderID;
    ?>
, .huge_it_slideshow_dots_container_<?php 
    echo $sliderID;
    ?>
,#huge_it_slideshow_right_<?php 
    echo $sliderID;
    ?>
,#huge_it_slideshow_left_<?php 
    echo $sliderID;
    ?>
").hover(function(){
			//errorlogjQuery(".huge_it_slideshow_image_wrap_<?php 
    echo $sliderID;
    ?>
").after(" -- hover -- <br /> ");
			jQuery("#huge_it_slideshow_right_<?php 
    echo $sliderID;
    ?>
").css({'display':'inline'});
			jQuery("#huge_it_slideshow_left_<?php 
    echo $sliderID;
    ?>
").css({'display':'inline'});
		},function(){
			jQuery("#huge_it_slideshow_right_<?php 
    echo $sliderID;
    ?>
").css({'display':'none'});
			jQuery("#huge_it_slideshow_left_<?php 
    echo $sliderID;
    ?>
").css({'display':'none'});
		});
		var pausehover="<?php 
    echo $sliderpauseonhover;
    ?>
";
		if(pausehover=="on"){
			jQuery("#huge_it_slideshow_image_container_<?php 
    echo $sliderID;
    ?>
, .huge_it_slideshow_image_container_<?php 
    echo $sliderID;
    ?>
").hover(function(){
				window.clearInterval(huge_interval['huge_it_playInterval_'+<?php 
    echo $sliderID;
    ?>
]);
			},function(){
				window.clearInterval(huge_interval['huge_it_playInterval_'+<?php 
    echo $sliderID;
    ?>
]);
				play_<?php 
    echo $sliderID;
    ?>
();
			});		
		}	
          play_<?php 
    echo $sliderID;
    ?>
();        
      });
		//var huge_play={};

      function play_<?php 
    echo $sliderID;
    ?>
(){	   
        /* Play.*/
		//errorlogjQuery(".huge_it_slideshow_image_wrap_<?php 
    echo $sliderID;
    ?>
").after(" -- paly  ---- ");
        huge_interval['huge_it_playInterval_'+<?php 
    echo $sliderID;
    ?>
] = setInterval(function () {
			//errorlogjQuery(".huge_it_slideshow_image_wrap_<?php 
    echo $sliderID;
    ?>
").after(" -- time left ---- ");
          var iterator = 1;
          huge_it_change_image_<?php 
    echo $sliderID;
    ?>
(parseInt(jQuery('#huge_it_current_image_key_<?php 
    echo $sliderID;
    ?>
').val()), (parseInt(jQuery('#huge_it_current_image_key_<?php 
    echo $sliderID;
    ?>
').val()) + iterator) % data_<?php 
    echo $sliderID;
    ?>
.length, data_<?php 
    echo $sliderID;
    ?>
,false,false);
        }, '<?php 
    echo $slidepausetime;
    ?>
');
      }
	  
      jQuery(window).focus(function() {
       /*event_stack_<?php 
    echo $sliderID;
    ?>
 = [];*/
        var i_<?php 
    echo $sliderID;
    ?>
 = 0;
        jQuery(".huge_it_slider_<?php 
    echo $sliderID;
    ?>
").children("div").each(function () {
          if (jQuery(this).css('opacity') == 1) {
            jQuery("#huge_it_current_image_key_<?php 
    echo $sliderID;
    ?>
").val(i_<?php 
    echo $sliderID;
    ?>
);
          }
          i_<?php 
    echo $sliderID;
    ?>
++;
        });
      });
      jQuery(window).blur(function() {
        event_stack_<?php 
    echo $sliderID;
    ?>
 = [];
     //   window.clearInterval(huge_interval['huge_it_playInterval_'+<?php 
    echo $sliderID;
    ?>
]);
      });      
    </script>
<style>
	.thumb_image{
		  position: absolute;
		  width: 100%;
		  height: 100%;
		  top: 0;
		  left:0;
	}
	.entry-content a{
		border-bottom: none !important;
	}
	.play-button-slider{
		top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
	}
	.youtube-icon { position: absolute;
    
    background:url(<?php 
    echo plugin_dir_url(__FILE__);
    ?>
images/play.youtube.png) center center no-repeat;background-size:14%;}
</style>
	<?php 
    $args = array('numberposts' => 10, 'offset' => 0, 'category' => 0, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => 'draft, publish, future, pending, private', 'suppress_filters' => true);
    $recent_posts = wp_get_recent_posts($args, ARRAY_A);
    //print_r($recent_posts);
    //echo get_the_post_thumbnail(1, 'thumbnail');
    $image = wp_get_attachment_image_src(get_post_thumbnail_id(1), 'thumbnail');
    ?>

<?php 
    if ($sliderloadingicon == "on") {
        ?>
<div class="huge_it_slideshow_image_wrap_<?php 
        echo $sliderID;
        ?>
 nocolor">
<?php 
    } else {
        ?>
<div class="huge_it_slideshow_image_wrap_<?php 
        echo $sliderID;
        ?>
 ">
<?php 
    }
    ?>
	<?php 
    if ($sliderloadingicon == "on") {
        ?>
		<div id="huge_it_loading_image_<?php 
        echo $sliderID;
        ?>
" class="display" ><img  src="<?php 
        echo plugins_url('', __FILE__) . '/Front_images/loading/loading' . $paramssld["loading_icon_type"] . '.gif';
        ?>
" alt="" /> </div>
		<div class="huge_it_slideshow_image_wrap1_<?php 
        echo $sliderID;
        ?>
 nodisplay">
	<?php 
    } else {
        ?>
		<div id="huge_it_loading_image_<?php 
        echo $sliderID;
        ?>
" class="nodisplay"> <img src="<?php 
        echo plugins_url('', __FILE__) . '/Front_images/loading/loading' . $paramssld["loading_icon_type"] . '.gif';
        ?>
"  alt="" width="100" height="100" style=" margin: 0px auto;" /> </div>
		<div class="huge_it_slideshow_image_wrap1_<?php 
        echo $sliderID;
        ?>
" class="display">
	<?php 
    }
    ?>
      <?php 
    $current_pos = 0;
    ?>
      
		<!-- ##########################DOTS######################### -->
        <div class="huge_it_slideshow_dots_container_<?php 
    echo $sliderID;
    ?>
">
			  <div class="huge_it_slideshow_dots_thumbnails_<?php 
    echo $sliderID;
    ?>
">
				<?php 
    $current_image_id = 0;
    $current_pos = 0;
    $current_key = 0;
    $stri = 0;
    foreach ($images as $key => $image_row) {
        $imagerowstype = $image_row->sl_type;
        if ($image_row->sl_type == '') {
            $imagerowstype = 'image';
        }
        switch ($imagerowstype) {
            case 'image':
                if ($image_row->id == $current_image_id) {
                    $current_pos = $stri;
                    $current_key = $stri;
                }
                ?>
								<div id="huge_it_dots_<?php 
                echo $stri;
                ?>
_<?php 
                echo $sliderID;
                ?>
" class="huge_it_slideshow_dots_<?php 
                echo $sliderID;
                ?>
 <?php 
                echo $key == $current_image_id ? 'huge_it_slideshow_dots_active_' . $sliderID : 'huge_it_slideshow_dots_deactive_' . $sliderID;
                ?>
" onclick="if(jQuery(this).hasClass('huge_it_slideshow_dots_active_<?php 
                echo $sliderID;
                ?>
')) { return false; } huge_it_change_image_<?php 
                echo $sliderID;
                ?>
(parseInt(jQuery('#huge_it_current_image_key_<?php 
                echo $sliderID;
                ?>
').val()), '<?php 
                echo $stri;
                ?>
', data_<?php 
                echo $sliderID;
                ?>
,false,true);return false;" data-image_id="<?php 
                echo $image_row->id;
                ?>
" data-image_key="<?php 
                echo $stri;
                ?>
"></div>
							<?php 
                $stri++;
                break;
            case 'video':
                if ($image_row->id == $current_image_id) {
                    $current_pos = $stri;
                    $current_key = $stri;
                }
                ?>
								<div id="huge_it_dots_<?php 
                echo $stri;
                ?>
_<?php 
                echo $sliderID;
                ?>
" class="huge_it_slideshow_dots_<?php 
                echo $sliderID;
                ?>
 <?php 
                echo $key == $current_image_id ? 'huge_it_slideshow_dots_active_' . $sliderID : 'huge_it_slideshow_dots_deactive_' . $sliderID;
                ?>
" onclick="if(jQuery(this).hasClass('huge_it_slideshow_dots_active_<?php 
                echo $sliderID;
                ?>
')) { return false; } huge_it_change_image_<?php 
                echo $sliderID;
                ?>
(parseInt(jQuery('#huge_it_current_image_key_<?php 
                echo $sliderID;
                ?>
').val()), '<?php 
                echo $stri;
                ?>
', data_<?php 
                echo $sliderID;
                ?>
,false,true);return false;" data-image_id="<?php 
                echo $image_row->id;
                ?>
" data-image_key="<?php 
                echo $stri;
                ?>
"></div>
							<?php 
                $stri++;
                break;
            case 'last_posts':
                $keyForStoping = 0;
                foreach ($recent_posts as $lkeys => $last_posts) {
                    if ($image_row->name == "0") {
                        if ($lkeys < $image_row->sl_url) {
                            if (get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != '') {
                                $imagethumb = wp_get_attachment_image_src(get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true);
                                if ($image_row->id == $current_image_id) {
                                    $current_pos = $stri;
                                    $current_key = $stri;
                                }
                                ?>
                                                                            <div id="huge_it_dots_<?php 
                                echo $stri;
                                ?>
_<?php 
                                echo $sliderID;
                                ?>
" class="huge_it_slideshow_dots_<?php 
                                echo $sliderID;
                                ?>
 <?php 
                                echo $stri == $current_image_id ? 'huge_it_slideshow_dots_active_' . $sliderID : 'huge_it_slideshow_dots_deactive_' . $sliderID;
                                ?>
" onclick="if(jQuery(this).hasClass('huge_it_slideshow_dots_active_<?php 
                                echo $sliderID;
                                ?>
')) { return false; } huge_it_change_image_<?php 
                                echo $sliderID;
                                ?>
(parseInt(jQuery('#huge_it_current_image_key_<?php 
                                echo $sliderID;
                                ?>
').val()), '<?php 
                                echo $stri;
                                ?>
', data_<?php 
                                echo $sliderID;
                                ?>
,false,true);return false;" data-image_id="<?php 
                                echo $image_row->id;
                                ?>
" data-image_key="<?php 
                                echo $stri;
                                ?>
"></div>
                                                                    <?php 
                                $stri++;
                            }
                        }
                    } else {
                        $category_id = get_cat_ID($image_row->name);
                        //       USER CHOOSED CATEGORY
                        $category_id_from_posts = wp_get_post_categories($last_posts['ID']);
                        //       GETTING ALL CATEGORIES FOR THIS POST
                        if ($keyForStoping < $image_row->sl_url) {
                            if (in_array($category_id, $category_id_from_posts)) {
                                if (get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != '') {
                                    $keyForStoping++;
                                    $imagethumb = wp_get_attachment_image_src(get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true);
                                    if ($image_row->id == $current_image_id) {
                                        $current_pos = $stri;
                                        $current_key = $stri;
                                    }
                                    ?>
                                                                                        <div id="huge_it_dots_<?php 
                                    echo $stri;
                                    ?>
_<?php 
                                    echo $sliderID;
                                    ?>
" class="huge_it_slideshow_dots_<?php 
                                    echo $sliderID;
                                    ?>
 <?php 
                                    echo $stri == $current_image_id ? 'huge_it_slideshow_dots_active_' . $sliderID : 'huge_it_slideshow_dots_deactive_' . $sliderID;
                                    ?>
" onclick="if(jQuery(this).hasClass('huge_it_slideshow_dots_active_<?php 
                                    echo $sliderID;
                                    ?>
')) { return false; } huge_it_change_image_<?php 
                                    echo $sliderID;
                                    ?>
(parseInt(jQuery('#huge_it_current_image_key_<?php 
                                    echo $sliderID;
                                    ?>
').val()), '<?php 
                                    echo $stri;
                                    ?>
', data_<?php 
                                    echo $sliderID;
                                    ?>
,false,true);return false;" data-image_id="<?php 
                                    echo $image_row->id;
                                    ?>
" data-image_key="<?php 
                                    echo $stri;
                                    ?>
"></div>
                                                                                <?php 
                                    $stri++;
                                }
                            }
                        }
                    }
                }
                break;
        }
    }
    ?>
			  </div>
			
			<?php 
    if ($paramssld['slider_show_arrows'] == "on") {
        ?>
				<a id="huge_it_slideshow_left_<?php 
        echo $sliderID;
        ?>
" href="#">
					<div id="huge_it_slideshow_left-ico_<?php 
        echo $sliderID;
        ?>
">
					<div><i class="huge_it_slideshow_prev_btn_<?php 
        echo $sliderID;
        ?>
 fa"></i></div></div>
				</a>
				
				<a id="huge_it_slideshow_right_<?php 
        echo $sliderID;
        ?>
" href="#">
					<div id="huge_it_slideshow_right-ico_<?php 
        echo $sliderID;
        ?>
">
					<div><i class="huge_it_slideshow_next_btn_<?php 
        echo $sliderID;
        ?>
 fa"></i></div></div>
				</a>
			<?php 
    }
    ?>
		</div>
	  <!-- ##########################IMAGES######################### -->

      <div id="huge_it_slideshow_image_container_<?php 
    echo $sliderID;
    ?>
" class="huge_it_slideshow_image_container_<?php 
    echo $sliderID;
    ?>
">        
        <div class="huge_it_slide_container_<?php 
    echo $sliderID;
    ?>
">
          <div class="huge_it_slide_bg_<?php 
    echo $sliderID;
    ?>
">
            <ul class="huge_it_slider_<?php 
    echo $sliderID;
    ?>
">
			  <?php 
    $i = 0;
    //                          var_dump($images);exit;
    foreach ($images as $key => $image_row) {
        $imagerowstype = $image_row->sl_type;
        if ($image_row->sl_type == '') {
            $imagerowstype = 'image';
        }
        switch ($imagerowstype) {
            case 'image':
                $target = "";
                /************Alt tag functions*********************/
                if (!function_exists('pippin_get_image_id')) {
                    function pippin_get_image_id($image_url)
                    {
                        global $wpdb;
                        $attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM {$wpdb->posts} WHERE guid='%s';", $image_url));
                        if ($attachment) {
                            return $attachment[0];
                        }
                    }
                }
                if (!function_exists('wp_get_attachment')) {
                    function wp_get_attachment($attachment_id)
                    {
                        $attachment = get_post($attachment_id);
                        return array('alt' => get_post_meta($attachment->ID, '_wp_attachment_image_alt', true), 'caption' => $attachment->post_excerpt, 'description' => $attachment->post_content, 'href' => get_permalink($attachment->ID), 'src' => $attachment->guid, 'title' => $attachment->post_title);
                    }
                }
                /**************************************************/
                ?>
					  <li class="huge_it_slideshow_image<?php 
                if ($i != $current_image_id) {
                    $current_key = $key;
                    echo '_second';
                }
                ?>
_item_<?php 
                echo $sliderID;
                ?>
" id="image_id_<?php 
                echo $sliderID . '_' . $i;
                ?>
">      
						<?php 
                if ($image_row->sl_url != "") {
                    if ($image_row->link_target == "on") {
                        $target = 'target="_blank"';
                    }
                    echo '<a href="' . $image_row->sl_url . '" ' . $target . '>';
                }
                ?>
                                                <?php 
                $idofatt = pippin_get_image_id($image_row->image_url);
                $somearray = wp_get_attachment($idofatt);
                ?>
						<img id="huge_it_slideshow_image_<?php 
                echo $sliderID;
                ?>
_<?php 
                echo $key;
                ?>
" class="huge_it_slideshow_image_<?php 
                echo $sliderID;
                ?>
" src="<?php 
                echo $image_row->image_url;
                ?>
"  alt="<?php 
                if ($image_row->name == "") {
                    echo $somearray['alt'];
                } else {
                    echo $image_row->name;
                }
                ?>
" data-image_id="<?php 
                echo $image_row->id;
                ?>
" />
						<?php 
                if ($image_row->sl_url != "") {
                    echo '</a>';
                }
                ?>
		
						<div class="huge_it_slideshow_title_text_<?php 
                echo $sliderID;
                ?>
 <?php 
                if (trim($image_row->name) == "") {
                    echo "none";
                }
                ?>
">
							<?php 
                echo $image_row->name;
                ?>
						</div>
						<div class="huge_it_slideshow_description_text_<?php 
                echo $sliderID;
                ?>
 <?php 
                if (trim($image_row->description) == "") {
                    echo "none";
                }
                ?>
">
							<?php 
                echo $image_row->description;
                ?>
						</div>
					  </li>
					  <?php 
                $i++;
                break;
            case 'last_posts':
                $keyForStoping = 0;
                foreach ($recent_posts as $lkeys => $last_posts) {
                    if ($image_row->name == "0") {
                        if ($lkeys < $image_row->sl_url) {
                            $imagethumb = wp_get_attachment_image_src(get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true);
                            if (get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != '') {
                                $target = "";
                                ?>
                                                      <li class="huge_it_slideshow_image<?php 
                                if ($i != $current_image_id) {
                                    $current_key = $key;
                                    echo '_second';
                                }
                                ?>
_item_<?php 
                                echo $sliderID;
                                ?>
" id="image_id_<?php 
                                echo $sliderID . '_' . $i;
                                ?>
">      
                                                            <?php 
                                if ($image_row->sl_postlink == "1") {
                                    if ($image_row->link_target == "on") {
                                        $target = 'target="_blank"';
                                    }
                                    echo '<a href="' . $last_posts["guid"] . '" ' . $target . '>';
                                }
                                ?>
                                                            <img id="huge_it_slideshow_image_<?php 
                                echo $sliderID;
                                ?>
_<?php 
                                echo $key;
                                ?>
" class="huge_it_slideshow_image_<?php 
                                echo $sliderID;
                                ?>
" src="<?php 
                                echo $imagethumb[0];
                                ?>
"  alt=" <?php 
                                echo $last_posts["post_title"];
                                ?>
" data-image_id="<?php 
                                echo $image_row->id;
                                ?>
" />
                                                            <?php 
                                if ($image_row->sl_postlink == "1") {
                                    echo '</a>';
                                }
                                ?>
		
                                                            <div class="huge_it_slideshow_title_text_<?php 
                                echo $sliderID;
                                ?>
 <?php 
                                if (trim($last_posts["post_title"]) == "") {
                                    echo "none";
                                }
                                if ($image_row->sl_stitle != "1") {
                                    echo " hidden";
                                }
                                ?>
">
                                                                            <?php 
                                echo $last_posts["post_title"];
                                ?>
                                                            </div>
                                                            <div class="huge_it_slideshow_description_text_<?php 
                                echo $sliderID;
                                ?>
 <?php 
                                if (trim($last_posts["post_content"]) == "") {
                                    echo "none";
                                }
                                if ($image_row->sl_sdesc != "1") {
                                    echo " hidden";
                                }
                                ?>
">
                                                                    <?php 
                                echo substr_replace($last_posts["post_content"], "", $image_row->description);
                                ?>
                                                            </div>
                                                     </li>
                                                      <?php 
                                $i++;
                            }
                        }
                    } else {
                        $category_id = get_cat_ID($image_row->name);
                        //       USER CHOOSED CATEGORY
                        $category_id_from_posts = wp_get_post_categories($last_posts['ID']);
                        //       GETTING ALL CATEGORIES FOR THIS POST
                        if ($keyForStoping < $image_row->sl_url) {
                            if (in_array($category_id, $category_id_from_posts)) {
                                $imagethumb = wp_get_attachment_image_src(get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true);
                                if (get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != '') {
                                    $keyForStoping++;
                                    $target = "";
                                    ?>
                                                          <li class="huge_it_slideshow_image<?php 
                                    if ($i != $current_image_id) {
                                        $current_key = $key;
                                        echo '_second';
                                    }
                                    ?>
_item_<?php 
                                    echo $sliderID;
                                    ?>
" id="image_id_<?php 
                                    echo $sliderID . '_' . $i;
                                    ?>
">      
                                                                <?php 
                                    if ($image_row->sl_postlink == "1") {
                                        if ($image_row->link_target == "on") {
                                            $target = 'target="_blank"';
                                        }
                                        echo '<a href="' . $last_posts["guid"] . '" ' . $target . '>';
                                    }
                                    ?>
                                                                <img id="huge_it_slideshow_image_<?php 
                                    echo $sliderID;
                                    ?>
" class="huge_it_slideshow_image_<?php 
                                    echo $sliderID;
                                    ?>
" src="<?php 
                                    echo $imagethumb[0];
                                    ?>
"  alt="<?php 
                                    echo $last_posts["post_title"];
                                    ?>
" data-image_id="<?php 
                                    echo $image_row->id;
                                    ?>
" />
                                                                <?php 
                                    if ($image_row->sl_postlink == "1") {
                                        echo '</a>';
                                    }
                                    ?>
		
                                                                <div class="huge_it_slideshow_title_text_<?php 
                                    echo $sliderID;
                                    ?>
 <?php 
                                    if (trim($last_posts["post_title"]) == "") {
                                        echo "none";
                                    }
                                    if ($image_row->sl_stitle != "1") {
                                        echo " hidden";
                                    }
                                    ?>
">
                                                                                <?php 
                                    echo $last_posts["post_title"];
                                    ?>
                                                                </div>
                                                                <div class="huge_it_slideshow_description_text_<?php 
                                    echo $sliderID;
                                    ?>
 <?php 
                                    if (trim($last_posts["post_content"]) == "") {
                                        echo "none";
                                    }
                                    if ($image_row->sl_sdesc != "1") {
                                        echo " hidden";
                                    }
                                    ?>
">
                                                                        <?php 
                                    echo substr_replace($last_posts["post_content"], "", $image_row->description);
                                    ?>
                                                                </div>
                                                         </li>
                                                          <?php 
                                    $i++;
                                }
                            }
                        }
                    }
                }
                break;
            case 'video':
                ?>
						<li  class="huge_it_slideshow_image<?php 
                if ($i != $current_image_id) {
                    $current_key = $key;
                    echo '_second';
                }
                ?>
_item_<?php 
                echo $sliderID;
                ?>
" id="image_id_<?php 
                echo $sliderID . '_' . $i;
                ?>
">      
							<?php 
                if (strpos($image_row->image_url, 'youtube') !== false || strpos($rowimages->image_url, 'youtu') !== false) {
                    $video_thumb_url = get_youtube_id_from_url($image_row->image_url);
                    ?>
									
									<div id="video_id_<?php 
                    echo $sliderID;
                    ?>
_<?php 
                    echo $key;
                    ?>
" class="huge_it_video_frame_<?php 
                    echo $sliderID;
                    ?>
"></div>
									<div class="thumb_wrapper" data-rowid="<?php 
                    echo $image_row->id;
                    ?>
" onclick="thevid=document.getElementById('video_id_<?php 
                    echo $sliderID;
                    ?>
_<?php 
                    echo $key;
                    ?>
'); thevid.style.display='block'; this.style.display='none'">
												<img  class="thumb_image" src="https://i.ytimg.com/vi/<?php 
                    echo $video_thumb_url;
                    ?>
/hqdefault.jpg">
												<div class="play-button-slider youtube-icon"></div>
									</div>
							<?php 
                } else {
                    $vimeo = $image_row->image_url;
                    $imgid = end(explode("/", $vimeo));
                    ?>
					
								<iframe id="player_<?php 
                    echo $key;
                    ?>
"  class="huge_it_video_frame_<?php 
                    echo $sliderID;
                    ?>
" src="//player.vimeo.com/video/<?php 
                    echo $imgid;
                    ?>
?api=1&player_id=player_<?php 
                    echo $key;
                    ?>
&showinfo=0&controls=0" frameborder="0" allowfullscreen></iframe>
							<?php 
                }
                ?>
						</li>
					<?php 
                $i++;
                break;
        }
    }
    ?>
            </ul>
          </div>
		  <input  type="hidden" id="huge_it_current_image_key_<?php 
    echo $sliderID;
    ?>
" value="0" />
        </div>
      </div>
	</div>
<!-- slider thumbs  -->

<script>
jQuery(document).ready(function($) {

		
	setInterval(function() {
	jQuery('.huge_it_slider_<?php 
    echo $sliderID;
    ?>
').find("li").each(function (){
		
  		if($(this).css("opacity") == "1"){

  			var img_id=$(this).attr('id');
  			jQuery('.huge_it_slideshow_thumbs_<?php 
    echo $sliderID;
    ?>
').each(function (){
  				//if ($(this).hasClass('bx-clone')){$(this).removeAttr('id')}
  				var allListElements = $( 'li[id='+img_id+']' );
  				
  				$(this).find(allListElements).not(".bx-clone").each(function() {
  					

  					jQuery('.huge_it_slideshow_thumbs_<?php 
    echo $sliderID;
    ?>
 li').find(".trans_back").css('background','rgba(255,255,255,0.3)');
  					$(this).find('.trans_back').css('background','none');

  						
  					
  				})
  				

  			
  			})
			
  		}
		
	})
},100)


	

})
</script>

	
</div>
<?php 
    if ($sliderthumbslider == 'thumbnails') {
        ?>
<div class="huge_it_slideshow_thumbs_container_<?php 
        echo $sliderID;
        ?>
">
			  <ul id="huge_it_thumb_slider" class="huge_it_slideshow_thumbs_<?php 
        echo $sliderID;
        ?>
">
				<?php 
        $i = 0;
        $current_image_id = 0;
        $current_pos = 0;
        $current_key = 0;
        $stri = 0;
        // foreach ($slider as $row => $value) {
        // 	$time=$row->description;
        // 	echo $time;
        // }
        foreach ($images as $key => $image_row) {
            $imagerowstype = $image_row->sl_type;
            ////////$imgurl
            if ($image_row->sl_type == '') {
                $imagerowstype = 'image';
            }
            switch ($imagerowstype) {
                case 'image':
                    if ($image_row->id == $current_image_id) {
                        $current_pos = $stri;
                        $current_key = $stri;
                    }
                    ?>
							
								<li id="image_id_<?php 
                    echo $sliderID . '_' . $i;
                    ?>
" class="huge_it_slideshow_thumbnails_<?php 
                    echo $sliderID;
                    ?>
" onclick="if(jQuery(this).hasClass('huge_it_slideshow_thumbnails_active_<?php 
                    echo $sliderID;
                    ?>
')) { return false; } huge_it_change_image_<?php 
                    echo $sliderID;
                    ?>
(parseInt(jQuery('#huge_it_current_image_key_<?php 
                    echo $sliderID;
                    ?>
').val()), '<?php 
                    echo $stri;
                    ?>
', data_<?php 
                    echo $sliderID;
                    ?>
,false,true);return false;" data-image_id="<?php 
                    echo $image_row->id;
                    ?>
" data-image_key="<?php 
                    echo $stri;
                    ?>
">
										<img class="sl_thumb_img" src="<?php 
                    echo $image_row->image_url;
                    ?>
" />
										<div class="trans_back" ></div>
										<input type="hidden" id="time" name="time" value="<?php 
                    echo $slidepausetime;
                    ?>
">
										
								</li>
							<?php 
                    $stri++;
                    $i++;
                    break;
                case 'video':
                    $url = $image_row->image_url;
                    if (!function_exists('get_youtube_id_from_url_slider_thumb')) {
                        function get_youtube_id_from_url_slider_thumb($url)
                        {
                            if (preg_match('%(?:youtube(?:-nocookie)?\\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\\.be/)([^"&?/ ]{11})%i', $url, $match)) {
                                return $match[1];
                            }
                        }
                    }
                    if (strpos($image_row->image_url, 'youtube') !== false || strpos($image_row->image_url, 'youtu') !== false) {
                        $video_thumb_url = get_youtube_id_from_url_slider_thumb($image_row->image_url);
                        $thumburl = '<img class="sl_thumb_img" src="http://img.youtube.com/vi/' . $video_thumb_url . '/mqdefault.jpg" alt="" />';
                        $liclass = "youtube";
                    } else {
                        if (strpos($image_row->image_url, 'vimeo') !== false) {
                            $liclass = "vimeo";
                            $vimeo = $image_row->image_url;
                            $imgid = end(explode("/", $vimeo));
                            $hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/" . $imgid . ".php"));
                            $imgsrc = $hash[0]['thumbnail_large'];
                            $thumburl = '<img src="' . $imgsrc . '" alt="" />';
                        }
                    }
                    if ($image_row->id == $current_image_id) {
                        $current_pos = $stri;
                        $current_key = $stri;
                    }
                    ?>
							<li id="image_id_<?php 
                    echo $sliderID . '_' . $i;
                    ?>
" class="huge_it_slideshow_thumbnails_<?php 
                    echo $sliderID;
                    ?>
" onclick="if(jQuery(this).hasClass('huge_it_slideshow_thumbnails_active_<?php 
                    echo $sliderID;
                    ?>
')) { return false; } huge_it_change_image_<?php 
                    echo $sliderID;
                    ?>
(parseInt(jQuery('#huge_it_current_image_key_<?php 
                    echo $sliderID;
                    ?>
').val()), '<?php 
                    echo $stri;
                    ?>
', data_<?php 
                    echo $sliderID;
                    ?>
,false,true);return false;" data-image_id="<?php 
                    echo $image_row->id;
                    ?>
" data-image_key="<?php 
                    echo $stri;
                    ?>
">
								<?php 
                    echo $thumburl;
                    ?>
								<div class="play-icon <?php 
                    echo $liclass;
                    ?>
"></div>
								<div class="trans_back" ></div>
								<input type="hidden" id="time" name="time" value="<?php 
                    echo $slidepausetime;
                    ?>
" slide="<?php 
                    echo $sliderID;
                    ?>
">
							</li>

								
							<?php 
                    $stri++;
                    $i++;
                    break;
                case 'last_posts':
                    $keyForStoping = 0;
                    foreach ($recent_posts as $lkeys => $last_posts) {
                        if ($image_row->name == "0") {
                            if ($lkeys < $image_row->sl_url) {
                                $imagethumb = wp_get_attachment_image_src(get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true);
                                if (get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != '') {
                                    $target = "";
                                    ?>
                                                      <li id="image_id_<?php 
                                    echo $sliderID . '_' . $i;
                                    ?>
" class="huge_it_slideshow_thumbnails_<?php 
                                    echo $sliderID;
                                    ?>
" onclick="if(jQuery(this).hasClass('huge_it_slideshow_thumbnails_active_<?php 
                                    echo $sliderID;
                                    ?>
')) { return false; } huge_it_change_image_<?php 
                                    echo $sliderID;
                                    ?>
(parseInt(jQuery('#huge_it_current_image_key_<?php 
                                    echo $sliderID;
                                    ?>
').val()), '<?php 
                                    echo $stri;
                                    ?>
', data_<?php 
                                    echo $sliderID;
                                    ?>
,false,true);return false;" data-image_id="<?php 
                                    echo $image_row->id;
                                    ?>
" data-image_key="<?php 
                                    echo $stri;
                                    ?>
">      
                                                            
                                                            <img class="sl_thumb_img" src="<?php 
                                    echo $imagethumb[0];
                                    ?>
"/>
                                                            <div class="trans_back" ></div>
															<input type="hidden" id="time" name="time" value="<?php 
                                    echo $slidepausetime;
                                    ?>
">		
                                                            
                                                     </li>
                                                      <?php 
                                    $i++;
                                }
                            }
                        } else {
                            $category_id = get_cat_ID($image_row->name);
                            //       USER CHOOSED CATEGORY
                            $category_id_from_posts = wp_get_post_categories($last_posts['ID']);
                            //       GETTING ALL CATEGORIES FOR THIS POST
                            if ($keyForStoping < $image_row->sl_url) {
                                if (in_array($category_id, $category_id_from_posts)) {
                                    $imagethumb = wp_get_attachment_image_src(get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true);
                                    if (get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != '') {
                                        $keyForStoping++;
                                        $target = "";
                                        ?>
                                                           <li id="image_id_<?php 
                                        echo $sliderID . '_' . $i;
                                        ?>
" class="huge_it_slideshow_thumbnails_<?php 
                                        echo $sliderID;
                                        ?>
" onclick="if(jQuery(this).hasClass('huge_it_slideshow_thumbnails_active_<?php 
                                        echo $sliderID;
                                        ?>
')) { return false; } huge_it_change_image_<?php 
                                        echo $sliderID;
                                        ?>
(parseInt(jQuery('#huge_it_current_image_key_<?php 
                                        echo $sliderID;
                                        ?>
').val()), '<?php 
                                        echo $stri;
                                        ?>
', data_<?php 
                                        echo $sliderID;
                                        ?>
,false,true);return false;" data-image_id="<?php 
                                        echo $image_row->id;
                                        ?>
" data-image_key="<?php 
                                        echo $stri;
                                        ?>
">        
                                                                
                                                                <img id="huge_it_slideshow_image_<?php 
                                        echo $sliderID;
                                        ?>
" class="huge_it_slideshow_image_<?php 
                                        echo $sliderID;
                                        ?>
" src="<?php 
                                        echo $imagethumb[0];
                                        ?>
"/>
                                                                <div class="trans_back" ></div>
																<input type="hidden" id="time" name="time" value="<?php 
                                        echo $slidepausetime;
                                        ?>
">		
                                                               
                                                         </li>
                                                          <?php 
                                        $i++;
                                    }
                                }
                            }
                        }
                    }
                    break;
            }
        }
        //print_r($count);
        ?>
					
			  </ul>

	</div>	
<?php 
    }
    ?>


	  <?php 
    return ob_get_clean();
}
コード例 #3
0
                        ?>
									
								</div>
							</div><!--work-item-->
							
						<?php 
                    } else {
                        if ($gallery_style == '5') {
                            ?>
							
							<div class="work-item style-3-alt">
								
								<?php 
                            echo $post_thumbnail['thumbnail'];
                            if ($attach_id > 0) {
                                $attachment_meta = wp_get_attachment($attach_id);
                            }
                            ?>
				
								<div class="work-info-bg"></div>
								<div class="work-info">
    				
									<div class="vert-center">
										<?php 
                            if ($attach_id > 0) {
                                ?>
											<?php 
                                if ($display_title_caption == 'true') {
                                    ?>
 
												
    function _lb41f3b28111_content($_l, $_args)
    {
        extract($_args);
        ?>

<?php 
        if (trim($post->content) != "") {
            ?>
<style>
   
    
</style>
<section class="section content-section">

<div id="container" class="subpage wrapper onecolumn">

	<div id="content" class="entry-content clearfix" role="main">
		<div class="content-wrapper clearfix">

			<header class="entry-title clearfix">
                            <h1 class="text-align-center"><?php 
            echo NTemplateHelpers::escapeHtml($post->title, ENT_NOQUOTES);
            ?>
</h1> 
                
                                                        <?php 
            /* The loop */
            while (have_posts()) {
                the_post();
                if (get_post_gallery()) {
                    $gallery = get_post_gallery(get_the_ID(), false);
                    $idsexp = explode(",", $gallery['ids']);
                    /* Loop through all the image and output them one by one */
                    foreach ($gallery['src'] as $key => $src) {
                        $attachment_meta = wp_get_attachment($idsexp[$key]);
                        $var[$key]['descricao'] = $attachment_meta["alt"];
                        $var[$key]['src'] = $src;
                        $var[$key]['grupo'] = $attachment_meta["caption"];
                    }
                    $arr = array();
                    foreach ($var as $v2) {
                        $arr[] = $v2['grupo'];
                    }
                    $arr2 = array_unique($arr);
                    foreach ($arr2 as $grupo) {
                        ?>
 <div class="clientes-1">
                                            <h2 class="clientes-2"><?php 
                        echo $grupo;
                        ?>
</h2>
                                        </div><?php 
                        $contador = 0;
                        foreach ($var as $key2 => $v) {
                            if ($v['grupo'] == $grupo) {
                                $contador++;
                                if ($contador % 3 == 0) {
                                    $last = 1;
                                } else {
                                    $last = 0;
                                }
                                ?>
                    <div class="clientes-3 <?php 
                                if ($last == 0) {
                                    ?>
 last-bloco <?php 
                                }
                                ?>
">
                        <div class="clientes-4">
                            <img src="<?php 
                                echo $v['src'];
                                ?>
" class="my-custom-class" alt="Gallery image" width="240" height="240" />
                        </div>
                        <div class="clientes-5">
                            <center><b><?php 
                                echo $v['descricao'];
                                ?>
</b></center>
                        </div>
                    </div>
                    
                    <?php 
                            }
                        }
                    }
                }
            }
            ?>

			</header>


        </div> <!-- /.content-wrapper -->

	</div> <!-- /#content -->

</div> <!-- /#container -->

</section>

<?php 
        }
        ?>

<?php 
    }
コード例 #5
0
ファイル: page-clientes.php プロジェクト: ssuhss/Begara
	<div id="content" class="entry-content clearfix" role="main">
		<div class="content-wrapper clearfix">

			<header class="entry-title clearfix">
                            <h1 class="text-align-center">{$post->title}</h1> 
                
                                                        <?php 
/* The loop */
while (have_posts()) {
    the_post();
    if (get_post_gallery()) {
        $gallery = get_post_gallery(get_the_ID(), false);
        $idsexp = explode(",", $gallery['ids']);
        /* Loop through all the image and output them one by one */
        foreach ($gallery['src'] as $key => $src) {
            $attachment_meta = wp_get_attachment($idsexp[$key]);
            $var[$key]['descricao'] = $attachment_meta["alt"];
            $var[$key]['src'] = $src;
            $var[$key]['grupo'] = $attachment_meta["caption"];
        }
        $arr = array();
        foreach ($var as $v2) {
            $arr[] = $v2['grupo'];
        }
        $arr2 = array_unique($arr);
        foreach ($arr2 as $grupo) {
            ?>
 <div class="clientes-1">
                                            <h2 class="clientes-2"><?php 
            echo $grupo;
            ?>
コード例 #6
0
        $vendorlistcolumn .= '<div class="marken-listing-col">';
    } elseif ($col % 10 == 0) {
        $vendorlistcolumn .= '</div><div class="marken-listing-col">';
    }
    $vendorlistcolumn .= "<div class='marken-index'>" . $currentAlpha . "</div>";
    $vendorlistcolumn .= "<div class='marken-liste'><ul>";
    foreach ($taxlist as $key => $value) {
        $stringfletter = ucfirst(substr($value->name, 0, 1));
        $getlogocheckval = get_woocommerce_term_meta($value->term_id, 'chkshowlogo', true);
        if ($currentAlpha == $stringfletter) {
            $term_link = get_term_link($value);
            if ($getlogocheckval == 0) {
                $vendorlistcolumn .= "<li><a href='" . esc_url($term_link) . "'>" . $value->name . "</a></li>";
            } else {
                $getImageurl = get_woocommerce_term_meta($value->term_id, 'header_logo', true);
                $attacharray = wp_get_attachment($getImageurl);
                $imagesrc = wp_get_attachment_image_src($getImageurl, 'single-post-thumbnail');
                $imgalt = $attacharray['alt'] != '' ? $attacharray['alt'] : $value->name;
                $vendorlistcolumn .= "<span class='marken-listing-logo'><a href='" . esc_url($term_link) . "'><img alt='" . $imgalt . "' src='" . $imagesrc[0] . "'/></a></span>";
            }
        }
    }
    $vendorlistcolumn .= "</ul></div>";
    $col++;
}
$vendorlistcolumn .= '</div>';
echo $vendorlistcolumn;
?>

	</section>
</div> 
コード例 #7
0
ファイル: single-extranet.php プロジェクト: brettex/pspark
                    ?>
 
                        <div class="section clear animate" data-type="<?php 
                    echo $section['section_type'][1];
                    ?>
">
                        <h6><? echo $section['section_title'][1]; ?></h6>
                        <?php 
                    if ($section['section_type'][1] == 'Design Comps' || $section['section_type'][1] == 'Demo Path') {
                        ?>
                        	<div class="gallery">
                            <?php 
                        foreach ($section['section_media_file'] as $media) {
                            //Grab the image assets
                            $image_id = get_attachment_id_from_src($media['original']);
                            $img_array = wp_get_attachment($image_id);
                            $thumb = wp_get_attachment_image($image_id, 'thumbnail');
                            $dataClass = $img_array['description'];
                            if ($section['section_type'][1] == 'Demo Path') {
                                $dataClass = "demo";
                            }
                            echo '<a href="' . $img_array['src'] . '" class="left thumbs" data-class="' . $dataClass . '">' . $thumb . '<br />' . $img_array['title'] . '</a>';
                        }
                        ?>
                            </div><!-- end gallery -->
                        <?php 
                    } else {
                        echo $section['section_asset_list'][1];
                    }
                    ?>
                        </div><!-- end section -->
コード例 #8
0
    ?>
<!-- RIGHT COL -->
	<div class="marken-detail-col-right">
		<div class="category-header"><h3>Produkte</h3></div>
	
		<?php 
    foreach ($prodArray->posts as $key => $value) {
        $id = $value->ID;
        $title = $value->post_title;
        $feat_image = get_post_thumbnail_id($id);
        $permalink = get_permalink($id);
        if ($feat_image) {
            $featarry = wp_get_attachment($feat_image);
            $divimage .= '<div class="marken-detail-produkt-image"><a href="' . $permalink . '" title="' . $title . '"><img alt="' . $featarry['alt'] . '" src="' . $featarry['src'] . '"/></a></div>';
        } else {
            $headimaglogoarray = wp_get_attachment($getHeaderLogo);
            $divimage .= '<div class="marken-detail-produkt-image"><a href="' . $permalink . '" title="' . $title . '"><img alt="' . $headimaglogoarray['alt'] . '" src="' . $headimaglogoarray['src'] . '"/></a></div>';
        }
    }
    echo $divimage;
    ?>
		<!-- IMAGE -->
		

	</div>
	<?php 
}
?>

</div>
<?php 
コード例 #9
0
    foreach ($post_attachments as $attachment) {
        $counter++;
        $active = '';
        if ($counter == 1 && $has_video != 1) {
            $active = " active ";
        } else {
            $active = " ";
        }
        $preview = wp_get_attachment_image_src($attachment->ID, 'wpestate_slider_thumb');
        if ($slider_size == 'full') {
            $full_img = wp_get_attachment_image_src($attachment->ID, 'listing_full_slider_1');
        } else {
            $full_img = wp_get_attachment_image_src($attachment->ID, 'listing_full_slider');
        }
        $full_prty = wp_get_attachment_image_src($attachment->ID, 'full');
        $attachment_meta = wp_get_attachment($attachment->ID);
        $indicators .= ' <li data-target="#carousel-listing" data-slide-to="' . ($counter - 1) . '" class="' . $active . '">
                                <div class="img_listings_overlay img_listings_overlay_last" ></div>
                                <img  src="' . $preview[0] . '"  alt="slider" />
                            </li>';
        $round_indicators .= ' <li data-target="#carousel-listing" data-slide-to="' . ($counter - 1) . '" class="' . $active . '"></li>';
        $slides .= '<div class="item ' . $active . '">
                            <a href="' . $full_img[0] . '" rel="data-fancybox-thumb" class="fancybox-thumb">
                                <img  src="' . $full_img[0] . '" data-original="' . $full_prty[0] . '" alt="' . $attachment_meta['alt'] . '" class="img-responsive" />
                            </a>
                        ';
        $slides .= '</div>';
    }
    // end foreach
    ?>
コード例 #10
0
ファイル: stripe-image_4x.php プロジェクト: ugurozer/little
<?php

$attachment1 = wp_get_attachment(get_sub_field("image_1"));
$attachment2 = wp_get_attachment(get_sub_field("image_2"));
$attachment3 = wp_get_attachment(get_sub_field("image_3"));
$attachment4 = wp_get_attachment(get_sub_field("image_4"));
?>

<div class="stripe image_4x">
	<div class="image first" data-stretch="<?php 
echo $attachment1[large];
?>
"></div>
	<div class="image second" data-stretch="<?php 
echo $attachment2[large];
?>
"></div>
	<div class="image third" data-stretch="<?php 
echo $attachment3[large];
?>
"></div>
	<div class="image fourth" data-stretch="<?php 
echo $attachment4[large];
?>
"></div>
</div>

<div class="stripe image_4x captions">

	<a href="<?php 
echo $attachment1[src];
コード例 #11
0
 /**
  * Start the element output.
  *
  * @see Walker::start_el()
  *
  * @since 3.0.0
  * @since 4.4.0 'nav_menu_item_args' filter was added.
  *
  * @param string $output Passed by reference. Used to append additional content.
  * @param object $item   Menu item data object.
  * @param int    $depth  Depth of menu item. Used for padding.
  * @param array  $args   An array of arguments. @see wp_nav_menu()
  * @param int    $id     Current item ID.
  */
 public function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
 {
     $indent = $depth ? str_repeat("\t", $depth) : '';
     $classes = empty($item->classes) ? array() : (array) $item->classes;
     $classes[] = 'menu-item-' . $item->ID;
     /**
      * Filter the arguments for a single nav menu item.
      *
      * @since 4.4.0
      *
      * @param array  $args  An array of arguments.
      * @param object $item  Menu item data object.
      * @param int    $depth Depth of menu item. Used for padding.
      */
     $args = apply_filters('nav_menu_item_args', $args, $item, $depth);
     /**
      * Filter the CSS class(es) applied to a menu item's list item element.
      *
      * @since 3.0.0
      * @since 4.1.0 The `$depth` parameter was added.
      *
      * @param array  $classes The CSS classes that are applied to the menu item's `<li>` element.
      * @param object $item    The current menu item.
      * @param array  $args    An array of {@see wp_nav_menu()} arguments.
      * @param int    $depth   Depth of menu item. Used for padding.
      */
     $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item, $args, $depth));
     $class_names = $class_names ? ' class="' . esc_attr($class_names) . '"' : '';
     /**
      * Filter the ID applied to a menu item's list item element.
      *
      * @since 3.0.1
      * @since 4.1.0 The `$depth` parameter was added.
      *
      * @param string $menu_id The ID that is applied to the menu item's `<li>` element.
      * @param object $item    The current menu item.
      * @param array  $args    An array of {@see wp_nav_menu()} arguments.
      * @param int    $depth   Depth of menu item. Used for padding.
      */
     $id = apply_filters('nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args, $depth);
     $id = $id ? ' id="' . esc_attr($id) . '"' : '';
     $data_submenu = '';
     $atts = array();
     if ($args->has_children) {
         $data_submenu = 'data-submenu="data-submenu"';
         $atts['data-trigger-submenu'] = 'data-trigger-submenu';
     }
     $output .= $indent . '<li' . $id . $class_names . $data_submenu . '>';
     $atts['title'] = !empty($item->title) ? $item->title : '';
     $atts['data-hover'] = !empty($item->title) ? $item->title : '';
     $atts['target'] = !empty($item->target) ? $item->target : '';
     $atts['rel'] = !empty($item->xfn) ? $item->xfn : '';
     $atts['href'] = !empty($item->url) ? $item->url : '';
     /**
      * Filter the HTML attributes applied to a menu item's anchor element.
      *
      * @since 3.6.0
      * @since 4.1.0 The `$depth` parameter was added.
      *
      * @param array $atts {
      *     The HTML attributes applied to the menu item's `<a>` element, empty strings are ignored.
      *
      *     @type string $title  Title attribute.
      *     @type string $target Target attribute.
      *     @type string $rel    The rel attribute.
      *     @type string $href   The href attribute.
      * }
      * @param object $item  The current menu item.
      * @param array  $args  An array of {@see wp_nav_menu()} arguments.
      * @param int    $depth Depth of menu item. Used for padding.
      */
     $atts = apply_filters('nav_menu_link_attributes', $atts, $item, $args, $depth);
     $attributes = '';
     foreach ($atts as $attr => $value) {
         if (!empty($value)) {
             $value = 'href' === $attr ? esc_url($value) : esc_attr($value);
             $attributes .= ' ' . $attr . '="' . $value . '"';
         }
     }
     /** This filter is documented in wp-includes/post-template.php */
     $title = apply_filters('the_title', $item->title, $item->ID);
     /**
      * Filter a menu item's title.
      *
      * @since 4.4.0
      *
      * @param string $title The menu item's title.
      * @param object $item  The current menu item.
      * @param array  $args  An array of {@see wp_nav_menu()} arguments.
      * @param int    $depth Depth of menu item. Used for padding.
      */
     $title = apply_filters('nav_menu_item_title', $title, $item, $args, $depth);
     if ($depth == 1) {
         $image_media_id = $this->_cfs->get('image_menu', $item->object_id);
         $image_src = get_attachment_image($image_media_id, 'product_menu');
         $image_meta = wp_get_attachment($image_media_id);
         $image = $image_src ? str_replace(home_url(), '', $image_src) : NO_IMAGE_PRODUCT;
         $menu_sub = '<div class="wrap">';
         $menu_sub .= '<div class="thumb">';
         $menu_sub .= '<img src="' . $image . '" alt="" />';
         $menu_sub .= '</div>';
         $menu_sub .= '<div class="caption"><h4>' . $title . '</h4></div></div>';
     }
     $item_output = $args->before;
     $item_output .= '<a' . $attributes . '>';
     $item_output .= $menu_sub ? $menu_sub : $args->link_before . $title . $args->link_after;
     $item_output .= '</a>';
     $item_output .= $args->after;
     /**
      * Filter a menu item's starting output.
      *
      * The menu item's starting output only includes `$args->before`, the opening `<a>`,
      * the menu item's title, the closing `</a>`, and `$args->after`. Currently, there is
      * no filter for modifying the opening and closing `<li>` for a menu item.
      *
      * @since 3.0.0
      *
      * @param string $item_output The menu item's starting HTML output.
      * @param object $item        Menu item data object.
      * @param int    $depth       Depth of menu item. Used for padding.
      * @param array  $args        An array of {@see wp_nav_menu()} arguments.
      */
     $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
 }
コード例 #12
0
ファイル: shortcode-slick.php プロジェクト: durkangroup/_dg
            }
        }
    }
    // Create an empty variable for return html content
    $html_output = '';
    // Check if the slider should be unique and do some unique stuff (*optional)
    if (ctype_xdigit($slider) && strlen($slider) === 32) {
        $is_unique = true;
    } else {
        $is_unique = false;
    }
    // Build the html slider structure (open)
    $html_output .= '<div data-slick class="' . $slider_class_name . ' ' . $slider . ' slider wp-slick-slider ' . $size . '">';
    // Iterate over the comma separated list of image ids and keep only the real numeric ids
    foreach (array_filter(array_map(function ($id) {
        return (int) $id;
    }, explode(',', $ids))) as $media_id) {
        // Get the image by media id and build the html div group with the image source, width and height
        if ($image_data = wp_get_attachment_image_src($media_id, $size)) {
            $image_meta = wp_get_attachment($media_id);
            if ($image_meta['caption'] != '') {
                $captionclass = "has--caption";
            } else {
                $captionclass = "no--caption";
            }
            $html_output .= '<div><figure class="image"><img data-lazy="' . esc_url($image_data[0]) . '"><figcaption class="' . $captionclass . '">' . $image_meta['caption'] . '</figcaption></figure></div>';
        }
    }
    // Close the html slider structure and return the html output
    return $html_output . '</div>';
});
コード例 #13
0
				});
			});
		</script>
		<div class="flex-container">
			<div class="flexslider" id="post-slider-<?php 
        the_ID();
        ?>
">
				<ul class="slides">
					<?php 
        foreach ($gallery as $image) {
            ?>
						<li>
							<?php 
            //$imageid = wp_get_attachment_image_src($image,'post-slider');
            $images = wp_get_attachment($image);
            ?>
							<img src="<?php 
            echo $images['src'];
            ?>
" alt="<?php 
            echo $images['caption'];
            ?>
">
							<?php 
            if ($images['caption']) {
                ?>
								<p class="flex-caption"><?php 
                echo $images['caption'];
                ?>
</p>
コード例 #14
0
ファイル: stripe-image_6x.php プロジェクト: ugurozer/little
<?php

$attachment1 = wp_get_attachment(get_sub_field("image_1"));
$attachment2 = wp_get_attachment(get_sub_field("image_2"));
$attachment3 = wp_get_attachment(get_sub_field("image_3"));
$attachment4 = wp_get_attachment(get_sub_field("image_4"));
$attachment5 = wp_get_attachment(get_sub_field("image_5"));
$attachment6 = wp_get_attachment(get_sub_field("image_6"));
?>

<div class="stripe image_6x">
	<div class="col1">
		<div class="image" data-stretch="<?php 
echo $attachment1[large];
?>
"></div>
	</div>
	<div class="col2">
		<div class="image" data-stretch="<?php 
echo $attachment2[large];
?>
"></div>
		<div class="image" data-stretch="<?php 
echo $attachment3[large];
?>
"></div>
	</div>
	<div class="col3">
		<div class="image" data-stretch="<?php 
echo $attachment4[large];
?>
コード例 #15
0
ファイル: attachment.php プロジェクト: jqjjian/fcye
                <?php 
        $attachments = array_values(get_children(array('post_parent' => $post->post_parent, 'post_type' => 'attachment', 'post_mime_types' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID')));
        foreach ($attachments as $k => $attachment) {
            if ($attachment->ID == $post->ID) {
                break;
            }
        }
        $k++;
        if (count($attachments > 1)) {
            if (isset($attachments[$k])) {
                $next_attachments_url = get_attachment_link($attachments[$k]->ID);
            } else {
                $next_attachments_url = get_attachment_link($attachments[0]->ID);
            }
        } else {
            $next_attachments_url = wp_get_attachment();
        }
        ?>
            	<div class="pic-box">
                    <span><?php 
        previous_image_link(0, '&nbsp;');
        ?>
</span>
            		<img src="<?php 
        echo wp_get_attachment_image_src($post->ID, 'medium')[0];
        ?>
" width="100%" class="img-responsive">
            		<span><?php 
        next_image_link(0, '&nbsp;');
        ?>
</span>
コード例 #16
0
ファイル: stripe-image_2x.php プロジェクト: ugurozer/little
<?php

$attachment1 = wp_get_attachment(get_sub_field("image_1"));
$attachment2 = wp_get_attachment(get_sub_field("image_2"));
?>

<div class="stripe image_2x">
	<div class="image first"><a href="<?php 
echo $attachment1[src];
?>
" data-target="flare" data-flare-scale="fillmax"><img src="<?php 
echo $attachment1[large];
?>
"/></a></div>
	<div class="image second"><a href="<?php 
echo $attachment2[src];
?>
" data-target="flare" data-flare-scale="fillmax"><img src="<?php 
echo $attachment2[large];
?>
"/></a></div>
</div>

<div class="stripe image_2x captions">

	<a href="<?php 
echo $attachment1[src];
?>
" class="caption first" data-target="flare" data-flare-scale="fillmax">
		<span>1</span>
		<p><?php 
コード例 #17
0
function drstk_process_image($image_url, $title, $creator = NULL, $date = NULL, $description = NULL, $metadata, $core_pid, $image_url_backup = NULL)
{
    global $data;
    //global $email;
    $query_images_args = array('post_type' => 'attachment', 'post_mime_type' => 'image', 'post_status' => 'inherit', 'posts_per_page' => -1);
    $query_images = new WP_Query($query_images_args);
    $images = array();
    foreach ($query_images->posts as $image) {
        $images[] = basename(wp_get_attachment_url($image->ID));
    }
    $data['images'] = $images;
    $pid = explode("/", $image_url);
    $pid = explode("?", end($pid));
    $pid = str_replace(":", "", $pid[0]);
    if (!in_array($pid, $images)) {
        $data['count'] = $data['count'] + 1;
        //$data['objects'][$core_pid]['image_status'] = "is not in images";
        $tmp = download_url($image_url);
        $post_id = 0;
        $file_array = array();
        // Set variables for storage
        $file_array['name'] = $pid;
        $file_array['type'] = mime_content_type($tmp);
        $file_array['error'] = 0;
        $file_array['tmp_name'] = $tmp;
        $file_array['size'] = filesize($tmp);
        //$data['objects'][$core_pid]['file_info'] = $file_array;
        // If error storing temporarily, unlink
        if (is_wp_error($tmp)) {
            @unlink($file_array['tmp_name']);
            $file_array['tmp_name'] = '';
            return $tmp;
        }
        //need to check for files that aren't jpgs becuase wp doesn't like them
        if ($file_array['type'] != 'image/jpeg') {
            $tmp = download_url($image_url_backup);
            $file_array['tmp_name'] = $tmp;
            $file_array['type'] = mime_content_type($tmp);
            $file_array['size'] = filesize($tmp);
        }
        // do the validation and storage stuff
        $post_data = array('post_title' => $title, 'post_name' => $title, 'post_excerpt' => $description, 'post_content' => $description);
        //$data['objects'][$core_pid]['post_data'] = $post_data;
        $id = media_handle_sideload($file_array, 0, $description, $post_data);
        //$data['objects'][$core_pid]['id'] = $id;
        // If error storing permanently, unlink
        if (is_wp_error($id)) {
            @unlink($file_array['tmp_name']);
            $data['objects'][$core_pid]['error'] = $id;
            return $id;
        }
        $src = wp_get_attachment_url($id);
        //$data['objects'][$core_pid]['src'] = $src;
        $image_id = drstk_get_image_id($src);
        //$data['objects'][$core_pid]['image_id'] = $image_id;
        update_post_meta($image_id, 'drstk-drs-metadata', $metadata);
        if ($creator != NULL) {
            update_post_meta($image_id, 'drstk-creator', $creator);
        }
        if ($date != NULL) {
            update_post_meta($image_id, 'drstk-date-created', $date);
        }
        update_post_meta($image_id, 'drstk-pid', $core_pid);
    } else {
        //have $pid -> need $image_id
        $image_id = drstk_get_image_by_pid($core_pid);
        $attachment = wp_get_attachment($image_id);
        //$data['objects'][$core_pid]['image_id'] = $image_id;
        //$data['objects'][$core_pid]['image_status'] = "is already in images";
        $data['existing_count'] = $data['existing_count'] + 1;
        if ($creator != get_post_meta($image_id, 'drstk-creator', true)) {
            $data['objects'][$core_pid]['creator'] = array();
            $data['objects'][$core_pid]['creator']['wp'] = get_post_meta($image_id, 'drstk-creator', true);
            $data['objects'][$core_pid]['creator']['drs'] = $creator;
        }
        if ($title != get_the_title($image_id)) {
            $data['objects'][$core_pid]['title'] = array();
            $data['objects'][$core_pid]['title']['wp'] = get_the_title($image_id);
            $data['objects'][$core_pid]['title']['drs'] = $title;
        }
        if ($date != get_post_meta($image_id, 'drstk-date-created', true)) {
            $data['objects'][$core_pid]['date_created'] = array();
            $data['objects'][$core_pid]['date_created']['wp'] = get_post_meta($image_id, 'drstk-date-created', true);
            $data['objects'][$core_pid]['date_created']['drs'] = $date;
        }
        if ($description != $attachment['caption']) {
            $data['objects'][$core_pid]['caption'] = array();
            $data['objects'][$core_pid]['caption']['wp'] = $attachment['caption'];
            $data['objects'][$core_pid]['caption']['drs'] = $description;
        }
        if ($description != $attachment['description']) {
            $data['objects'][$core_pid]['description'] = array();
            $data['objects'][$core_pid]['description']['wp'] = $attachment['description'];
            $data['objects'][$core_pid]['description']['drs'] = $description;
        }
        update_post_meta($image_id, 'drstk-drs-metadata', $metadata);
    }
}
コード例 #18
0
ファイル: presse.php プロジェクト: aniste/testfr
        ?>
						    	<div class="caption"><?php 
        echo $hovedbildeinfo['caption'];
        ?>
</div></div>
					    	</div>
					    	</div>
					    	<?php 
        if ($all_fields['flere_pressebilder'] != '') {
            foreach ($all_fields['flere_pressebilder'] as $add_img) {
                ?>
						        	<div class="image-w-info">
						        	<div class="images">
							        	<?php 
                echo '<div class="image"><a href="' . wp_get_attachment_url($add_img['last_opp_bilde']) . '">' . wp_get_attachment_image($add_img['last_opp_bilde'], 'large') . '</a></div>';
                $bildeinfo = wp_get_attachment($add_img['last_opp_bilde']);
                $bildedetaljer = wp_get_attachment_metadata($add_img['last_opp_bilde']);
                ?>

							        	<div class="bildeinformasjon">
							        		<div class="resolution"> <?php 
                echo $bildedetaljer['width'] . 'px x ' . $bildedetaljer['height'];
                ?>
 px</div>
							        		<div class="caption"> <?php 
                echo $bildeinfo['caption'];
                ?>
</div>
							        	</div>
							        	</div>
							        	</div>
コード例 #19
0
ファイル: stripe-image_1x.php プロジェクト: ugurozer/little
<?php 
$attachment = wp_get_attachment(get_sub_field("image"));
?>

	<div class="stripe image_1x"<?php 
if (get_sub_field("height")) {
    echo 'style="max-height:' . get_sub_field("height") . 'px; overflow:hidden;"';
}
?>
>
		<a href="<?php 
echo $attachment[src];
?>
" data-target="flare" data-flare-scale="fillmax"><img src="<?php 
echo $attachment[large];
?>
"></a>
	</div>
コード例 #20
0
ファイル: single.php プロジェクト: simon6023/mathildedufort
			<!-- CONTENT -->
			<div id="project_images">
				<?php 
    $sql = "SELECT * FROM wp_postmeta WHERE meta_value = '{$post->ID}' AND meta_key = 'attach_image_to_post' ORDER BY post_id ASC";
    $gallery_posts = $wpdb->get_results($sql);
    ?>

				<?php 
    if (!empty($gallery_posts)) {
        ?>
					<?php 
        foreach ($gallery_posts as $gallery_post) {
            ?>
						<div class="project_image_description">
							<?php 
            $attachment_meta = wp_get_attachment($gallery_post->post_id);
            ?>
							<?php 
            echo $attachment_meta['description'];
            ?>
						</div>

						<div class="project_image_container">
							<?php 
            $url = wp_get_attachment_url($gallery_post->post_id);
            ?>
							<img src="<?php 
            echo $url;
            ?>
">
						</div>