<?php

$options = get_option('fancyfilter_options');

$layout = isset($options['fancyfilter_pro_col_by']) ? $options['fancyfilter_pro_col_by'] : 'col-2';
$button = isset($options['fancyfilter_pro_btn_style']) ? $options['fancyfilter_pro_btn_style'] : 'btnsyle-1';

$portfolioselect2_style = isset($options['slct_portfoli_types']) ? $options['slct_portfoli_types'] : ' ';
$slct_post_types2_style = isset($options['slct_post_types']) ? $options['slct_post_types'] : ' ';

$fancyfilter_select2_style = isset($options['yoo_slct_post_types']) ? $options['yoo_slct_post_types'] : ' ';

$grid_style = isset($options['fancyfilter_pro_main_style']) ? $options['fancyfilter_pro_main_style'] : 'st-free';

$col_1 = isset($options['el_item_bg_color']) ? $options['el_item_bg_color'] : '#e91e63';

$col_2 = isset($options['el_item_bg_two_color']) ? $options['el_item_bg_two_color'] : 'rgba(20,44,160,0.67)';

$align = isset($options['fancyfilter_pro_btn_alighmnt']) ? $options['fancyfilter_pro_btn_alighmnt'] : 'center';

$btnclr = isset($options['el_btntxt_color']) ? $options['el_btntxt_color'] : '#000';

$btn_act = isset($options['el_btnact_color']) ? $options['el_btnact_color'] : '#ccc';

$btnbg = isset($options['el_btnact_bgcolor']) ? $options['el_btnact_bgcolor'] : 'rgba(0, 0, 255, 1)';


$animation = isset($options['fancyfilter_pro_style_animation']) ? $options['fancyfilter_pro_style_animation'] : 'fancyfilter_pro-free-item--eff1';

global $post;
$post->ID;
extract(shortcode_atts(array(
    'button' => $button,
    'grid_style' => $grid_style,
    'id' => $post->ID,
    'animation' => $animation,
    'layout' => $layout,
    'col_1' => $col_1,
    'col_2' => $col_2,
    'align' => $align,
    'btn_act' => $btn_act,
    'btnclr' => $btnclr,
    'btnbg' => $btnbg

) , $atts));

$post_id = $id;
$rand_type = $id;

$grid_layout = '49';
if($layout == 'col-2'){
   $grid_layout = '32.33';
}
if($layout == 'col-1'){
  $grid_layout = '49'; 
}
if($layout == 'col-3'){
  $grid_layout = '24'; 
}
$fancyfilter_pro_display_readmore = isset($options['fancyfilter_pro_display_readmore']) && $options['fancyfilter_pro_display_readmore'] === 'fancyfilter_pro_display_readmore' ? 'checked' : '';

$fancyfilter_pro_per_page = isset($options['fancyfilter_pro_per_page']) ? $options['fancyfilter_pro_per_page'] : '-1';

$fancyfilter_pro_order_by = isset($options['fancyfilter_pro_order_by']) ? $options['fancyfilter_pro_order_by'] : 'none';

$el_title_color = isset($options['el_title_color']) ? $options['el_title_color'] : '#ccc';

$el_cat_color = isset($options['el_cat_color']) ? $options['el_cat_color'] : '#ccc';

$el_all_text = isset($options['el_all_text']) ? $options['el_all_text'] : 'All';

$el_zoom_color = isset($options['el_zoom_color']) ? $options['el_zoom_color'] : '#4cd48a';

$el_zoom_bgcolor = isset($options['el_zoom_bgcolor']) ? $options['el_zoom_bgcolor'] : '#fff';

$el_link_color = isset($options['el_link_color']) ? $options['el_link_color'] : '#000';

$el_link_bgcolor = isset($options['el_link_bgcolor']) ? $options['el_link_bgcolor'] : '#fff';

if ($button == 'btnsyle-1')
{
    $button_class = ' hover_one hover-3';
}

if ($button == 'btnsyle-3')
{
    $button_class = 'hover_three';
}
if ($button == 'btnsyle-4')
{
    $button_class = 'hover_four';
}
if ($button == 'btnsyle-11')
{
    $button_class = 'hover_five';
}
if ($button == 'btnsyle-2')
{
    $button_class = 'hover_six';
}
if ($button == 'btnsyle-6')
{
    $button_class = 'hover_eight hover_button';
}

if ($button == 'btnsyle-7')
{
    $button_class = 'hover_nine type1';
}
if ($button == 'btnsyle-12')
{
    $button_class = 'hover_ten type3';
}

if ($button == 'btnsyle-8')
{
    $button_class = 'hover_univer hover_eleven from-middle';
}
if ($button == 'btnsyle-10')
{
    $button_class = 'hover_univer hover_twelve from-right';
}
if ($button == 'btnsyle-13')
{
    $button_class = 'hover_univer hover_thirtheen from-bottom';
}



$el_btn_f_size = isset($options['el_btn_f_size']) ? $options['el_btn_f_size'] : '20';
$el_btn_f_weight = isset($options['el_btn_f_weight']) ? $options['el_btn_f_weight'] : '600';

$el_ti_font = isset($options['el_ti_font']) ? $options['el_ti_font'] : '20';
$el_ti_font_w = isset($options['el_ti_font_w']) ? $options['el_ti_font_w'] : '600';

$fancyfilter_pro_hide_cat = isset($options['fancyfilter_pro_hide_cat']) && $options['fancyfilter_pro_hide_cat'] === 'fancyfilter_pro_hide_cat' ? 'checked' : '';

$fancyfilter_pro_display_pgination = isset($options['fancyfilter_pro_display_pgination']) && $options['fancyfilter_pro_display_pgination'] === 'fancyfilter_pro_display_pgination' ? 'checked' : '';

$el_pagination_bg_color = isset($options['el_pagination_bg_color']) ? $options['el_pagination_bg_color'] : '#ccc';

$el_pagination_ac_color = isset($options['el_pagination_ac_color']) ? $options['el_pagination_ac_color'] : '#00A796';

$el_pagination_top_space = isset($options['el_pagination_top_space']) ? $options['el_pagination_top_space'] : '30';

$fancyfilter_pro_pg_align = isset($options['fancyfilter_pro_pg_align']) ? $options['fancyfilter_pro_pg_align'] : 'center';

$el_pagination_color = isset($options['el_pagination_color']) ? $options['el_pagination_color'] : '#000';

$el_readmore_txt = isset($options['el_readmore_txt']) ? $options['el_readmore_txt'] : 'View More';
$el_readmore_url = isset($options['el_readmore_url']) ? $options['el_readmore_url'] : 'htts://';
$el_readmore_color = isset($options['el_readmore_color']) ? $options['el_readmore_color'] : '#fff';
$el_readmore_bgcolor = isset($options['el_readmore_bgcolor']) ? $options['el_readmore_bgcolor'] : '#000';
$fancyfilter_pro_readmore_align = isset($options['fancyfilter_pro_readmore_align']) ? $options['fancyfilter_pro_readmore_align'] : 'center';



$fabcy_remove_al_btn = isset($options['fabcy_remove_al_btn']) && $options['fabcy_remove_al_btn'] === 'fabcy_remove_al_btn' ? 'checked' : '';

