'; $stype = 'thumb'; } else if($type == 'different-ratio') { $crop = false; $imgwidth = null; }else if($type == 'carousel') { $crop = false; $imgwidth = null; $width = 'none'; $stype = 'carousel'; $fade = 'false'; $class .= ' kt-image-carousel'; } if(!empty($slides)) : echo ' '; if($type == 'thumb') { echo '
'; foreach ($slides as $slide) { $alt = get_post_meta($slide['attachment_id'], '_wp_attachment_image_alt', true); $img = ascend_get_image(80, 80, true, null, $alt, $slide['attachment_id'], false); echo '
'; echo ''.esc_attr($img['alt']).''; echo '
'; echo '
'; } echo '
'; echo ' '; } endif; } } if(!function_exists('ascend_build_slider_home_fullwidth')) { function ascend_build_slider_home_fullwidth($slides = null, $width = null, $height = null, $class = null, $id = 'kt_slider_options', $type = 'slider', $captions = "false", $auto = 'true', $speed = '7000', $arrows = 'true', $fade = 'true', $fade_speed = '400', $title_max = '70', $title_min = '40', $subtitle_max = '30', $subtitle_min = '20', $align = 'center') { $stype = 'slider'; if(!empty($slides)) : echo ' '; endif; } } if(!function_exists('ascend_build_slider')) { function ascend_build_slider($id = 'post', $images = null, $width = null, $height = null, $link ='image', $class = null, $type = 'slider', $captions = "false", $auto = 'true', $speed = '7000', $arrows = 'true', $fade = 'true', $fade_speed = '400', $delay = '0') { if(empty($images)) { global $post; $attach_args = array('order'=> 'ASC','post_type'=> 'attachment','post_parent'=> $post->ID,'post_mime_type' => 'image','post_status'=> null,'orderby'=> 'menu_order','numberposts'=> -1); $attachments_posts = get_posts($attach_args); $images = ''; foreach ($attachments_posts as $val) { $images .= $val->ID.','; } } if($type == 'thumb') { echo '
'; } if(!empty($images)) : echo ' '; if($type == 'thumb') { echo '
'; $attachments = array_filter( explode( ',', $images ) ); if ($attachments) { foreach ($attachments as $attachment) { $alt = get_post_meta($attachment, '_wp_attachment_image_alt', true); $img = ascend_get_image(80, 80, true, null, $alt, $attachment, false); echo '
'; echo ''.esc_attr($img['alt']).''; echo '
'; echo '
'; } } echo '
'; } endif; } } if(!function_exists('ascend_build_post_carousel')) { function ascend_build_post_carousel($width = null, $height = 400, $class = null, $type = 'post', $cat = null, $items = 8, $orderby = 'date', $order = 'DESC', $offset = null, $auto = 'true', $speed = '7000', $arrows = 'true', $trans_speed = '400', $featured = null) { $extraargs = array(); if($type == 'portfolio') { $tax = 'portfolio-type'; } elseif($type == 'product') { if($featured == 'true'){ $extraargs = array( 'meta_key' => '_featured', 'meta_value' => 'yes', ); } $tax = 'product_cat'; } else if($type == 'staff') { $tax = 'staff-group'; } else if($type == 'testimonal') { $tax = 'testimonal-group'; } else { $tax = 'category'; } if(!empty($cat)) { $cat = get_term($cat, $tax); $cat = $cat->slug; } $args = array( 'orderby' => $orderby, 'order' => $order, 'post_type' => $type, 'offset' => $offset, 'post_status' => 'publish', $tax => $cat, 'posts_per_page' => $items, ); $args = array_merge($args, $extraargs); echo '