array(), 'grid' => 3, 'design' => 'design-1', 'link_target' => 'self', 'gallery_height' => '', 'show_title' => 'false', 'show_description' => 'false', 'show_caption' => 'true', 'image_size' => 'full', 'popup' => 'true', 'slidestoshow' => 3, 'slidestoscroll' => 1, 'dots' => 'true', 'arrows' => 'true', 'autoplay' => 'true', 'autoplay_interval' => 3000, 'speed' => 300, ), $atts, 'aigpl-gallery-slider')); $shortcode_designs = aigpl_designs(); $post_ids = !empty($id) ? explode(',', $id) : array(); $grid = (!empty($grid) && $grid <= 12) ? $grid : 3; $design = ($design && (array_key_exists(trim($design), $shortcode_designs))) ? trim($design) : 'design-1'; $link_target = ($link_target == 'blank') ? '_blank' : '_self'; $gallery_height = !empty($gallery_height) ? $gallery_height : ''; $height_css = !empty($gallery_height) ? "height:{$gallery_height}px;" : ''; $show_title = ($show_title == 'true') ? 'true' : 'false'; $show_description = ($show_description == 'true') ? 'true' : 'false'; $show_caption = ($show_caption == 'false') ? 'false' : 'true'; $popup = ($popup == 'false') ? 'false' : 'true'; $image_size = !empty($image_size) ? $image_size : $image_size; $slidestoshow = !empty($slidestoshow) ? $slidestoshow : 3; $slidestoscroll = !empty($slidestoscroll) ? $slidestoscroll : 1; $dots = ( $dots == 'false' ) ? 'false' : 'true'; $arrows = ( $arrows == 'false' ) ? 'false' : 'true'; $autoplay = ( $autoplay == 'false' ) ? 'false' : 'true'; $autoplay_interval = (!empty($autoplay_interval)) ? $autoplay_interval : 3000; $speed = (!empty($speed)) ? $speed : 300; // If no id is passed then return if( empty($post_ids) ) { return $content; } // Enqueue required script if( $popup == 'true' ) { wp_enqueue_script('wpos-magnific-script'); } wp_enqueue_script('wpos-slick-jquery'); wp_enqueue_script('aigpl-public-js'); // Shortcode file $design_file_path = AIGPL_DIR . '/templates/' . $design . '.php'; $design_file = (file_exists($design_file_path)) ? $design_file_path : ''; // Taking some global global $post; // Taking some variables $prefix = AIGPL_META_PREFIX; $unique = aigpl_get_unique(); $wrpper_cls = 'aigpl-slider-slide aigpl-cnt-wrp'; $popup_cls = ($popup == 'true') ? 'aigpl-popup-gallery' : ''; $offset_css = ''; $loop_count = 1; // Slider configuration $slider_conf = compact('slidestoshow', 'slidestoscroll', 'dots', 'arrows', 'autoplay', 'autoplay_interval', 'speed'); // WP Query Parameters $args = array ( 'post_type' => AIGPL_POST_TYPE, 'post_status' => array( 'publish' ), 'post__in' => $post_ids, 'ignore_sticky_posts' => true, ); // WP Query Parameters $query = new WP_Query($args); ob_start(); // If post is there if ( $query->have_posts() ) { ?>