<?php
/**
 * The file that defines the bulk print admin area
 *
 * public-facing side of the site and the admin area.
 *
 * @link       https://sharabindu.com
 * @since      1.0.7
 *
 * @package    fancy-filter
 * @subpackage fancy-filter/admin
 */
class Fancyfilter_LighT_rows {
    public function __construct() {
        add_action('manage_morefilter_posts_custom_column', array($this, 'morefilter_columns_location_name'), 10, 3);
        add_filter('manage_morefilter_posts_columns', array($this, 'morefilter_columns_head'), 10);
    }
    public function morefilter_columns_head($defaults) {
        $defaults['fancy_locations'] = 'Shortcode';
        $yshrtco_clmn = array();
        $yshrtco = $defaults['fancy_locations'];
        unset($defaults['fancy_locations']);
        foreach ($defaults as $key => $value) {
            if ($key == 'date') {
                $yshrtco_clmn['fancy_locations'] = $yshrtco;
            }
            $yshrtco_clmn[$key] = $value;
        }
        return $yshrtco_clmn;
    }
    public function morefilter_columns_location_name($column_name, $post_ID) {
        if ($column_name == 'fancy_locations') {

            $slect_styledata = get_post_meta($post_ID, "slect_styledata", true);
            $slect_styleanimation = get_post_meta($post_ID, "slect_styleanimation", true);
            $slect_prot_erp_rw = get_post_meta($post_ID, "slect_prot_erp_rw", true);
            $slect_butondata = get_post_meta($post_ID, "slect_butondata", true);
            $el_fi_gridbg = get_post_meta($post_ID, "el_fi_gridbg", true);
            $el_fi_gridbg_2 = get_post_meta($post_ID, "el_fi_gridbg_2", true);
            $fancyMetabtn_align = get_post_meta($post_ID, "fancyMetabtn_align", true);
            $fancy_metabtn_ac_bg = get_post_meta($post_ID, "fancy_metabtn_ac_bg", true);
            $fancy_metabtn_bg = get_post_meta($post_ID, "fancy_metabtn_bg", true);
            $fancy_metabtn_clor = get_post_meta($post_ID, "fancy_metabtn_clor", true);
            $appended_posts = get_post_meta($post_ID, 'facncy_portfolios', true);
            if (!empty($appended_posts)) {
                echo '<p class="dretyui">
                    [fancyfilter_portfolio id ="' . esc_attr($post_ID) . '" grid_style = "' . esc_attr($slect_styledata) . '" button="' . esc_attr($slect_butondata) . '" col_1="' . esc_attr($el_fi_gridbg) . '" col_2="' . esc_attr($el_fi_gridbg_2) . '" align="' . esc_attr($fancyMetabtn_align) . '" btn_act="' . esc_attr($fancy_metabtn_bg) . '" btnclr="' . esc_attr($fancy_metabtn_clor) . '" btnbg="' . esc_attr($fancy_metabtn_ac_bg) . '" layout="' . esc_attr($slect_prot_erp_rw) . '" animation="' . esc_attr($slect_styleanimation) . '"]
                    </p>';
            }
            $slectblog__styledata = get_post_meta($post_ID, "slectblog__styledata", true);
            $slect_styleanimationblog = get_post_meta($post_ID, "slect_styleanimationblog", true);
            $slect_blog_erp_rw = get_post_meta($post_ID, "slect_blog_erp_rw", true);
            $slect_blg_butondata = get_post_meta($post_ID, "slect_blg_butondata", true);
            $el_fi_blog_gridbg = get_post_meta($post_ID, "el_fi_blog_gridbg", true);
            $el_fi_blog_gridbg_2 = get_post_meta($post_ID, "el_fi_blog_gridbg_2", true);
            $fancy_blogMetabtn_align = get_post_meta($post_ID, "fancy_blogMetabtn_align", true);
            $fancy_blogmetabtn_ac_bg = get_post_meta($post_ID, "fancy_blogmetabtn_ac_bg", true);
            $fancy_blog_metabtn_bg = get_post_meta($post_ID, "fancy_blog_metabtn_bg", true);
            $fancy_blog_metabtn_clor = get_post_meta($post_ID, "fancy_blog_metabtn_clor", true);
            $appended_meta_post = get_post_meta($post_ID, 'facncy_meta_post', true);
            if (!empty($appended_meta_post)) {
                echo '<p class="dretyui">
                [fancyfilter_blog id ="' . esc_attr($post_ID) . '" grid_style = "' . esc_attr($slectblog__styledata) . '" button="' . esc_attr($slect_blg_butondata) . '" col_1="' . esc_attr($el_fi_blog_gridbg) . '" col_2="' . esc_attr($el_fi_blog_gridbg_2) . '" align="' . esc_attr($fancy_blogMetabtn_align) . '" btn_act="' . esc_attr($fancy_blog_metabtn_bg) . '" btnclr="' . esc_attr($fancy_blog_metabtn_clor) . '" btnbg="' . esc_attr($fancy_blogmetabtn_ac_bg) . '" layout="' . esc_attr($slect_blog_erp_rw) . '" animation="' . esc_attr($slect_styleanimationblog) . '"]
                </p></div>';
            }

                $appended_meta_product = get_post_meta($post_ID, 'facncy_meta_product', true);
                if (!empty($appended_meta_product)) {


$slect_clm_erp_rw = get_post_meta($post_ID, "slect_clm_erp_rw", true) ? get_post_meta($post_ID, "slect_clm_erp_rw", true): 'col-2';
$slect_styleanimationcm = get_post_meta($post_ID, "slect_styleanimationcm", true) ? get_post_meta($post_ID, "slect_styleanimationcm", true): ' ';

$slect_prodct_butondata = get_post_meta($post_ID, "slect_prodct_butondata", true) ? get_post_meta($post_ID, "slect_prodct_butondata", true): ' ';
$el_fi_prodct_gridbg = get_post_meta($post_ID, "el_fi_prodct_gridbg", true) ? get_post_meta($post_ID, "el_fi_prodct_gridbg", true): ' ';
$el_fi_prodct_gridbg_2 = get_post_meta($post_ID, "el_fi_prodct_gridbg_2", true);
$fancy_proMetabtn_align = get_post_meta($post_ID, "fancy_proMetabtn_align", true) ? get_post_meta($post_ID, "fancy_proMetabtn_align", true): 'left';


$fancy_Pro_metabtn_ac_bg = get_post_meta($post_ID, "fancy_Pro_metabtn_ac_bg", true);



$fancy_Pro_metabtn_bg = get_post_meta($post_ID, "fancy_Pro_metabtn_bg", true) ? get_post_meta($post_ID, "fancy_Pro_metabtn_bg", true): '#81d742';

$fancy_metabtn_Proclor = get_post_meta($post_ID, "fancy_metabtn_Proclor", true) ? get_post_meta($post_ID, "fancy_metabtn_Proclor", true): '#2d2d2d';


                    echo '<p class="dretyui">
            [fancyfilter_product id ="'.esc_attr($post_ID).'" grid_style ="st-free" button="'.esc_attr($slect_prodct_butondata).'" col_1="'.esc_attr($el_fi_prodct_gridbg).'" col_2="'.esc_attr($el_fi_prodct_gridbg_2).'" align="'.esc_attr($fancy_proMetabtn_align).'" btn_act="'.esc_attr($fancy_Pro_metabtn_bg).'" btnclr="'.esc_attr($fancy_metabtn_Proclor).'" btnbg="'.esc_attr($fancy_Pro_metabtn_ac_bg).'" layout="'.esc_attr($slect_clm_erp_rw).'" animation="'.esc_attr($slect_styleanimationcm).'"]</p>';
                }
        }
    }
}
if (class_exists('Fancyfilter_LighT_rows')) {
    new Fancyfilter_LighT_rows();
}
