home/abhiramc/public_html/wp-content/themes/whistle/tpl-gallery.php000064400000057550150212641560021571 0ustar00ID,'_tpl_default_settings',TRUE); $settings = is_array( $settings ) ? array_filter( $settings ) : array(); $settings['enable-sub-title'] = !empty($settings['enable-sub-title']) ? $settings['enable-sub-title'] : ''; $settings['gallery-grid-space'] = !empty($settings['gallery-grid-space']) ? $settings['gallery-grid-space'] : ''; $settings['filter'] = !empty($settings['filter']) ? $settings['filter'] : ''; $global_breadcrumb = cs_get_option( 'show-breadcrumb' ); $masonry = !empty($settings['masonry']) ? $settings['masonry'] : ''; $header_class = ''; if( !$settings['enable-sub-title'] || !isset( $settings['enable-sub-title'] ) ) { if( isset( $settings['show_slider'] ) && $settings['show_slider'] ) { if( isset( $settings['slider_type'] ) ) { $header_class = $settings['slider_position']; } } } if( !empty( $global_breadcrumb ) ) { if( isset( $settings['enable-sub-title'] ) && $settings['enable-sub-title'] ) { $header_class = $settings['breadcrumb_position']; } }?>
'; echo '
'; echo do_shortcode('[layerslider id="'.$settings['layerslider_id'].'"/]'); echo '
'; echo '
'; } elseif( $settings['slider_type'] == 'revolutionslider' && !empty( $settings['revolutionslider_id'] ) ) { echo '
'; echo '
'; echo do_shortcode('[rev_slider '.$settings['revolutionslider_id'].'/]'); echo '
'; echo '
'; } elseif( $settings['slider_type'] == 'customslider' && !empty( $settings['customslider_sc'] ) ) { echo '
'; echo '
'; echo do_shortcode( $settings['customslider_sc'] ); echo '
'; echo '
'; } } } } ?> post_parent ) { $parent_id = $post->post_parent; $parents = array(); while( $parent_id ) { $page = get_page( $parent_id ); $parents[] = '' . get_the_title( $page->ID ) . ''; $parent_id = $page->post_parent; } $parents = array_reverse( $parents ); $breadcrumbs = array_merge_recursive($breadcrumbs, $parents); } $breadcrumbs[] = the_title( '', '', false ); $style = whistle_breadcrumb_css( $settings['breadcrumb_background'] ); whistle_breadcrumb_output ( the_title( '

', '

',false ), $breadcrumbs, $bstyle, $style ); } } ?>
'; } ?>
array ( '1' => 'full', '2' => 'whistle-gallery-ii-column', '3' => 'whistle-gallery-iii-column', '4' => 'whistle-gallery-iv-column' ), 'fullwidth' => array ( '1' => 'full', '2' => 'whistle-gallery-ii-column', '3' => 'whistle-gallery-iii&iv-fullwidth', '4' => 'whistle-gallery-iii&iv-fullwidth', ), ); } else { $sidebar_class_for_imagesize = explode("-",$sidebar_class); $actual_sidebar_class = $sidebar_class_for_imagesize[2]; if($actual_sidebar_class == 'both'): $img_size = array ( 'default' => array ( '1' => 'whistle-gallery-ii-column', '2' => 'whistle-gallery-ii-bothsidebar', '3' => 'whistle-gallery-iii-bothsidebar', '4' => 'whistle-gallery-iv-bothsidebar' ) ); else: $img_size = array ( 'default' => array ( '1' => 'whistle-gallery-ii-column', '2' => 'whistle-gallery-ii-sidebar', '3' => 'whistle-gallery-iii-sidebar', '4' => 'whistle-gallery-iv-sidebar' ) ); endif; } #Post Class switch( $post_layout ): case 'one-fourth-column': $post_class = $show_sidebar ? " gallery column dt-sc-one-fourth with-sidebar" : " gallery column dt-sc-one-fourth"; $columns = 4; break; case 'one-third-column': $post_class = $show_sidebar ? " gallery column dt-sc-one-third with-sidebar" : " gallery column dt-sc-one-third"; $columns = 3; break; case 'one-column': $post_class = $show_sidebar ? " gallery column dt-sc-one-column with-sidebar" : " gallery column dt-sc-one-column"; $columns = 1; break; default: case 'one-half-column': $post_class = $show_sidebar ? " gallery column dt-sc-one-half with-sidebar" : " gallery column dt-sc-one-half"; $columns = 2; break; endswitch; # Pagination $paged = 1; if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } elseif ( get_query_var('page') ) { $paged = get_query_var('page'); } # Query arg $categories = isset( $settings['gallery-categories']) ? array_filter( $settings['gallery-categories']) : array(); $args = array(); if( empty($categories) ): $args = array( 'paged' => $paged ,'posts_per_page' => $post_per_page,'post_type' => 'dt_galleries'); else: $args = array( 'paged' => $paged, 'posts_per_page' => $post_per_page, 'post_type' => 'dt_galleries', 'orderby' => 'ID', 'order' => 'ASC', 'tax_query' => array( array( 'taxonomy' => 'gallery_entries', 'field' => 'term_id', 'operator' => 'IN', 'terms' => $categories ) ) ); endif; # Query arg # Filter Option if(empty($categories)): $categories = get_categories('taxonomy=gallery_entries&hide_empty=1'); else: $c = array('taxonomy'=>'gallery_entries','hide_empty'=>1,'include'=>$categories); $categories = get_categories($c); endif; if( (sizeof($categories) > 1) && ($settings['filter'] == 'true') ) : $post_class .= " all-sort";?> have_posts()) : $i = 1; ?>
ID, 'left' ); ?>
ID, 'right' ); ?>
'; }?>