MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //home/cafsindia/sblt.co.in/wp-content/plugins/post-grid/grid-items/nav-top-new.php
<?php
/*
* @Author 		pickplugins
* Copyright: 	2015 pickplugins.com
*/

if ( ! defined('ABSPATH')) exit;  // if direct access

//var_dump($grid_type);

	if($grid_type=='grid'){
		
		if($nav_top_search=='yes'){
			
			
			
			if(isset($_GET['keyword'])){
				
				$keyword = sanitize_text_field($_GET['keyword']);
				}
			
			$html.= '<div class="nav-search">';
			$html.= '<input grid_id="'.$post_id.'" class="search" title="'.__('Press enter to reset', 'post-grid').'" type="text"  placeholder="'.__('Start typing...', 'post-grid').'" value="'.$keyword.'">';
			$html.= '</div>';
			
			}
		

		
		
		}
	elseif($grid_type=='filterable'){
		
		
		$html.= '<div class="nav-filter">';
		
		
		if(!empty($categories)){

			foreach($categories as $category){
				
				$tax_cat = explode(',',$category);
				
				$categories_info[] = array($tax_cat[1],$tax_cat[0]);
				
				}
			
			$html.= '<div class="filter filter-'.$post_id.'" data-filter="all">'.__('All', 'post-grid').'</div>';
		
			foreach($categories_info as $term_info)
				{
					
					$term = get_term( $term_info[0], $term_info[1] );
					$term_slug = $term->slug;
					$term_name = $term->name;
					$html .= '<div class="filter filter-'.$post_id.'" terms-id="'.$term_info[0].'" data-filter=".'.$term_slug.'" >'.$term_name.'</div>';
				}
			
		}
		
		$html.= '</div>';
		
		
	
		$html .= '<script>
			jQuery(document).ready(function($) {
				
					$(function(){
					
						$("#post-grid-'.$post_id.'").mixItUp({
				pagination: {
					limit: '.$filterable_post_per_page.',
					prevButtonHTML: "'.$pagination_prev_text.'",
					nextButtonHTML: "'.$pagination_next_text.'",

					

				},
				selectors: {
					pagersWrapper: ".pager-list-'.$post_id.'",
					filter: ".filter-'.$post_id.'",
					
				},';
				
		if(!empty($active_filter) && $active_filter!= 'all')
			{
			

			$html .= '
			load: {
				filter: ".'.$active_filter.'"
			}, ';

			}

				$html .= 'controls: {
					enable: true
				}
				
						});
					
					});
					
			
					
					
			});		
		</script>';	

		
		
		$html .= '<style type="text/css">
		
				#post-grid-'.$post_id.' .grid-items .mix{
				  display: none;
				}
				</style>
				';
		
		
		}
	elseif($grid_type=='slider'){
		
	
	//var_dump('Hello');
		
		
	$html.= '<script>
	jQuery(document).ready(function($)
	{
		$("#post-grid-'.$post_id.' .grid-items").owlCarousel({
			
			items : 3, //10 items above 1000px browser width


			responsiveClass:true,
			responsive:{

				320:{
					items:'.$slider_column_mobile.',
					
				},
				
				768:{
					items:'.$slider_column_tablet.',
					
				},				
				
				1024:{
					items:'.$slider_column_desktop.',
					
					
				}
			},



			
			';
		

		$html.= 'loop: '.$slider_loop.',';
		$html.= 'rewind: '.$slider_rewind.',';
		$html.= 'center: '.$slider_center.',';
		
		$html.= 'autoplay: '.$slider_auto_play.',';
		$html.= 'autoplayTimeout: 3000,';
		$html.= 'autoplayHoverPause: '.$slider_autoplayHoverPause.',';	
		
		$html.= 'nav: '.$slider_navs.',';
		$html.= 'navText : ["",""],';
		
		$html.= 'dots: '.$slider_dots.',';
		$html.= 'navSpeed: '.$slider_navSpeed.',';
		$html.= 'dotsSpeed: '.$slider_dotsSpeed.',';
		$html.= 'touchDrag : '.$slider_touchDrag.',';
		$html.= 'mouseDrag  : '.$slider_mouseDrag.',';
		
		$html.= 'autoHeight: true,';







	$html.= '});';

	$html.= '$("#post-grid-'.$post_id.' .owl-nav").addClass("'.$slider_navs_positon.'");';
	$html.= '$("#post-grid-'.$post_id.' .owl-nav").addClass("'.$slider_navs_style.'");';
	$html.= '$("#post-grid-'.$post_id.' .owl-dots").addClass("'.$slider_dots_style.'");';
	


	$html.= '});';


	$html.=  '</script>';
		
		
		
		
		
		}