<?php
/**
 *  functions and definitions.
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * * @package Luzuk Premium
 */
$query='';


// //  header text color ,background color option remove
function remove_customizer_colors( $wp_customize ) {
 
    // Remove controls ONLY (safe)
    $wp_customize->remove_control( 'background_color' );
    $wp_customize->remove_control( 'header_textcolor' );
 
}
add_action( 'customize_register', 'remove_customizer_colors', 100 );

define('FS_METHOD', 'direct');

if ( ! function_exists( 'luzuk_lite_setup' ) ) :
    /**
     * Sets up theme defaults and registers support for various WordPress features.
     *
     * Note that this function is hooked into the after_setup_theme hook, which
     * runs before the init hook. The init hook is too late for some features, such
     * as indicating support for post thumbnails.
     */
    function luzuk_lite_setup() {
        define( 'MTS_THEME_VERSION', '2.0.6' );
        /*
         * Make theme available for translation.
         * Translations can be filed in the /languages/ directory.
         * If you're building a theme based on publishable, use a find and replace
         * to change 'Luzuk Premium' to the name of your theme in all the template files.
         */
        load_theme_textdomain( 'Luzuk Premium', get_template_directory() . '/languages' );

        // Add default posts and comments RSS feed links to head.
        add_theme_support( 'automatic-feed-links' );

        /*
         * Let WordPress manage the document title.
         * By adding theme support, we declare that this theme does not use a
         * hard-coded <title> tag in the document head, and expect WordPress to
         * provide it for us.
         */
        add_theme_support( 'title-tag' );

        /*
         * Enable support for Post Thumbnails on posts and pages.
         *
         * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
         */
        add_theme_support( 'post-thumbnails' );
        set_post_thumbnail_size( 150, 150, true );
        add_image_size( 'Luzuk Premium-related', 200, 125, true ); //related

        // This theme uses wp_nav_menu() in one location.
        register_nav_menus( array(
            'primary' => esc_html__( 'Primary Menu', 'Luzuk Premium' ),
        ) );


        // This theme uses wp_nav_menu() in one location.
        register_nav_menus( array(
            'topmenu' => esc_html__( 'Top Menu', 'Luzuk Premium' ),
        ) );

        /*
         * Switch default core markup for search form, comment form, and comments
         * to output valid HTML5.
         */
        add_theme_support( 'html5', array(
            'comment-form',
            'comment-list',
            'gallery',
            'caption',
        ) );

        if ( luzuk_lite_is_wc_active() ) {
            add_theme_support( 'woocommerce' );
        }
        
        // Set up the WordPress core custom background feature.
        add_theme_support( 'custom-background', apply_filters( 'luzuk_lite_custom_background_args', array(
          'default-color' => '#000',
          'default-image' => '',
      ) ) );
    }
endif;
add_action( 'after_setup_theme', 'luzuk_lite_setup' );

function luzuk_lite_content_width() {
    $GLOBALS['content_width'] = apply_filters( 'luzuk_lite_content_width', 678 );
}
add_action( 'after_setup_theme', 'luzuk_lite_content_width', 0 );

/**
 * Register widget area.
 *
 * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
 */
function luzuk_lite_widgets_init() {
    register_sidebar( array(
        'name'          => esc_html__( 'Sidebar', 'Luzuk Premium' ),
        'id'            => 'sidebar',
        'description'   => '',
        'before_widget' => '<div id="%1$s" class="widget %2$s  wow bounceInUp">',
        'after_widget'  => '</div>',
        'before_title'  => '<h4 class="widget-title">',
        'after_title'   => '</h4>',
    ) );

    /*// Header Ad sidebar
    register_sidebar(array(
        'name' => __('Header Ad', 'Luzuk Premium'),
        'description'   => __( '728x90 Ad Area', 'Luzuk Premium' ),
        'id' => 'widget-header',
        'before_widget' => '<div id="%1$s" class="widget-header">',
        'after_widget' => '</div>',
        'before_title' => '<h3 class="widget-title">',
        'after_title' => '</h3>',
    ));*/
    
    // Shop side bar
    register_sidebar( array(
        'name'          => esc_html__( 'Shop Sidebar', 'Luzuk Premium' ),
        'id'            => 'luzuk-shop-sidebar',
        'description'   => __( 'Add widgets here to appear in your sidebar of shop page.', 'Luzuk Premium' ),
        'before_widget' => '<aside id="%1$s" class="widget %2$s wow bounceInUp">',
        'after_widget'  => '</aside>',
        'before_title'  => '<h4 class="widget-title">',
        'after_title'   => '</h4>',
    ) );
    // Blog side bar
    register_sidebar( array(
        'name'          => esc_html__( 'Blog Sidebar', 'Luzuk Premium' ),
        'id'            => 'luzuk-blog-sidebar',
        'description'   => __( 'Add widgets here to appear in your sidebar of blog page.', 'Luzuk Premium' ),
        'before_widget' => '<aside id="%1$s" class="widget %2$s  wow bounceInUp">',
        'after_widget'  => '</aside>',
        'before_title'  => '<h4 class="widget-title">',
        'after_title'   => '</h4>',
    ) );


   // Gtranslate widge top bar
    register_sidebar( array(
        'name'          => esc_html__( 'Language Translate Widge', 'Luzuk Premium' ),
        'id'            => 'luzuk-gtranslate-sidebar',
        'description'   => __( 'Add Language Translate.', 'Luzuk Premium' ),
        'before_widget' => '<aside id="%1$s" class="widget %2$s  wow bounceInUp">',
        'after_widget'  => '</aside>',
        'before_title'  => '<h4 class="widget-title">',
        'after_title'   => '</h4>',
    ) );



    // Subject side bar
    register_sidebar( array(
        'name'          => esc_html__( 'Subject Sidebar', 'Luzuk Premium' ),
        'id'            => 'luzuk-subject-sidebar',
        'description'   => __( 'Add widgets here to appear in your sidebar of subject page.', 'Luzuk Premium' ),
        'before_widget' => '<aside id="%1$s" class="widget %2$s  wow bounceInUp">',
        'after_widget'  => '</aside>',
        'before_title'  => '<h4 class="widget-title">',
        'after_title'   => '</h4>',
    ) );

    // FOOTER ONE WIDGET SIDEBAR
    register_sidebar( array(
        'name'          => esc_html__( 'Footer One', 'Luzuk Premium' ),
        'id'            => 'luzuk-footer1',
        'description'   => __( 'Add widgets here to appear in your Footer.', 'Luzuk Premium' ),
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget'  => '</aside>',
        'before_title'  => '<h4 class="widget-title">',
        'after_title'   => '</h4>',
    ) );
    // FOOTER TWO WIDGET SIDEBAR
    register_sidebar( array(
        'name'          => esc_html__( 'Footer Two', 'Luzuk Premium' ),
        'id'            => 'luzuk-footer2',
        'description'   => __( 'Add widgets here to appear in your Footer.', 'Luzuk Premium' ),
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget'  => '</aside>',
        'before_title'  => '<h4 class="widget-title">',
        'after_title'   => '</h4>',
    ) );
    // FOOTER THREE WIDGET SIDEBAR
    register_sidebar( array(
        'name'          => esc_html__( 'Footer Three', 'Luzuk Premium' ),
        'id'            => 'luzuk-footer3',
        'description'   => __( 'Add widgets here to appear in your Footer.', 'Luzuk Premium' ),
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget'  => '</aside>',
        'before_title'  => '<h4 class="widget-title">',
        'after_title'   => '</h4>',
    ) );
    // FOOTER FOUR WIDGET SIDEBAR
    register_sidebar( array(
        'name'          => esc_html__( 'Footer Four', 'Luzuk Premium' ),
        'id'            => 'luzuk-footer4',
        'description'   => __( 'Add widgets here to appear in your Footer.', 'Luzuk Premium' ),
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget'  => '</aside>',
        'before_title'  => '<h4 class="widget-title">',
        'after_title'   => '</h4>',
    ) );

    if ( luzuk_lite_is_wc_active() ) {
        // Register WooCommerce Shop and Single Product Sidebar
        register_sidebar( array(
            'name' => __('Shop Page Sidebar', 'Luzuk Premium' ),
            'description'   => __( 'Appears on Shop main page and product archive pages.', 'Luzuk Premium' ),
            'id' => 'shop-sidebar',
            'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h4 class="widget-title">',
            'after_title' => '</h4>',
        ) );
        register_sidebar( array(
            'name' => __('Single Product Sidebar', 'Luzuk Premium' ),
            'description'   => __( 'Appears on single product pages.', 'Luzuk Premium' ),
            'id' => 'product-sidebar',
            'before_widget' => '<div id="%1$s" class="widget %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h4 class="widget-title">',
            'after_title' => '</h4>',
        ) );
    }
}
add_action( 'widgets_init', 'luzuk_lite_widgets_init' );

function luzuk_lite_custom_sidebar() {
    // Default sidebar.
    $sidebar = 'sidebar';

    // Woocommerce.
    if ( luzuk_lite_is_wc_active() ) {
        if ( is_shop() || is_product_category() ) {
            $sidebar = 'shop-sidebar';
        }
        if ( is_product() ) {
            $sidebar = 'product-sidebar';
        }
    }

    return $sidebar;
}

/**
 * Enqueue scripts and styles.
 */
function luzuk_lite_scripts() {
    wp_enqueue_style( 'Luzuk Premium-style', get_stylesheet_uri() );

    $handle = 'Luzuk Premium-style';

    // WooCommerce
    if ( luzuk_lite_is_wc_active() ) {
        if ( is_woocommerce() || is_cart() || is_checkout() ) {
            wp_enqueue_style( 'woocommerce', get_template_directory_uri() . '/css/woocommerce2.css' );
            $handle = 'woocommerce';
        }
    }

    wp_enqueue_script( 'smoothscroll', get_template_directory_uri() . '/js/SmoothScroll.js', array(), '20160809', false );
    wp_enqueue_script( 'jquery-nav', get_template_directory_uri() . '/js/jquery.nav.js', array('jquery'), '20160903', true );
    wp_enqueue_script( 'jquery-bxslider', get_template_directory_uri() . '/js/jquery.bxslider.js', array('jquery'), '4.1.2', true );
     wp_enqueue_script( 'isotope-pkgd', get_template_directory_uri() . '/js/isotope.pkgd.js', array('jquery', 'imagesloaded' ), '20150903', true );
    wp_enqueue_script( 'nivo-lightbox', get_template_directory_uri() . '/js/nivo-lightbox.js', array('jquery'), '20150903', true );
    wp_enqueue_script( 'superfish', get_template_directory_uri() . '/js/superfish.js', array('jquery'), '20150903', true );
    wp_enqueue_script( 'jquery-stellar', get_template_directory_uri() . '/js/jquery.stellar.js', array('imagesloaded'), '20150903', false ); 

    wp_enqueue_script( 'owl-carousel', get_template_directory_uri() . '/js/owl.carousel.js', array('jquery'), '1.3.3', true );

    wp_enqueue_script( 'wow', get_template_directory_uri() . '/js/wow.js', array('jquery'), '20150903', true );
    wp_enqueue_script( 'odometer', get_template_directory_uri() . '/js/odometer.js', array('jquery'), '20150903', true );
    wp_enqueue_script( 'waypoint', get_template_directory_uri() . '/js/waypoint.js', array('jquery'), '20150903', true );
    wp_enqueue_script( 'total-custom', get_template_directory_uri() . '/js/total-custom.js', array('jquery'), '20150903', true );
    wp_enqueue_script('slider', get_template_directory_uri().'/js/slider.js', array(), '1.1', true);
    wp_localize_script( 'total-custom', 'total_localize', array('template_path' => get_template_directory_uri() ));

  // wp_enqueue_script('jquery-3-3-1-min', get_template_directory_uri().'/js/jquery-3.3.1.min.js', array(), '1.1', true);
    //  wp_enqueue_script( 'jquery-3-1-1-slim-min', get_template_directory_uri() . '/js/jquery-3.1.1.slim.min.js', array('jquery'), '20150903', true );
      wp_enqueue_script( 'jquery-colorbox', get_template_directory_uri() . '/js/jquery.colorbox.js', array(), '20160809', false );

    wp_enqueue_style( 'bxslider', get_template_directory_uri() . '/css/jquery.bxslider.css', array(), '4.1.2' );
    wp_enqueue_style( 'colorbox-popup', get_template_directory_uri() . '/css/colorbox.css', array(), '4.1.2' );
    wp_enqueue_style( 'animate', get_template_directory_uri() . '/css/animate.css', array(), '1.0' );
    wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.css', array(), '4.4.0' );
  

    wp_enqueue_style( 'owl-carousel', get_template_directory_uri() . '/css/owl.carousel.css', array(), '1.3.3' );
    wp_enqueue_style( 'owl-theme', get_template_directory_uri() . '/css/owl.theme.css', array(), '1.3.3' );
        wp_enqueue_style( 'nivo-lightbox', get_template_directory_uri() . '/css/nivo-lightbox.css', array(), '1.3.3' );
    wp_enqueue_style( 'superfish', get_template_directory_uri() . '/css/superfish.css', array(), '1.3.3' );

     wp_enqueue_style( 'docs-theme-min', get_template_directory_uri() . '/css/docss.theme.min.css', array(), '1.3.3' );
        wp_enqueue_style( 'owl-carousel-min', get_template_directory_uri() . '/css/owl.carousel.min.css', array(), '1.3.3' );
        wp_enqueue_style( 'owl-theme-default-min', get_template_directory_uri() . '/css/owl.theme.default.min.css', array(), '1.3.3' );
   

    //wp_enqueue_script('owl-carousel-min', get_template_directory_uri().'/js/owl.carousel.min.js', array(), '1.1', true);

  // wp_enqueue_style( 'total-style', get_stylesheet_uri(), array( 'bxslider', 'animate', 'font-awesome', 'owl-carousel', 'owl-theme', 'nivo-lightbox', 'superfish'), '1.0' );
  // wp_enqueue_style( 'total-fonts', total_fonts_url(), array(), null );
   // wp_enqueue_script('script', get_template_directory_uri().'/js/script.js', array(), '1.1', true);
// extra for header
  
   wp_enqueue_style( 'templete', get_template_directory_uri() . '/css-new/templete.css', array(), '1.3.3' );

// extra for header

wp_enqueue_script( 'main', get_template_directory_uri() . '/js/main.js', array('jquery'), '20150903', true );
 wp_enqueue_style( 'style-min', get_template_directory_uri() . '/css/style.min.css', array(), '1.3.3' );

    //google fonts
    wp_enqueue_style( 'google-fonts', 'https://fonts.googleapis.com/css?family=Archivo+Narrow|Arimo|Berkshire+Swash|Bitter|Comfortaa|Dancing+Script|Dosis|Droid+Serif|Francois+One|Germania+One|Hammersmith+One|Indie+Flower|Lobster|Muli|Nosifer|PT+Sans|PT+Sans+Caption|PT+Sans+Narrow|Pacifico|Questrial|Roboto+Mono|Roboto+Slab|Source+Serif+Pro|Titillium+Web|Work+Sans|Rubik:700i' );
    // wp_add_inline_style( 'total-style', total_dymanic_styles() );

    wp_enqueue_script( 'Luzuk Premium-customscripts', get_template_directory_uri() . '/js/customscripts.js',array('jquery'),'',true);

    if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
      wp_enqueue_script( 'comment-reply' );
  }

  $luzuk_lite_color_scheme = get_theme_mod('luzuk_template_color', '#fe5722');
  $luzuk_lite_color_scheme2 = get_theme_mod('luzuk_template_color2', '#44afdd');
  $header = get_theme_mod('header_textcolor', '#000');
  $luzuk_lite_layout = get_theme_mod('luzuk_lite_layout', 'cslayout');

  $custom_css = total_dymanic_styles();
  wp_add_inline_style( $handle, $custom_css );
}
add_action( 'wp_enqueue_scripts', 'luzuk_lite_scripts' );
/**
 * Implement the Custom Header feature.
 */
require get_template_directory() . '/inc/custom-header.php';

/**
 * Implement the Custom style css.
 */
require get_template_directory() . '/inc/style.php';

/**
 * Custom template tags for this theme.
 */
require get_template_directory() . '/inc/template-tags.php';

/**
 * Customizer additions.
 */
require get_template_directory() . '/inc/lz-customizer.php';

/**
 * Custom functions that act independently of the theme templates.
 */
require get_template_directory() . '/inc/lz-customizer-functions.php';
/**
 * Load Jetpack compatibility file.
 */
require get_template_directory() . '/inc/jetpack.php';
/**
 * Load Font Awesome list file.
 */
require get_template_directory() . '/inc/font-awesome-list.php';
/**
 * Load function file.
 */
require get_template_directory() . '/inc/functions.php';
/**
 * Add the Social buttons Widget.
 */
include_once( "functions/widget-social.php" );
require_once('functions/meta-data.php'); // ADD THE META DETA FOR THE PHP


require get_template_directory() . '/inc/notifications.php';

require get_template_directory() . '/inc/theme-tracker.php';

/**
 * Add inline styles for remote notification banner.
 */
function luzuk_lite_notification_styles() {
    $css = '
    .luzuk-lite-remote-notification {
        background: #111;
        color: #fff;
        padding: 20px 0;
        text-align: center;
        border-bottom: 4px solid #e74c3c;
    }
    .luzuk-lite-remote-notification__inner {
        max-width: 1100px;
        margin: 0 auto;
        padding: 0 20px;
    }
    .luzuk-lite-dashboard-notification + .luzuk-lite-dashboard-notification {
        margin-top: 20px;
        border-top: 1px solid #e2e4e7;
        padding-top: 20px;
    }';

    wp_add_inline_style( 'luzuk-lite-style', $css );
}
add_action( 'wp_enqueue_scripts', 'luzuk_lite_notification_styles' );

/**
 * Copyrights
 */
if ( ! function_exists( 'luzuk_lite_copyrights_credit' ) ) {
    function luzuk_lite_copyrights_credit() { 
        global $mts_options
        ?>
        <!--start copyrights-->
        <div class="copyrights">
            <div class="container">
                <div id="copyright-note">
                    <span>Copyright <?php echo '&copy; '.date_i18n(__('Y','Luzuk')); ?> <?php bloginfo( 'name' ); ?>. All Rights Reserved

            <!--<div class="top">
            
                <a href="#top" class="toplink"><?php //_e('Back to Top','Luzuk Premium'); ?> &uarr;</a>
            </div>-->
        </div>
    </div>
</div>
<!--end copyrights-->
<?php }
}

/**
 * Custom Comments template
 */
if ( ! function_exists( 'luzuk_lite_comments' ) ) {
    function luzuk_lite_comment($comment, $args, $depth) { ?>
        <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
            <div id="comment-<?php comment_ID(); ?>" style="position:relative;" itemscope itemtype="http://schema.org/UserComments">
                <div class="comment-author vcard">
                    <?php echo get_avatar( $comment->comment_author_email, 70 ); ?>
                    <div class="comment-metadata">
                        <?php printf('<span class="fn" itemprop="creator" itemscope itemtype="http://schema.org/Person">%s</span>', get_comment_author_link()) ?>
                        <span class="comment-meta">
                          <?php edit_comment_link(__('(Edit)', 'Luzuk Premium'),'  ','') ?>
                      </span>
                  </div>
              </div>
              <?php if ($comment->comment_approved == '0') : ?>
               <em><?php _e('Your comment is awaiting moderation.', 'Luzuk Premium') ?></em>
               <br />
           <?php endif; ?>
           <div class="commentmetadata" itemprop="commentText">
               <?php comment_text() ?>
               <time><?php comment_date(get_option( 'date_format' )); ?></time>
               <span class="reply">
                <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
            </span>
        </div>
    </div>
</li>
<?php }
}

/*
 * Excerpt
 */
function luzuk_lite_excerpt($limit) {
  $excerpt = explode(' ', get_the_excerpt(), $limit);
  if (count($excerpt)>=$limit) {
    array_pop($excerpt);
    $excerpt = implode(" ",$excerpt);
} else {
    $excerpt = implode(" ",$excerpt);
}
$excerpt = preg_replace('`[[^]]*]`','',$excerpt);
return $excerpt;
}

/**
 * Shorthand function to check for more tag in post.
 *
 * @return bool|int
 */
function luzuk_lite_post_has_moretag() {
    return strpos( get_the_content(), '<!--more-->' );
}

if ( ! function_exists( 'luzuk_lite_readmore' ) ) {
    /**
     * Display a "read more" link.
     */
    function luzuk_lite_readmore() {
        ?>
      <!--   <div class="readMore">
            <a href="<?php //echo esc_url( get_the_permalink() ); ?>" title="<?php //the_title_attribute(); ?>" target="_blank">
                <?php //_e( 'Continue Reading', 'Luzuk Premium' ); ?>
            </a>
        </div> -->

     
            <?php if( get_theme_mod('blogpage_button_display','show' ) == 'show') :
                      ?>
                      <?php
                        $bloginner_page_id = get_theme_mod('bloginner_page'); 
                        $bloginnerbutn_text = get_theme_mod('blogbutninner_text', 'Continue Reading');
                        ?>

                  
                         <a href="<?php echo esc_url( get_the_permalink() ); ?>" title="<?php the_title_attribute(); ?>" target="_blank">
                            <?php echo $bloginnerbutn_text; ?>
                                
                            </a>
                   
                      <?php endif ?>



        <?php 
    }
}

/**
 * Breadcrumbs
 */
if (!function_exists('luzuk_lite_the_breadcrumb')) {
    function luzuk_lite_the_breadcrumb() {
        if ( is_front_page() ) {
            return;
        }
        echo '<span typeof="v:Breadcrumb" class="root"><a rel="v:url" property="v:title" href="';
        echo esc_url( home_url() );
        /* =====breadcrumb text====== */
        $breadcrumbhometxtbutton = get_theme_mod('luzuk_breadcrumbhometxt', 'Home'); 
        /* =====breadcrumb text====== */
        echo '">'.(sprintf( __( "$breadcrumbhometxtbutton", 'Luzuk Premium' )));
        echo '</a></span><span class="bread-arrow"><i class="fa fa-square
        "></i></span>';
        if (is_single()) {
            $categories = get_the_category();
            if ( $categories ) {
                $level = 0;
                $hierarchy_arr = array();
                foreach ( $categories as $cat ) {
                    $anc = get_ancestors( $cat->term_id, 'category' );
                    $count_anc = count( $anc );
                    if (  0 < $count_anc && $level < $count_anc ) {
                        $level = $count_anc;
                        $hierarchy_arr = array_reverse( $anc );
                        array_push( $hierarchy_arr, $cat->term_id );
                    }
                }
                if ( empty( $hierarchy_arr ) ) {
                    $category = $categories[0];
                    echo '<span typeof="v:Breadcrumb"><a href="'. esc_url( get_category_link( $category->term_id ) ).'" rel="v:url" property="v:title">'.esc_html( $category->name ).'</a></span><span class="bread-arrow"><i class="fa fa-square
                    "></i></span>';
                } else {
                    foreach ( $hierarchy_arr as $cat_id ) {
                        $category = get_term_by( 'id', $cat_id, 'category' );
                        echo '<span typeof="v:Breadcrumb"><a href="'. esc_url( get_category_link( $category->term_id ) ).'" rel="v:url" property="v:title">'.esc_html( $category->name ).'</a></span><span class="bread-arrow"><i class="fa fa-square
                        "></i></span>';
                    }
                }
            }
            echo "<span><span class='treeEnd'>";
            the_title();
            echo "</span></span>";
        } elseif (is_page()) {
            $parent_id  = wp_get_post_parent_id( get_the_ID() );
            if ( $parent_id ) {
                $breadcrumbs = array();
                while ( $parent_id ) {
                    $page = get_page( $parent_id );
                    $breadcrumbs[] = '<span typeof="v:Breadcrumb"><a href="'.esc_url( get_permalink( $page->ID ) ).'" rel="v:url" property="v:title">'.esc_html( get_the_title($page->ID) ). '</a></span><span><i class="fa fa-square
                    "></i></span>';
                    $parent_id  = $page->post_parent;
                }
                $breadcrumbs = array_reverse( $breadcrumbs );
                foreach ( $breadcrumbs as $crumb ) { echo $crumb; }
            }
            echo "<span><span class='treeEnd'>";
            the_title();
            echo "</span></span>";
        } elseif (is_category()) {
            global $wp_query;
            $cat_obj = $wp_query->get_queried_object();
            $this_cat_id = $cat_obj->term_id;
            $hierarchy_arr = get_ancestors( $this_cat_id, 'category' );
            if ( $hierarchy_arr ) {
                $hierarchy_arr = array_reverse( $hierarchy_arr );
                foreach ( $hierarchy_arr as $cat_id ) {
                    $category = get_term_by( 'id', $cat_id, 'category' );
                    echo '<span typeof="v:Breadcrumb"><a href="'.esc_url( get_category_link( $category->term_id ) ).'" rel="v:url" property="v:title">'.esc_html( $category->name ).'</a></span><span><i class="fa fa-square
                    "></i></span>';
                }
            }
            echo "<span><span class='treeEnd'>";
            single_cat_title();
            echo "</span></span>";
        } elseif (is_author()) {
            echo "<span><span class='treeEnd'>";
            if(get_query_var('author_name')) :
                $curauth = get_user_by('slug', get_query_var('author_name'));
            else :
                $curauth = get_userdata(get_query_var('author'));
            endif;
            echo esc_html( $curauth->nickname );
            echo "</span></span>";
        } elseif (is_search()) {
            echo "<span><span class='treeEnd'>";
            the_search_query();
            echo "</span></span>";
        } elseif (is_tag()) {
            echo "<span><span class='treeEnd'>";
            single_tag_title();
            echo "</span></span>";
        }
    }
}


/*
 * Google Fonts
 */
function luzuk_lite_fonts_url() {
    $fonts_url = '';

    /* Translators: If there are characters in your language that are not
    * supported by Monda, translate this to 'off'. Do not translate
    * into your own language.
    */
    $monda = _x( 'on', 'Monda font: on or off', 'Luzuk Premium' );

    if ( 'off' !== $monda ) {
        $font_families = array();

        if ( 'off' !== $monda ) {
            $font_families[] = urldecode('Roboto:400,500,700,900');
        }

        $query_args = array(
            'family' => urlencode( implode( '|', $font_families ) ),
            //'subset' => urlencode( 'latin,latin-ext' ),
        );

        $fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' );
    }

    return $fonts_url;
}

function luzuk_lite_scripts_styles() {
    wp_enqueue_style( 'theme-slug-fonts', luzuk_lite_fonts_url(), array(), null );

}
add_action( 'wp_enqueue_scripts', 'luzuk_lite_scripts_styles' );

/**
 * WP Mega Menu Plugin Support
 */
function luzuk_lite_megamenu_parent_element( $selector ) {
    return '.primary-navigation .container';
}
add_filter( 'wpmm_container_selector', 'luzuk_lite_megamenu_parent_element' );

/**
 * Determines whether the WooCommerce plugin is active or not.
 * @return bool
 */
function luzuk_lite_is_wc_active() {
    if ( is_multisite() ) {
        include_once( ABSPATH . 'wp-admin/includes/plugin.php' );

        return is_plugin_active( 'woocommerce/woocommerce.php' );
    } else {
        return in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
    }
}

/**
 * WooCommerce
 */
if ( luzuk_lite_is_wc_active() ) {
    if ( !function_exists( 'mts_loop_columns' )) {
        /**
         * Change number or products per row to 3
         *
         * @return int
         */
        function mts_loop_columns() {
            return 3; // 3 products per row
        }
    }
    add_filter( 'loop_shop_columns', 'mts_loop_columns' );

    /**
     * Redefine woocommerce_output_related_products()
     */
    function woocommerce_output_related_products() {
        $args = array(
            'posts_per_page' => 3,
            'columns' => 3,
        );
        woocommerce_related_products($args); // Display 3 products in rows of 1
    }
    
    global $pagenow;
    if ( is_admin() && isset( $_GET['activated'] ) && $pagenow == 'themes.php' ) {
        /**
         * Define WooCommerce image sizes.
         */
        function luzuk_lite_woocommerce_image_dimensions() {
            $catalog = array(
                'width'     => '210',   // px
                'height'    => '155',   // px
                'crop'      => 1        // true
            );
            $single = array(
                'width'     => '326',   // px
                'height'    => '444',   // px
                'crop'      => 1        // true
            );
            $thumbnail = array(
                'width'     => '74',    // px
                'height'    => '74',   // px
                'crop'      => 0        // false
            );
            // Image sizes
            update_option( 'shop_catalog_image_size', $catalog );       // Product category thumbs
            update_option( 'shop_single_image_size', $single );         // Single product image
            update_option( 'shop_thumbnail_image_size', $thumbnail );   // Image gallery thumbs
        }
        add_action( 'init', 'luzuk_lite_woocommerce_image_dimensions', 1 );
    }


    /**
     * Change the number of product thumbnails to show per row to 4.
     *
     * @return int
     */
    function luzuk_lite_woocommerce_thumb_cols() {
     return 4; // .last class applied to every 4th thumbnail
 }
 add_filter( 'woocommerce_product_thumbnails_columns', 'luzuk_lite_woocommerce_thumb_cols' );


    /**
     * Ensure cart contents update when products are added to the cart via AJAX.
     *
     * @param $fragments
     *
     * @return mixed
     */
    function luzuk_lite_header_add_to_cart_fragment( $fragments ) {
        global $woocommerce;
        ob_start(); ?>
        
        <a class="cart-contents" href="<?php echo esc_url( $woocommerce->cart->get_cart_url() ); ?>" title="<?php _e( 'View your shopping cart', 'Luzuk Premium' ); ?>"><?php echo sprintf( _n( '%d item', '%d items', $woocommerce->cart->cart_contents_count, 'Luzuk Premium' ), $woocommerce->cart->cart_contents_count );?> - <?php echo $woocommerce->cart->get_cart_total(); ?></a>
        
        <?php $fragments['a.cart-contents'] = ob_get_clean();
        return $fragments;
    }
    add_filter( 'add_to_cart_fragments', 'luzuk_lite_header_add_to_cart_fragment' );

    /**
     * Optimize WooCommerce Scripts
     * Updated for WooCommerce 2.0+
     * Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
     */
    function luzuk_lite_manage_woocommerce_styles() {
        //remove generator meta tag
        remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );

        //first check that woo exists to prevent fatal errors
        if ( function_exists( 'is_woocommerce' ) ) {
            //dequeue scripts and styles
            if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
                wp_dequeue_style( 'woocommerce-layout' );
                wp_dequeue_style( 'woocommerce-smallscreen' );
                wp_dequeue_style( 'woocommerce-general' );
                wp_dequeue_style( 'wc-bto-styles' ); //Composites Styles
                wp_dequeue_script( 'wc-add-to-cart' );
                wp_dequeue_script( 'wc-cart-fragments' );
                wp_dequeue_script( 'woocommerce' );
                wp_dequeue_script( 'jquery-blockui' );
                wp_dequeue_script( 'jquery-placeholder' );



            }
        }
    }
    add_action( 'wp_enqueue_scripts', 'luzuk_lite_manage_woocommerce_styles', 99 );

    // Remove WooCommerce generator tag.
    remove_action('wp_head', 'wc_generator_tag');
}

/**
 * Post Layout for Archives
 */
if ( ! function_exists( 'luzuk_lite_archive_post' ) ) {
    /**
     * Display a post of specific layout.
     * 
     * @param string $layout
     */
    function luzuk_lite_archive_post( $layout = '' ) { 
        $luzuk_lite_full_posts = get_theme_mod('luzuk_lite_full_posts', '0'); ?>
        <article class="post excerpt">
                <?php
            if ( is_sticky() && is_home() && ! is_paged() ) {
                printf( '<span class="sticky-post">%s</span>', __( 'Featured', 'Luzuk Premium' ) );
            } ?>
            <?php if ( is_single() ) : ?>
                <div class="post-date-publishable"><?php the_time( get_option( 'date_format' ) ); ?></div>
            <?php endif; ?>



<!-- category page -->
 <div class="inner-blog-post col-md-6 col-sm-6 col-xs-12 wow zoomIn">
       <div class="inner-blogpost">
        <?php if ( empty($luzuk_lite_full_posts) ) : ?>
                <?php if ( has_post_thumbnail() ) { ?>
         <div class="ht-blog-thumbnail">

           <a href="<?php the_permalink(); ?>">
                <?php the_post_thumbnail('Luzuk Premium-featured',array('title' => '')); ?>
                <?php if (function_exists('wp_review_show_total')) wp_review_show_total(true, 'latestPost-review-wrapper'); ?>
          </a>
          <div class="overlay">
              <div class="box">
                  <div class="content">
                      <a href="<?php the_permalink(); ?>" class="fa fa-link"></a>
                  </div>
              </div>
          </div>
        </div>

   <?php } else { ?>
    <?php } ?>

    <div class="inner-blogpost-info">
       <?php if( get_theme_mod('postdate_button_display','show' ) == 'show') :
               ?>
      <div class="blog-date">
          by <?php echo get_the_author(); ?> / on <span> <?php echo get_the_date( 'j F, Y' ); ?></span>
      </div>
      <?php endif ?> 

         <a href="<?php the_permalink(); ?>"><h2><?php the_title(); ?></h2></a>
          <div class="inner-blog-excerpt">
               <?php echo luzuk_lite_excerpt(45); ?>
          </div>
       <?php if( get_theme_mod('postsocialsshare_button_display','show' ) == 'show') :
        ?>
 

        <div class="socialMedia">
          <ul>
            <li><a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink();?>" target="_blank" class="site-button sharp"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
            <li><a href="https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink();?>&title=<?php the_title();?>&source=<?php the_title();?>" target="_blank" class="site-button sharp"><i class="fa fa-linkedin" aria-hidden="true"></i></a></li>
            
            <li><a href="https://twitter.com/share?url=<?php the_permalink();?>&amp;text=<?php the_title();?>" class="site-button sharp" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
            <li><a href="http://www.digg.com/submit?url=<?php the_permalink();?>" target="_blank" class="site-button sharp"><i class="fa fa-digg" aria-hidden="true"></i></a></li>
            <li class="share-button"><a href="#" class="site-button sharp"><i class="fa fa-share-alt"></i></a></li>
          </ul>
            <div class="clearfix"></div>
        </div>
    <?php endif ?>  


      <?php else : ?>
        <?php if (luzuk_lite_post_has_moretag()) : ?>
    
   <div class="clearfix"></div>
 </div>
   <div class="clearfix"></div> 
                   
           </div>
            
       </div> 

<!-- END category page -->

 
                    <?php endif; ?>
                <?php endif; ?>
            <div class="clearfix"></div>
            </article>
       
        <?php }
    }


/**
 * Extras
 */
add_action( 'customize_controls_print_styles', 'luzuk_customizer_stylesheet' );

function luzuk_load_custom_wp_admin_style( $hook ) {
    if ( 'appearance_page_about-luzuk_mag' !== $hook ) {
        return;
    }
    wp_enqueue_style( 'luzuk_mag-custom-admin-css', get_template_directory_uri() . '/css/themeinfo.css', false, '1.0.0' );
}
add_action( 'admin_enqueue_scripts', 'luzuk_load_custom_wp_admin_style' );


// Adding Custome Post Type
function createCustomeTypes() {

    // Testimonials Custome type
    register_post_type( 'our-testimonial',
        array(
            'labels' => array(
                'name' => __( 'Testimonials' , 'Luzuk Premium'),
                'singular_name' => __( 'Testimonial', 'Luzuk Premium' )
            ),
            'public' => true,
            'featured_image'=>true,
            'has_archive' => true,
            'menu_icon' => 'dashicons-format-chat', //  The url to the icon to be used for this menu or the name of the icon from the iconfont
            'supports' => array('title', 'editor', 'thumbnail', 'page-attributes'),
        )
    );

      // Project Custome type
    register_post_type( 'our-project',
        array(
            'labels' => array(
                'name' => __( 'Projects' , 'Luzuk Premium'),
                'singular_name' => __( 'Project', 'Luzuk Premium' )
            ),
            'public' => true,
            'featured_image'=>true,
            'has_archive' => true,
            'menu_icon' => 'dashicons-admin-page', //  The url to the icon to be used for this menu or the name of the icon from the iconfont
            'supports' => array('title', 'editor', 'thumbnail', 'page-attributes'),
        )
    );

       // Services Custome type
    register_post_type( 'our-services',
        array(
            'labels' => array(
                'name' => __( 'Services' , 'Luzuk Premium'),
                'singular_name' => __( 'Service', 'Luzuk Premium' )
            ),
            'public' => true,
            'featured_image'=>true,
            'has_archive' => true,
            'menu_icon' => 'dashicons-media-document', //  The url to the icon to be used for this menu or the name of the icon from the iconfont
            'supports' => array('title', 'editor', 'thumbnail', 'page-attributes'),
        )
    );


     // FAQ Custome type
    register_post_type( 'our-faq',
        array(
            'labels' => array(
                'name' => __( 'FAQs' , 'Luzuk'),
                'singular_name' => __( 'FAQ', 'Luzuk' )
            ),
            'public' => true,
            'featured_image'=>true,
            'has_archive' => true,
            'menu_icon' => 'dashicons-format-status', //  The url to the icon to be used for this menu or the name of the icon from the iconfont
            'supports' => array('title', 'editor', 'page-attributes'),
        )
    );
}
add_action( 'init', 'createCustomeTypes' );

function testimonialsDesignationCutomFieldHtml(){
    global $post;
    // get the saved value 
    $designation = get_post_meta($post->ID, 'designation', false);
    $designation = !empty($designation[0])?$designation[0]:'';

    // Use nonce for verification
    wp_nonce_field(plugin_basename(__FILE__), 'testimonials_social_media_links');
    echo '<table id="socialUrls" width="100%">';
    echo '<tr> 
    <th width="10%"><span class="dashicons dashicons-welcome-learn-more
"></span></th>
    <td width="90%"><input type="text" name="designation" width="100%" placeholder="Designation" value="'.$designation.'" /></td>
    </tr>';
    echo '</table>';
}
function addtestimonialsHook(){
    add_meta_box('luzuk-testimonials-designation', __('Add Designation', 'Luzuk'), 'testimonialsDesignationCutomFieldHtml', 'our-testimonial', 'normal', 'high');
}
/**
 * Method to save the custom field for the testimonial posts 
 * When the post is saved, saves our custom data 
 * @param integer $post_id - An id of the post 
 * @author Luzuk <support@luzuk.com>
 * @since V 1.1  19 Jun 2020
 **/
function savetestimonialsSocialCutomData($post_id){
    // If it is our form has not been submitted, so we dont want to do anything
    if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
        return;
    if(empty($_POST['designation']) ){
        // echo 'empty --> '; exit;       
        return;
    }

    $designation = $_POST['designation'];
    update_post_meta($post_id, 'designation', $designation);
}
add_action('add_meta_boxes', 'addtestimonialsHook');
add_action('save_post', 'savetestimonialsSocialCutomData');
/***** End Add custome fields for testimonials section *****/



/**/
// for slider second button 
function slider2BtnUrlCutomFieldHtml(){
    global $post;
    // get the saved value 
    $designation = get_post_meta($post->ID, 'designation', false);
    $designation = !empty($designation[0])?$designation[0]:'';

    $sliderbtn1url = get_post_meta($post->ID, 'sliderbtn1url', false);
    $sliderbtn1url = !empty($sliderbtn1url[0])?$sliderbtn1url[0]:'';

    // Use nonce for verification
    wp_nonce_field(plugin_basename(__FILE__), 'slider2Btn_links');
    echo '<table id="slider2Btn" width="100%">';
    echo '<tr> 
    <th width="10%"><span class="dashicons dashicons-info"></span></th>
    <td width="90%"><input type="text" name="designation" width="100%" placeholder="Slider First Button Url Here" value="'.$designation.'" /></td>
    </tr>';
    echo '</table>';


    echo '<table id="slider2Btn" width="100%">';
    echo '<tr> 
    <th width="10%"><span class="dashicons dashicons-info"></span></th>
    <td width="90%"><input type="text" name="sliderbtn1url" width="100%" placeholder="Slider Second Button Url Here" value="'.$sliderbtn1url.'" /></td>
    </tr>';
    echo '</table>';
}

function addSlider2btnHook(){
    add_meta_box('slider2_btn_url', __('Add Slider Button Url Here', 'luzuk-premium'), 'slider2BtnUrlCutomFieldHtml', 'slider', 'normal', 'high');
}
function saveslider2btnUrlCutomData($post_id){
    // If it is our form has not been submitted, so we dont want to do anything
    if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
        return;
    $designation = !empty($_POST['designation'])?$_POST['designation']:'';
    update_post_meta($post_id, 'designation', $designation);

    $sliderbtn1url = !empty($_POST['sliderbtn1url'])?$_POST['sliderbtn1url']:'';
    update_post_meta($post_id, 'sliderbtn1url', $sliderbtn1url);
}
add_action('add_meta_boxes', 'addSlider2btnHook');
add_action('save_post', 'saveslider2btnUrlCutomData');


// for slider second button text

function slider2BtntextCutomFieldHtml(){
    global $post;
    // get the saved value 
    $slider2btntext = get_post_meta($post->ID, 'slider2btntext', false);
    $slider2btntext = !empty($slider2btntext[0])?$slider2btntext[0]:'';

    $slider1btntext = get_post_meta($post->ID, 'slider1btntext', false);
    $slider1btntext = !empty($slider1btntext[0])?$slider1btntext[0]:'';

    // Use nonce for verification
    wp_nonce_field(plugin_basename(__FILE__), 'sliderbtn_text');
    echo '<table id="sliderbtntext" width="100%">';
    echo '<tr> 
    <th width="10%"><span class="dashicons dashicons-edit-large"></span></th>
    <td width="90%"><input type="text" name="slider1btntext" width="100%" placeholder="Slider First Button Text" value="'.$slider1btntext.'" /></td>
    </tr>';
    echo '</table>';

    echo '<table id="sliderbtntext" width="100%">';
    echo '<tr> 
    <th width="10%"><span class="dashicons dashicons-edit-large"></span></th>
    <td width="90%"><input type="text" name="slider2btntext" width="100%" placeholder="Slider Second Button Text" value="'.$slider2btntext.'" /></td>
    </tr>';
    echo '</table>';
}

function addslider2BtntextHook(){
    add_meta_box('test_slider2btntext', __('Add Slider Button Text (Do not insert any html tags)', 'luzuk-premium'), 'slider2BtntextCutomFieldHtml', 'slider', 'normal', 'high');
}

function saveslider2BtntextCutomData($post_id){
    // If it is our form has not been submitted, so we dont want to do anything
    if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
        return;
    if (isset($_POST['slider2btntext'])) {

        $slider2btntext = $_POST['slider2btntext'];
        update_post_meta($post_id, 'slider2btntext', $slider2btntext);
        
    }

    if (isset($_POST['slider1btntext'])) {

        $slider1btntext = $_POST['slider1btntext'];
        update_post_meta($post_id, 'slider1btntext', $slider1btntext);
        
    }
}
add_action('add_meta_boxes', 'addslider2BtntextHook');
add_action('save_post', 'saveslider2BtntextCutomData');




/**
 * Method to save the custom field for the testimonial posts 
 * When the post is saved, saves our custom data 
 * @param integer $post_id - An id of the post 
 * @author Luzuk <support@luzuk.com>
 * @since V 1.1  09th Oct 2017
 **/
function getFonts($list = false, $index = -1){
    $fonts = array(
        "'Archivo Narrow', sans-serif",
        "'Archivo Black', sans-serif",
        "'Arial', sans-serif",
        "'Arimo', sans-serif",
        "'Allerta', sans-serif",
        "'Alex Brush', cursive",
        "'Berkshire Swash', cursive",
        "'Bitter', serif",
        "'Carter One', cursive",
        "'Comfortaa', cursive",
        "'Dancing Script', cursive",
        "'Dosis', sans-serif",
        "'Droid Serif', serif",
        "'Francois One', sans-serif",
        "'Germania One', cursive",
        "'Hammersmith One', sans-serif",
        "'Indie Flower', cursive",
        "'Lobster', cursive",
        "'Lato', sans-serif",
        "'Muli', sans-serif",
        "'Nosifer', cursive",
        "'Oswald', sans-serif",
        "'PT Sans Caption', sans-serif",
        "'PT Sans Narrow', sans-serif",
        "'PT Sans', sans-serif",
        "'Pacifico', cursive",
        "'Poppins', sans-serif",
        "'Open Sans', sans-serif",
        "'Montserrat', sans-serif",
        "'Pontano Sans', sans-serif",
        "'Questrial', sans-serif",
        "'Roboto Mono', monospace",
        "'Roboto Slab', serif",
        "'Roboto', sans-serif",
        "'Rubik', sans-serif",
        "'Source Serif Pro', serif",
        "'Titillium Web', sans-serif",
        "'Biryani', sans-serif", 
        "'Montserrat Alternates', sans-serif",
        "'Work Sans', sans-serif",
        "'Arvo', serif",
        "'Passion One', cursive",
        "'Schoolbell', cursive",
        
    );
    if($list == true){
        foreach ($fonts as $key => $value) {
            $fonts[$key] = str_replace("'", "", $value);
        }
        asort($fonts);
        return $fonts;
    }
    $len = count($fonts);
    if(is_integer($index) && $index >= 0 && $index < $len){
        return $fonts[$index];
    }else{
        return $fonts;
    }
}

// dropdown animation
function getAnimations($list = false, $index = -1){
    $animations = array(
        "zoomIn .3s ease-in-out",
        "bounceInUp .5s ease-in-out",
        "fadeInUp .3s ease-in-out",
    );
    if($list == true){
        foreach ($animations as $key => $value) {
            $animations[$key] = str_replace("'", "", $value);
        }
        asort($animations);
        return $animations;
    }
    $len = count($animations);
    if(is_integer($index) && $index >= 0 && $index < $len){
        return $animations[$index];
    }else{
        return $animations;
    }
}

// menu font case
function getfontcase($list = false, $index = -1){
    $fontcase = array(
        "default",
        "capitalize",
        "lowercase",
        "uppercase",
    );
    if($list == true){
        foreach ($fontcase as $key => $value) {
            $fontcase[$key] = str_replace("'", "", $value);
        }
        asort($fontcase);
        return $fontcase;
    }
    $len = count($fontcase);
    if(is_integer($index) && $index >= 0 && $index < $len){
        return $fontcase[$index];
    }else{
        return $fontcase;
    }
}

//Blog layout
function getBlogLayout($list = false, $index = -1){
    $bloglayout = array(
        'No Sidebar',
        'Left Sidebar',
        'Right Sidebar'
    );
    if($list == true){
        foreach ($bloglayout as $key => $value) {
            $bloglayout[$key] = str_replace("'", "", $value);
        }
        asort($bloglayout);
        return $bloglayout;
    }
    $len = count($bloglayout);
    if(is_integer($index) && $index >= 0 && $index < $len){
        return $bloglayout[$index];
    }else{
        return $bloglayout;
    }
}

//Single post Blog layout
function getBlogSPostLayout($list = false, $index = -1){
    $blogspostlayout = array(
        'No Sidebar',
        'Left Sidebar',
        'Right Sidebar'
    );
    if($list == true){
        foreach ($blogspostlayout as $key => $value) {
            $blogspostlayout[$key] = str_replace("'", "", $value);
        }
        asort($blogspostlayout);
        return $blogspostlayout;
    }
    $len = count($blogspostlayout);
    if(is_integer($index) && $index >= 0 && $index < $len){
        return $blogspostlayout[$index];
    }else{
        return $blogspostlayout;
    }
}

//Page layout
function getPageLayout($list = false, $index = -1){
    $pagelayout = array(
        'No Sidebar',
        'Left Sidebar',
        'Right Sidebar'
    );
    if($list == true){
        foreach ($pagelayout as $key => $value) {
            $pagelayout[$key] = str_replace("'", "", $value);
        }
        asort($pagelayout);
        return $pagelayout;
    }
    $len = count($pagelayout);
    if(is_integer($index) && $index >= 0 && $index < $len){
        return $pagelayout[$index];
    }else{
        return $pagelayout;
    }
}

/**
 * show the pagination for the custome or normal post types
 * @param object $customeQuery - An onject of a query post
 * @author Luzuk <support@luzuk.com>
 * @since V 1.1  09th Nov 2017
 **/
function lzGetPagination($customQuery){
    if(!is_object($customQuery)){return false;}
    $total_pages = $customQuery->max_num_pages;
    $big = 999999999;
    $current_page = max(1, get_query_var('paged'));
    echo paginate_links(array(
        'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
        'format' => '?paged=%#%',
        'current' => $current_page,
        'total' => $total_pages,    
    ));
}


if ( class_exists( 'WP_Customize_Panel' ) ) {

  class LUZUK_WP_Customize_Panel extends WP_Customize_Panel {

    public $panel;

    public $type = 'luzuk_panel';

    public function json() {

      $array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'type', 'panel', ) );
      $array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
      $array['content'] = $this->get_content();
      $array['active'] = $this->active();
      $array['instanceNumber'] = $this->instance_number;

      return $array;

    }

  }

}

if ( class_exists( 'WP_Customize_Section' ) ) {

  class LUZUK_WP_Customize_Section extends WP_Customize_Section {

    public $section;

    public $type = 'luzuk_section';

    public function json() {

      $array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'panel', 'type', 'description_hidden', 'section', ) );
      $array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
      $array['content'] = $this->get_content();
      $array['active'] = $this->active();
      $array['instanceNumber'] = $this->instance_number;

      if ( $this->panel ) {

        $array['customizeAction'] = sprintf( 'Customizing &#9656; %s', esc_html( $this->manager->get_panel( $this->panel )->title ) );

      } else {

        $array['customizeAction'] = 'Customizing';

      }

      return $array;

    }

  }

}
// for overlay opacity
function luzuk_customize_opacity_range() {
return apply_filters(
'luzuk_customize_opacity_range',
array(
'min' => 0,
'max' => 100,
'step' => 5,
)
);
}

function luzuk_customize_preview_init() {
    $theme_version = wp_get_theme()->get( 'Version' );

    wp_add_inline_script(
        'luzuk-customize-preview',
        sprintf(
            'wp.customize.selectiveRefresh.partialConstructor[ %1$s ].prototype.attrs = %2$s;',
            wp_json_encode( 'cover_opacity' ),
            wp_json_encode( luzuk_customize_opacity_range() )
        )
    );
}
add_action( 'customize_preview_init', 'luzuk_customize_preview_init' );

// for excerpt height
function luzuk_customize_excerpt_length_range() {
return apply_filters(
'luzuk_customize_excerpt_length_range',
array(
'min' => 0,
'max' => 100,
'step' => 5,
)
);
}

function luzuk_customize_excerpt_length_init() {
    $theme_version = wp_get_theme()->get( 'Version' );

  
    wp_add_inline_script(
        'luzuk-customize-preview',
        sprintf(
            'wp.customize.selectiveRefresh.partialConstructor[ %1$s ].prototype.attrs = %2$s;',
            wp_json_encode( 'excerpt_length' ),
            wp_json_encode( luzuk_customize_excerpt_length_range() )
        )
    );
}

add_action( 'customize_excerpt_length_init', 'luzuk_customize_excerpt_length_init' );

// for featured image height
function luzuk_customize_featured_height_range() {
return apply_filters(
'luzuk_customize_featured_height_range',
array(
'min' => 100,
'max' => 500,
'step' => 5,
)
);
}

function luzuk_customize_featured_height_init() {
    $theme_version = wp_get_theme()->get( 'Version' );

  
    wp_add_inline_script(
        'luzuk-customize-preview',
        sprintf(
            'wp.customize.selectiveRefresh.partialConstructor[ %1$s ].prototype.attrs = %2$s;',
            wp_json_encode( 'featured_img_height' ),
            wp_json_encode( luzuk_customize_featured_height_range() )
        )
    );
}

add_action( 'customize_preview_featured_height_init', 'luzuk_customize_featured_height_init' );

require get_parent_theme_file_path( '/inc/tab-control.php' );

// Luzuk Slider plugin recommend

/**
 * This file represents an example of the code that themes would use to register
 * the required plugins.
 *
 * It is expected that theme authors would copy and paste this code into their
 * functions.php file, and amend to suit.
 *
 * @see http://tgmpluginactivation.com/configuration/ for detailed documentation.
 *
 * @package    TGM-Plugin-Activation
 * @subpackage Example
 * @version    2.6.1 for parent theme Luzuk Slider
 * @author     Thomas Griffin, Gary Jones, Juliette Reinders Folmer
 * @copyright  Copyright (c) 2011, Thomas Griffin
 * @license    http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
 * @link       https://github.com/TGMPA/TGM-Plugin-Activation
 */

/**
 * Include the TGM_Plugin_Activation class.
 *
 * Depending on your implementation, you may want to change the include call:
 *
 * Parent Theme:
 * require_once get_template_directory() . '/path/to/class-tgm-plugin-activation.php';
 *
 * Child Theme:
 * require_once get_stylesheet_directory() . '/path/to/class-tgm-plugin-activation.php';
 *
 * Plugin:
 * require_once dirname( __FILE__ ) . '/path/to/class-tgm-plugin-activation.php';
 */
require_once get_template_directory() . '/inc/TGM-Plugin-Activation-2.6.1-slider/class-tgm-plugin-activation.php';

add_action( 'tgmpa_register', 'luzuk_slider_register_required_plugins' );

/**
 * Register the required plugins for this theme.
 *
 * In this example, we register five plugins:
 * - one included with the TGMPA library
 * - two from an external source, one from an arbitrary source, one from a GitHub repository
 * - two from the .org repo, where one demonstrates the use of the `is_callable` argument
 *
 * The variables passed to the `tgmpa()` function should be:
 * - an array of plugin arrays;
 * - optionally a configuration array.
 * If you are not changing anything in the configuration array, you can remove the array and remove the
 * variable from the function call: `tgmpa( $plugins );`.
 * In that case, the TGMPA default settings will be used.
 *
 * This function is hooked into `tgmpa_register`, which is fired on the WP `init` action on priority 10.
 */
function luzuk_slider_register_required_plugins() {
    /*
     * Array of plugin arrays. Required keys are name and slug.
     * If the source is NOT from the .org repo, then source is also required.
     */
    $plugins = array(

        // This is an example of how to include a plugin from the WordPress Plugin Repository.
        array(
            'name'      => 'Luzuk Slider',
            'slug'      => 'luzuk-slider',
            'required'  => false,
        ),

    );

    /*
     * Array of configuration settings. Amend each line as needed.
     *
     * TGMPA will start providing localized text strings soon. If you already have translations of our standard
     * strings available, please help us make TGMPA even better by giving us access to these translations or by
     * sending in a pull-request with .po file(s) with the translations.
     *
     * Only uncomment the strings in the config array if you want to customize the strings.
     */
    $config = array(
        'id'           => 'luzuk-slider',                 // Unique ID for hashing notices for multiple instances of TGMPA.
        'default_path' => '',                      // Default absolute path to bundled plugins.
        'menu'         => 'tgmpa-install-plugins', // Menu slug.
        'parent_slug'  => 'themes.php',            // Parent menu slug.
        'capability'   => 'edit_theme_options',    // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
        'has_notices'  => true,                    // Show admin notices or not.
        'dismissable'  => true,                    // If false, a user cannot dismiss the nag message.
        'dismiss_msg'  => '',                      // If 'dismissable' is false, this message will be output at top of nag.
        'is_automatic' => false,                   // Automatically activate plugins after installation or not.
        'message'      => '',                      // Message to output right before the plugins table.

        /*
        'strings'      => array(
            'page_title'                      => __( 'Install Required Plugins', 'luzuk-slider' ),
            'menu_title'                      => __( 'Install Plugins', 'luzuk-slider' ),
            /* translators: %s: plugin name. * /
            'installing'                      => __( 'Installing Plugin: %s', 'luzuk-slider' ),
            /* translators: %s: plugin name. * /
            'updating'                        => __( 'Updating Plugin: %s', 'luzuk-slider' ),
            'oops'                            => __( 'Something went wrong with the plugin API.', 'luzuk-slider' ),
            'notice_can_install_required'     => _n_noop(
                /* translators: 1: plugin name(s). * /
                'This theme requires the following plugin: %1$s.',
                'This theme requires the following plugins: %1$s.',
                'luzuk-slider'
            ),
            'notice_can_install_recommended'  => _n_noop(
                /* translators: 1: plugin name(s). * /
                'This theme recommends the following plugin: %1$s.',
                'This theme recommends the following plugins: %1$s.',
                'luzuk-slider'
            ),
            'notice_ask_to_update'            => _n_noop(
                /* translators: 1: plugin name(s). * /
                'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.',
                'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.',
                'luzuk-slider'
            ),
            'notice_ask_to_update_maybe'      => _n_noop(
                /* translators: 1: plugin name(s). * /
                'There is an update available for: %1$s.',
                'There are updates available for the following plugins: %1$s.',
                'luzuk-slider'
            ),
            'notice_can_activate_required'    => _n_noop(
                /* translators: 1: plugin name(s). * /
                'The following required plugin is currently inactive: %1$s.',
                'The following required plugins are currently inactive: %1$s.',
                'luzuk-slider'
            ),
            'notice_can_activate_recommended' => _n_noop(
                /* translators: 1: plugin name(s). * /
                'The following recommended plugin is currently inactive: %1$s.',
                'The following recommended plugins are currently inactive: %1$s.',
                'luzuk-slider'
            ),
            'install_link'                    => _n_noop(
                'Begin installing plugin',
                'Begin installing plugins',
                'luzuk-slider'
            ),
            'update_link'                     => _n_noop(
                'Begin updating plugin',
                'Begin updating plugins',
                'luzuk-slider'
            ),
            'activate_link'                   => _n_noop(
                'Begin activating plugin',
                'Begin activating plugins',
                'luzuk-slider'
            ),
            'return'                          => __( 'Return to Required Plugins Installer', 'luzuk-slider' ),
            'plugin_activated'                => __( 'Plugin activated successfully.', 'luzuk-slider' ),
            'activated_successfully'          => __( 'The following plugin was activated successfully:', 'luzuk-slider' ),
            /* translators: 1: plugin name. * /
            'plugin_already_active'           => __( 'No action taken. Plugin %1$s was already active.', 'luzuk-slider' ),
            /* translators: 1: plugin name. * /
            'plugin_needs_higher_version'     => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'luzuk-slider' ),
            /* translators: 1: dashboard link. * /
            'complete'                        => __( 'All plugins installed and activated successfully. %1$s', 'luzuk-slider' ),
            'dismiss'                         => __( 'Dismiss this notice', 'luzuk-slider' ),
            'notice_cannot_install_activate'  => __( 'There are one or more required or recommended plugins to install, update or activate.', 'luzuk-slider' ),
            'contact_admin'                   => __( 'Please contact the administrator of this site for help.', 'luzuk-slider' ),

            'nag_type'                        => '', // Determines admin notice type - can only be one of the typical WP notice classes, such as 'updated', 'update-nag', 'notice-warning', 'notice-info' or 'error'. Some of which may not work as expected in older WP versions.
        ),
        */
    );

    tgmpa( $plugins, $config );
}


// Luzuk Team plugin recommend

/**
 * This file represents an example of the code that themes would use to register
 * the required plugins.
 *
 * It is expected that theme authors would copy and paste this code into their
 * functions.php file, and amend to suit.
 *
 * @see http://tgmpluginactivation.com/configuration/ for detailed documentation.
 *
 * @package    TGM-Plugin-Activation
 * @subpackage Example
 * @version    2.6.1 for parent theme Luzuk Team
 * @author     Thomas Griffin, Gary Jones, Juliette Reinders Folmer
 * @copyright  Copyright (c) 2011, Thomas Griffin
 * @license    http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
 * @link       https://github.com/TGMPA/TGM-Plugin-Activation
 */

/**
 * Include the TGM_Plugin_Activation class.
 *
 * Depending on your implementation, you may want to change the include call:
 *
 * Parent Theme:
 * require_once get_template_directory() . '/path/to/class-tgm-plugin-activation.php';
 *
 * Child Theme:
 * require_once get_stylesheet_directory() . '/path/to/class-tgm-plugin-activation.php';
 *
 * Plugin:
 * require_once dirname( __FILE__ ) . '/path/to/class-tgm-plugin-activation.php';
 */
require_once get_template_directory() . '/inc/TGM-Plugin-Activation-2.6.1/class-tgm-plugin-activation.php';

add_action( 'tgmpa_register', 'luzuk_team_register_required_plugins' );

/**
 * Register the required plugins for this theme.
 *
 * In this example, we register five plugins:
 * - one included with the TGMPA library
 * - two from an external source, one from an arbitrary source, one from a GitHub repository
 * - two from the .org repo, where one demonstrates the use of the `is_callable` argument
 *
 * The variables passed to the `tgmpa()` function should be:
 * - an array of plugin arrays;
 * - optionally a configuration array.
 * If you are not changing anything in the configuration array, you can remove the array and remove the
 * variable from the function call: `tgmpa( $plugins );`.
 * In that case, the TGMPA default settings will be used.
 *
 * This function is hooked into `tgmpa_register`, which is fired on the WP `init` action on priority 10.
 */
function luzuk_team_register_required_plugins() {
    /*
     * Array of plugin arrays. Required keys are name and slug.
     * If the source is NOT from the .org repo, then source is also required.
     */
    $plugins = array(

        // This is an example of how to include a plugin from the WordPress Plugin Repository.
        array(
            'name'      => 'Luzuk Team',
            'slug'      => 'luzuk-team',
            'required'  => false,
        ),
      
    );  
    /*
     * Array of configuration settings. Amend each line as needed.
     *
     * TGMPA will start providing localized text strings soon. If you already have translations of our standard
     * strings available, please help us make TGMPA even better by giving us access to these translations or by
     * sending in a pull-request with .po file(s) with the translations.
     *
     * Only uncomment the strings in the config array if you want to customize the strings.
     */
    $config = array(
        'id'           => 'luzuk-team',                 // Unique ID for hashing notices for multiple instances of TGMPA.
        'default_path' => '',                      // Default absolute path to bundled plugins.
        'menu'         => 'tgmpa-install-plugins', // Menu slug.
        'parent_slug'  => 'themes.php',            // Parent menu slug.
        'capability'   => 'edit_theme_options',    // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
        'has_notices'  => true,                    // Show admin notices or not.
        'dismissable'  => true,                    // If false, a user cannot dismiss the nag message.
        'dismiss_msg'  => '',                      // If 'dismissable' is false, this message will be output at top of nag.
        'is_automatic' => false,                   // Automatically activate plugins after installation or not.
        'message'      => '',                      // Message to output right before the plugins table.

        /*
        'strings'      => array(
            'page_title'                      => __( 'Install Required Plugins', 'luzuk-team' ),
            'menu_title'                      => __( 'Install Plugins', 'luzuk-team' ),
            /* translators: %s: plugin name. * /
            'installing'                      => __( 'Installing Plugin: %s', 'luzuk-team' ),
            /* translators: %s: plugin name. * /
            'updating'                        => __( 'Updating Plugin: %s', 'luzuk-team' ),
            'oops'                            => __( 'Something went wrong with the plugin API.', 'luzuk-team' ),
            'notice_can_install_required'     => _n_noop(
                /* translators: 1: plugin name(s). * /
                'This theme requires the following plugin: %1$s.',
                'This theme requires the following plugins: %1$s.',
                'luzuk-team'
            ),
            'notice_can_install_recommended'  => _n_noop(
                /* translators: 1: plugin name(s). * /
                'This theme recommends the following plugin: %1$s.',
                'This theme recommends the following plugins: %1$s.',
                'luzuk-team'
            ),
            'notice_ask_to_update'            => _n_noop(
                /* translators: 1: plugin name(s). * /
                'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.',
                'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.',
                'luzuk-team'
            ),
            'notice_ask_to_update_maybe'      => _n_noop(
                /* translators: 1: plugin name(s). * /
                'There is an update available for: %1$s.',
                'There are updates available for the following plugins: %1$s.',
                'luzuk-team'
            ),
            'notice_can_activate_required'    => _n_noop(
                /* translators: 1: plugin name(s). * /
                'The following required plugin is currently inactive: %1$s.',
                'The following required plugins are currently inactive: %1$s.',
                'luzuk-team'
            ),
            'notice_can_activate_recommended' => _n_noop(
                /* translators: 1: plugin name(s). * /
                'The following recommended plugin is currently inactive: %1$s.',
                'The following recommended plugins are currently inactive: %1$s.',
                'luzuk-team'
            ),
            'install_link'                    => _n_noop(
                'Begin installing plugin',
                'Begin installing plugins',
                'luzuk-team'
            ),
            'update_link'                     => _n_noop(
                'Begin updating plugin',
                'Begin updating plugins',
                'luzuk-team'
            ),
            'activate_link'                   => _n_noop(
                'Begin activating plugin',
                'Begin activating plugins',
                'luzuk-team'
            ),
            'return'                          => __( 'Return to Required Plugins Installer', 'luzuk-team' ),
            'plugin_activated'                => __( 'Plugin activated successfully.', 'luzuk-team' ),
            'activated_successfully'          => __( 'The following plugin was activated successfully:', 'luzuk-team' ),
            /* translators: 1: plugin name. * /
            'plugin_already_active'           => __( 'No action taken. Plugin %1$s was already active.', 'luzuk-team' ),
            /* translators: 1: plugin name. * /
            'plugin_needs_higher_version'     => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'luzuk-team' ),
            /* translators: 1: dashboard link. * /
            'complete'                        => __( 'All plugins installed and activated successfully. %1$s', 'luzuk-team' ),
            'dismiss'                         => __( 'Dismiss this notice', 'luzuk-team' ),
            'notice_cannot_install_activate'  => __( 'There are one or more required or recommended plugins to install, update or activate.', 'luzuk-team' ),
            'contact_admin'                   => __( 'Please contact the administrator of this site for help.', 'luzuk-team' ),

            'nag_type'                        => '', // Determines admin notice type - can only be one of the typical WP notice classes, such as 'updated', 'update-nag', 'notice-warning', 'notice-info' or 'error'. Some of which may not work as expected in older WP versions.
        ),
        */
    );


    tgmpa( $plugins, $config );
}

// sanitize
function dinero_sanitize_choices( $input, $setting ) {
    global $wp_customize; 
    $control = $wp_customize->get_control( $setting->id ); 
    if ( array_key_exists( $input, $control->choices ) ) {
        return $input;
    } else {
        return $setting->default;
    }
}

function dinero_sanitize_checkbox( $input ) {
    return ( ( isset( $input ) && true == $input ) ? true : false );
}

function dinero_sanitize_phone_number( $phone ) {
    return preg_replace( '/[^\d+]/', '', $phone );
}

function dinero_sanitize_float( $input ) {
    return filter_var($input, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
}


function dinero_switch_sanitization( $input ) {
    if ( true === $input ) {
        return 1;
    } else {
        return 0;
    }
}


// Integer sanitization
if ( ! function_exists( 'dinero_sanitize_integer' ) ) {
    function dinero_sanitize_integer( $input ) {
        return (int) $input;
    }
}

/* Excerpt Limit Begin */
function dinero_string_limit_words($string, $word_limit) {
    $words = explode(' ', $string, ($word_limit + 1));
    if(count($words) > $word_limit)
    array_pop($words);
    return implode(' ', $words);
}

// Change number or products per row to 3
add_filter('loop_shop_columns', 'dinero_loop_columns');
    if (!function_exists('dinero_loop_columns')) {
        function dinero_loop_columns() {
    return 3; // 3 products per row
    }
}


function dinero_sanitize_dropdown_pages( $page_id, $setting ) {
    // Ensure $input is an absolute integer.
    $page_id = absint( $page_id );
    // If $page_id is an ID of a published page, return it; otherwise, return the default.
    return ( 'publish' == get_post_status( $page_id ) ? $page_id : $setting->default );
}

// Hide show customizer options 
function dinero_shortcode_slider_enabled(){
    if(get_theme_mod('dinero_slider_section_option', 'Luzuk Slider Plugin') == 'Other Shortcode' ) {
        return true;
    }
    return false;
}

function dinero_shortcode_team_enabled(){
    if(get_theme_mod('dinero_team_section_option', 'Luzuk Team Plugin') == 'Other Shortcode' ) {
        return true;
    }
    return false;
}
function dinero_shortcode_testimonials_enabled(){
    if(get_theme_mod('dinero_testimonials_section_option', 'Luzuk Testimonials Plugin') == 'Other Shortcode' ) {
        return true;
    }
    return false;
}
function dinero_shortcode_project_enabled(){
    if(get_theme_mod('dinero_project_section_option', 'Luzuk Project Plugin') == 'Other Shortcode' ) {
        return true;
    }
    return false;
}

function dinero_service_type_posts(){
    if(get_theme_mod('dinero_service_type', 'With Posts') == 'With Posts' ) {
        return true;
    }
    return false;
}

function dinero_service_type_pages(){
    if(get_theme_mod('dinero_service_type', 'With Posts') == 'With Pages' ) {
        return true;
    }
    return false;
}

function dinero_service_bg_image_opacity(){
    if(get_theme_mod('luzuk_services_bg_image') != 'color' ) {
        return true;
    }
    return false;
}

function dinero_service_type_icon(){
    if(get_theme_mod('dinero_service_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}

function dinero_about_type_icon(){
    if(get_theme_mod('dinero_about_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}


function dinero_features_type_icon(){
    if(get_theme_mod('dinero_features_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}

function dinero_facility_type_icon(){
    if(get_theme_mod('dinero_facility_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}

function dinero_steps_type_icon(){
    if(get_theme_mod('dinero_steps_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}

function dinero_blog_type_icon(){
    if(get_theme_mod('dinero_blog_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}

function dinero_pricing_type_icon(){
    if(get_theme_mod('dinero_pricing_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}

function dinero_newsletter_type_icon(){
    if(get_theme_mod('dinero_newsletter_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}

function dinero_contact_type_icon(){
    if(get_theme_mod('dinero_contact_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}
function dinero_team_type_icon(){
    if(get_theme_mod('dinero_team_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}

function dinero_testimonials_type_icon(){
    if(get_theme_mod('dinero_testimonials_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}

function dinero_project_type_icon(){
    if(get_theme_mod('dinero_project_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}

function dinero_counter_type_icon(){
    if(get_theme_mod('dinero_counter_head_icon_enable', 'Yes') == 'Yes' ) {
        return true;
    }
    return false;
}


function dinero_slider_reset_settings() {
    remove_theme_mod( 'dinero_slider_section_option' );
    remove_theme_mod( 'dinero_slider_shortcode' );
    remove_theme_mod( 'dinero_slider_image_opacity' );
    remove_theme_mod( 'dinero_slider_section_width' );
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}
add_action( 'wp_ajax_dinero_slider_reset_settings', 'dinero_slider_reset_settings' );

add_action( 'wp_ajax_dinero_services_reset_settings', 'dinero_services_reset_settings' );
function dinero_services_reset_settings() {
    remove_theme_mod( 'dinero_service_enable' );
    remove_theme_mod( 'dinero_services_maintitle' );
    remove_theme_mod( 'dinero_services_subtitle' );
    remove_theme_mod( 'dinero_service_head_icon_enable' );
    remove_theme_mod( 'dinero_service_head_icon' );
    remove_theme_mod( 'dinero_service_area_lbl' );
    remove_theme_mod( 'dinero_service_section_lbl' );            
    remove_theme_mod( 'dinero_service_icon1' );
    remove_theme_mod( 'dinero_service_icon2' );
    remove_theme_mod( 'dinero_service_icon3' );
    remove_theme_mod( 'dinero_service_icon4' );
    remove_theme_mod( 'dinero_service_icon5' );
    remove_theme_mod( 'dinero_service_icon6' );
    remove_theme_mod( 'dinero_service_icon7' );
    remove_theme_mod( 'dinero_service_icon8' );
    remove_theme_mod( 'dinero_service_icon9' );
    remove_theme_mod( 'dinero_service_icon10' );
    remove_theme_mod( 'dinero_service_icon11' );
    remove_theme_mod( 'dinero_service_icon12' );
    remove_theme_mod( 'dinero_service_heading1' );
    remove_theme_mod( 'dinero_service_heading2' );
    remove_theme_mod( 'dinero_service_heading3' );
    remove_theme_mod( 'dinero_service_heading4' );
    remove_theme_mod( 'dinero_service_heading5' );
    remove_theme_mod( 'dinero_service_heading6' );
    remove_theme_mod( 'dinero_service_heading7' );
    remove_theme_mod( 'dinero_service_heading8' );
    remove_theme_mod( 'dinero_service_heading9' );
    remove_theme_mod( 'dinero_service_heading10' );
    remove_theme_mod( 'dinero_service_heading11' );
    remove_theme_mod( 'dinero_service_heading12' );
    remove_theme_mod( 'dinero_service_page1' );
    remove_theme_mod( 'dinero_service_page2' );
    remove_theme_mod( 'dinero_service_page3' );
    remove_theme_mod( 'dinero_service_page4' );
    remove_theme_mod( 'dinero_service_page5' );
    remove_theme_mod( 'dinero_service_page6' );
    remove_theme_mod( 'dinero_service_page7' );
    remove_theme_mod( 'dinero_service_page8' );
    remove_theme_mod( 'dinero_service_page9' );
    remove_theme_mod( 'dinero_service_page10' );
    remove_theme_mod( 'dinero_service_page11' );
    remove_theme_mod( 'dinero_service_page12' );
    remove_theme_mod( 'dinero_service_icon_enable' );
    remove_theme_mod( 'dinero_service_button_enable' );
    remove_theme_mod( 'dinero_service_button_text' );
    remove_theme_mod( 'dinero_service_section_bg_color' );
    remove_theme_mod( 'dinero_service_section_bg_image' );
    remove_theme_mod( 'dinero_service_image_opacity' );  
    remove_theme_mod( 'dinero_services_imghover_color' ); 
    remove_theme_mod( 'dinero_services_borderhover_color' );      
    remove_theme_mod( 'dinero_service_box_onload_effects' );
    remove_theme_mod( 'dinero_services_heading_color1' );
    remove_theme_mod( 'dinero_services_heading_color2' );
    remove_theme_mod( 'dinero_services_headingborder_color1' );
    remove_theme_mod( 'dinero_services_headingborder_color2' );
    remove_theme_mod( 'dinero_services_subheading_color' );
     remove_theme_mod( 'dinero_services_icon_color1' );
    remove_theme_mod( 'dinero_services_icon_color2' );
    remove_theme_mod( 'dinero_services_iconbg_color' );
     remove_theme_mod( 'dinero_services_title_color1' );
    remove_theme_mod( 'dinero_services_title_color2' );
    remove_theme_mod( 'dinero_services_text_color' );
    remove_theme_mod( 'dinero_services_btntext_color1' );
    remove_theme_mod( 'dinero_services_btntext_color2' );
    remove_theme_mod( 'dinero_services_boxbg_color' );
    remove_theme_mod( 'dinero_service_padding' );                
    remove_theme_mod( 'dinero_service_top_padding' );
    remove_theme_mod( 'dinero_service_bottom_padding' );
     remove_theme_mod( 'dinero_service_number' );
     remove_theme_mod( 'dinero_service_section_width' );
    remove_theme_mod( 'dinero_service_title_case' );
    remove_theme_mod( 'dinero_services_head_align' );
    remove_theme_mod( 'dinero_services_content_align' );
    remove_theme_mod( 'dinero_services_post_image_height' );                
    remove_theme_mod( 'dinero_services_post_excerpt' );
  
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}


add_action( 'wp_ajax_dinero_about_reset_settings', 'dinero_about_reset_settings' );
function dinero_about_reset_settings() {
    remove_theme_mod( 'dinero_about_enable' );
    remove_theme_mod( 'dinero_about_image' );
    remove_theme_mod( 'dinero_about_section_title1' );
    remove_theme_mod( 'dinero_about_head_icon_enable' );
    remove_theme_mod( 'dinero_about_head_icon' );
    remove_theme_mod( 'dinero_about_subtitle' );
    remove_theme_mod( 'dinero_about_text' );
    remove_theme_mod( 'dinero_about_texttext' );
    remove_theme_mod( 'dinero_about_page_list' );                
    remove_theme_mod( 'dinero_about_button_display' );
    remove_theme_mod( 'dinero_about_btn_txt' );
    remove_theme_mod( 'dinero_about_btnlink' );
    remove_theme_mod( 'dinero_about_section_bg_color' );
    remove_theme_mod( 'dinero_about_section_bg_image' );
    remove_theme_mod( 'dinero_about_image_opacity' );               
    remove_theme_mod( 'luzuk_about_title_heading1' );
    remove_theme_mod( 'luzuk_premium_about_section_background' );
    remove_theme_mod( 'luzuk_about_bg_color' );
    remove_theme_mod( 'luzuk_about_bg_image' );                
    remove_theme_mod( 'dinero_about_box_onload_effects' );
    remove_theme_mod( 'dinero_about_area_btn_color' );
    remove_theme_mod( 'dineroabout_area_btnbg1_color' );
    remove_theme_mod( 'dineroabout_area_btnbg2_color' );
    remove_theme_mod( 'dinero_about_heading_color1' );
    remove_theme_mod( 'dinero_about_heading_color2' );
    remove_theme_mod( 'dinero_about_headingborder_color1' );
    remove_theme_mod( 'dinero_about_headingborder_color2' );
    remove_theme_mod( 'dinero_about_subheading_color' );
    remove_theme_mod( 'dinero_about_text_color' );
    remove_theme_mod( 'dinero_about_list_color' );
    remove_theme_mod( 'dinero_about_icon_color' );
    remove_theme_mod( 'dinero_about_iconbg_color' );
    remove_theme_mod( 'dinero_about_button_color' );
    remove_theme_mod( 'dinero_about_buttonbg_color1' );
    remove_theme_mod( 'dinero_about_buttonbg_color2' );
    remove_theme_mod( 'dinero_about_padding' );
    remove_theme_mod( 'dinero_about_top_padding' );
    remove_theme_mod( 'dinero_about_bottom_padding' );
    remove_theme_mod( 'dinero_about_section_width' );
    remove_theme_mod( 'dinero_about_head_align' );
    
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_counter_reset_settings', 'dinero_counter_reset_settings' );
function dinero_counter_reset_settings() {
    remove_theme_mod( 'dinero_counter_enable' );
    remove_theme_mod( 'dinero_counter_maintitle' );
    remove_theme_mod( 'dinero_counter_head_icon_enable' );
    remove_theme_mod( 'dinero_counter_head_icon' );
    remove_theme_mod( 'dinero_counter_subtitle' );
    remove_theme_mod( 'dinero_counter_npp_count_heading' );
    remove_theme_mod( 'dinero_counter_npp_count' );
    remove_theme_mod( 'dinero_counter_page1');
    remove_theme_mod( 'dinero_counter_page_icon1');
    remove_theme_mod( 'dinero_counter_page_title_1');
    remove_theme_mod( 'dinero_counter_page_num_1');
    remove_theme_mod( 'dinero_counter_page_unit_1');
    remove_theme_mod( 'dinero_counter_page2');
    remove_theme_mod( 'dinero_counter_page_icon2');
    remove_theme_mod( 'dinero_counter_page_title_2');
    remove_theme_mod( 'dinero_counter_page_num_2');
    remove_theme_mod( 'dinero_counter_page_unit_2');
    remove_theme_mod( 'dinero_counter_page3');
    remove_theme_mod( 'dinero_counter_page_icon3');
    remove_theme_mod( 'dinero_counter_page_title_3');
    remove_theme_mod( 'dinero_counter_page_num_3');
    remove_theme_mod( 'dinero_counter_page_unit_3');
    remove_theme_mod( 'dinero_counter_page4');
    remove_theme_mod( 'dinero_counter_page_icon4');
    remove_theme_mod( 'dinero_counter_page_title_4');
    remove_theme_mod( 'dinero_counter_page_num_4');
    remove_theme_mod( 'dinero_counter_page_unit_4');
    remove_theme_mod( 'dinero_counter_page5');
    remove_theme_mod( 'dinero_counter_page_icon5');
    remove_theme_mod( 'dinero_counter_page_title_5');
    remove_theme_mod( 'dinero_counter_page_num_5');
    remove_theme_mod( 'dinero_counter_page_unit_5');
    remove_theme_mod( 'dinero_counter_page6');
    remove_theme_mod( 'dinero_counter_page_icon6');
    remove_theme_mod( 'dinero_counter_page_title_6');
    remove_theme_mod( 'dinero_counter_page_num_6');
    remove_theme_mod( 'dinero_counter_page_unit_6');
    remove_theme_mod( 'dinero_counter_page7');
    remove_theme_mod( 'dinero_counter_page_icon7');
    remove_theme_mod( 'dinero_counter_page_title_7');
    remove_theme_mod( 'dinero_counter_page_num_7');
    remove_theme_mod( 'dinero_counter_page_unit_7');
    remove_theme_mod( 'dinero_counter_page8');
    remove_theme_mod( 'dinero_counter_page_icon8');
    remove_theme_mod( 'dinero_counter_page_title_8');
    remove_theme_mod( 'dinero_counter_page_num_8');
    remove_theme_mod( 'dinero_counter_page_unit_8');
    remove_theme_mod( 'dinero_counter_page9');
    remove_theme_mod( 'dinero_counter_page_icon9');
    remove_theme_mod( 'dinero_counter_page_title_9');
    remove_theme_mod( 'dinero_counter_page_num_9');
    remove_theme_mod( 'dinero_counter_page_unit_9');
    remove_theme_mod( 'dinero_counter_page10');
    remove_theme_mod( 'dinero_counter_page_icon10');
    remove_theme_mod( 'dinero_counter_page_title_10');
    remove_theme_mod( 'dinero_counter_page_num_10');
    remove_theme_mod( 'dinero_counter_page_unit_10');
    remove_theme_mod( 'dinero_counter_page11');
    remove_theme_mod( 'dinero_counter_page_icon11');
    remove_theme_mod( 'dinero_counter_page_title_11');
    remove_theme_mod( 'dinero_counter_page_num_11');
    remove_theme_mod( 'dinero_counter_page_unit_11');
    remove_theme_mod( 'dinero_counter_page12');
    remove_theme_mod( 'dinero_counter_page_icon12');
    remove_theme_mod( 'dinero_counter_page_title_12');
    remove_theme_mod( 'dinero_counter_page_num_12');
    remove_theme_mod( 'dinero_counter_page_unit_12');
    remove_theme_mod( 'dinero_counter_page13');
    remove_theme_mod( 'dinero_counter_page_icon13');
    remove_theme_mod( 'dinero_counter_page_title_13');
    remove_theme_mod( 'dinero_counter_page_num_13');
    remove_theme_mod( 'dinero_counter_page_unit_13');
    remove_theme_mod( 'dinero_counter_page14');
    remove_theme_mod( 'dinero_counter_page_icon14');
    remove_theme_mod( 'dinero_counter_page_title_14');
    remove_theme_mod( 'dinero_counter_page_num_14');
    remove_theme_mod( 'dinero_counter_page_unit_14');
    remove_theme_mod( 'dinero_counter_page15');
    remove_theme_mod( 'dinero_counter_page_icon15');
    remove_theme_mod( 'dinero_counter_page_title_15');
    remove_theme_mod( 'dinero_counter_page_num_15');
    remove_theme_mod( 'dinero_counter_page_unit_15');
    remove_theme_mod( 'dinero_counter_section_t_padding');
    remove_theme_mod( 'dinero_counter_section_b_padding');
    remove_theme_mod( 'luzuk_counter_title_heading1');
    remove_theme_mod( 'luzuk_premium_counter_section_background');
    remove_theme_mod( 'luzuk_counter_bg_color');
    remove_theme_mod( 'luzuk_counter_bg_image');
    remove_theme_mod( 'dinero_counter_image_opacity');
    remove_theme_mod( 'dinero_counter_title_color1' );
    remove_theme_mod( 'dinero_counter_title_color2' );
    remove_theme_mod( 'dinero_counter_titleborder_color1' );
    remove_theme_mod( 'dinero_counter_titleborder_color2' );
    remove_theme_mod( 'dinero_counter_subtitle_color' );
    remove_theme_mod( 'dinero_counter_title_case');
    remove_theme_mod( 'dinero_counter_head_align');
    remove_theme_mod( 'dinero_counter_box_align');  
    remove_theme_mod( 'dinero_counter_box_onload_effects');
    remove_theme_mod( 'dinero_counter_section_width');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}


add_action( 'wp_ajax_dinero_features_reset_settings', 'dinero_features_reset_settings' );
function dinero_features_reset_settings() {
    remove_theme_mod( 'features_area_disable' ); 
    remove_theme_mod( 'dinero_features_maintitle' );
    remove_theme_mod( 'dinero_features_head_icon_enable' );
    remove_theme_mod( 'dinero_features_head_icon' );
    remove_theme_mod( 'dinero_features_subtitle' );
    remove_theme_mod( 'dinero_features_npp_count_heading' );
    remove_theme_mod( 'dinero_features_npp_count' );
    remove_theme_mod( 'dinero_features_page1' );
    remove_theme_mod( 'dinero_features_page_icon1' );
    remove_theme_mod( 'dinero_features_page_title_1' );
    remove_theme_mod( 'dinero_features_page_description_1' );
    remove_theme_mod( 'dinero_features_page2' );
    remove_theme_mod( 'dinero_features_page_icon2' );
    remove_theme_mod( 'dinero_features_page_title_2' );
    remove_theme_mod( 'dinero_features_page_description_2' );
    remove_theme_mod( 'dinero_features_page3' );
    remove_theme_mod( 'dinero_features_page_icon3' );
    remove_theme_mod( 'dinero_features_page_title_3' );
    remove_theme_mod( 'dinero_features_page_description_3' );
    remove_theme_mod( 'dinero_features_page4' );
    remove_theme_mod( 'dinero_features_page_icon4' );
    remove_theme_mod( 'dinero_features_page_title_4' );
    remove_theme_mod( 'dinero_features_page_description_4' );
    remove_theme_mod( 'dinero_features_page5' );
    remove_theme_mod( 'dinero_features_page_icon5' );
    remove_theme_mod( 'dinero_features_page_title_5' );
    remove_theme_mod( 'dinero_features_page_description_5' );
    remove_theme_mod( 'dinero_features_page6' );
    remove_theme_mod( 'dinero_features_page_icon6' );
    remove_theme_mod( 'dinero_features_page_title_6' );
    remove_theme_mod( 'dinero_features_page_description_6' );
    remove_theme_mod( 'dinero_features_page7' );
    remove_theme_mod( 'dinero_features_page_icon7' );
    remove_theme_mod( 'dinero_features_page_title_7' );
    remove_theme_mod( 'dinero_features_page_description_7' );
    remove_theme_mod( 'dinero_features_page8' );
    remove_theme_mod( 'dinero_features_page_icon8' );
    remove_theme_mod( 'dinero_features_page_title_8' );
    remove_theme_mod( 'dinero_features_page_description_8' );
    remove_theme_mod( 'dinero_features_page9' );
    remove_theme_mod( 'dinero_features_page_icon9' );
    remove_theme_mod( 'dinero_features_page_title_9' );
    remove_theme_mod( 'dinero_features_page_description_9' );
    remove_theme_mod( 'dinero_features_page10' );
    remove_theme_mod( 'dinero_features_page_icon10' );
    remove_theme_mod( 'dinero_features_page_title_10' );
    remove_theme_mod( 'dinero_features_page_description_10' );
    remove_theme_mod( 'dinero_features_page11' );
    remove_theme_mod( 'dinero_features_page_icon11' );
    remove_theme_mod( 'dinero_features_page_title_11' );
    remove_theme_mod( 'dinero_features_page_description_11' );
    remove_theme_mod( 'dinero_features_page12' );
    remove_theme_mod( 'dinero_features_page_icon12' );
    remove_theme_mod( 'dinero_features_page_title_12' );
    remove_theme_mod( 'dinero_features_page_description_12' );
    remove_theme_mod( 'dinero_features_page13' );
    remove_theme_mod( 'dinero_features_page_icon13' );
    remove_theme_mod( 'dinero_features_page_title_13' );
    remove_theme_mod( 'dinero_features_page_description_13' );
    remove_theme_mod( 'dinero_features_page14' );
    remove_theme_mod( 'dinero_features_page_icon14' );
    remove_theme_mod( 'dinero_features_page_title_14' );
    remove_theme_mod( 'dinero_features_page_description_14' );
    remove_theme_mod( 'dinero_features_page15' );
    remove_theme_mod( 'dinero_features_page_icon15' );
    remove_theme_mod( 'dinero_features_page_title_15' );
    remove_theme_mod( 'dinero_features_page_description_15' );
    remove_theme_mod( 'dinero_features_section_t_padding' );
    remove_theme_mod( 'dinero_features_section_b_padding' );
    remove_theme_mod( 'luzuk_features_title_heading1' );
    remove_theme_mod( 'luzuk_premium_features_section_background' );
    remove_theme_mod( 'luzuk_features_bg_color' );
    remove_theme_mod( 'luzuk_features_bg_image' );
    remove_theme_mod( 'dinero_features_image_opacity' );
    remove_theme_mod( 'dinero_features_title_color1' );
    remove_theme_mod( 'dinero_features_title_color2' );
    remove_theme_mod( 'dinero_features_titleborder_color1' );
    remove_theme_mod( 'dinero_features_titleborder_color2' );
    remove_theme_mod( 'dinero_features_subtitle_color' );
    remove_theme_mod( 'dinero_features_title_case' );
    remove_theme_mod( 'dinero_features_head_align' );
    remove_theme_mod( 'dinero_features_box_align' );     
    remove_theme_mod( 'dinero_features_box_onload_effects' );
    remove_theme_mod( 'dinero_features_section_width' );
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_steps_reset_settings', 'dinero_steps_reset_settings' );
function dinero_steps_reset_settings() {
    remove_theme_mod( 'steps_area_disable' ); 
    remove_theme_mod( 'dinero_steps_maintitle');
    remove_theme_mod( 'dinero_steps_head_icon_enable');
    remove_theme_mod( 'dinero_steps_head_icon');
    remove_theme_mod( 'dinero_steps_subtitle');
    remove_theme_mod( 'dinero_steps_npp_count_heading');
    remove_theme_mod( 'dinero_steps_npp_count');
    remove_theme_mod( 'dinero_steps_page1');
    remove_theme_mod( 'dinero_steps_page_num_1');
    remove_theme_mod( 'dinero_steps_page_icon1');
    remove_theme_mod( 'dinero_steps_page_title_1');
    remove_theme_mod( 'dinero_steps_page_description_1');
    remove_theme_mod( 'dinero_steps_page2');
    remove_theme_mod( 'dinero_steps_page_num_2');
    remove_theme_mod( 'dinero_steps_page_icon2');
    remove_theme_mod( 'dinero_steps_page_title_2');
    remove_theme_mod( 'dinero_steps_page_description_2');
    remove_theme_mod( 'dinero_steps_page3');
    remove_theme_mod( 'dinero_steps_page_num_3');
    remove_theme_mod( 'dinero_steps_page_icon3');
    remove_theme_mod( 'dinero_steps_page_title_3');
    remove_theme_mod( 'dinero_steps_page_description_3');
    remove_theme_mod( 'dinero_steps_page4');
    remove_theme_mod( 'dinero_steps_page_num_4');
    remove_theme_mod( 'dinero_steps_page_icon4');
    remove_theme_mod( 'dinero_steps_page_title_4');
    remove_theme_mod( 'dinero_steps_page_description_4');
    remove_theme_mod( 'dinero_steps_page5');
    remove_theme_mod( 'dinero_steps_page_num_5');
    remove_theme_mod( 'dinero_steps_page_icon5');
    remove_theme_mod( 'dinero_steps_page_title_5');
    remove_theme_mod( 'dinero_steps_page_description_5');
    remove_theme_mod( 'dinero_steps_page6');
    remove_theme_mod( 'dinero_steps_page_num_6');
    remove_theme_mod( 'dinero_steps_page_icon6');
    remove_theme_mod( 'dinero_steps_page_title_6');
    remove_theme_mod( 'dinero_steps_page_description_6');
    remove_theme_mod( 'dinero_steps_page7');
    remove_theme_mod( 'dinero_steps_page_num_7');
    remove_theme_mod( 'dinero_steps_page_icon7');
    remove_theme_mod( 'dinero_steps_page_title_7');
    remove_theme_mod( 'dinero_steps_page_description_7');
    remove_theme_mod( 'dinero_steps_page8');
    remove_theme_mod( 'dinero_steps_page_num_8');
    remove_theme_mod( 'dinero_steps_page_icon8');
    remove_theme_mod( 'dinero_steps_page_title_8');
    remove_theme_mod( 'dinero_steps_page_description_8');
    remove_theme_mod( 'dinero_steps_page9');
    remove_theme_mod( 'dinero_steps_page_num_9');
    remove_theme_mod( 'dinero_steps_page_icon9');
    remove_theme_mod( 'dinero_steps_page_title_9');
    remove_theme_mod( 'dinero_steps_page_description_9');
    remove_theme_mod( 'dinero_steps_page10');
    remove_theme_mod( 'dinero_steps_page_num_10');
    remove_theme_mod( 'dinero_steps_page_icon10');
    remove_theme_mod( 'dinero_steps_page_title_10');
    remove_theme_mod( 'dinero_steps_page_description_10');
    remove_theme_mod( 'dinero_steps_page11');
    remove_theme_mod( 'dinero_steps_page_num_11');
    remove_theme_mod( 'dinero_steps_page_icon11');
    remove_theme_mod( 'dinero_steps_page_title_11');
    remove_theme_mod( 'dinero_steps_page_description_11');
    remove_theme_mod( 'dinero_steps_page12');
    remove_theme_mod( 'dinero_steps_page_num_12');
    remove_theme_mod( 'dinero_steps_page_icon12');
    remove_theme_mod( 'dinero_steps_page_title_12');
    remove_theme_mod( 'dinero_steps_page_description_12');
    remove_theme_mod( 'dinero_steps_page13');
    remove_theme_mod( 'dinero_steps_page_num_13');
    remove_theme_mod( 'dinero_steps_page_icon13');
    remove_theme_mod( 'dinero_steps_page_title_13');
    remove_theme_mod( 'dinero_steps_page_description_13');
    remove_theme_mod( 'dinero_steps_page14');
    remove_theme_mod( 'dinero_steps_page_num_14');
    remove_theme_mod( 'dinero_steps_page_icon14');
    remove_theme_mod( 'dinero_steps_page_title_14');
    remove_theme_mod( 'dinero_steps_page_description_14');
    remove_theme_mod( 'dinero_steps_page15');
    remove_theme_mod( 'dinero_steps_page_num_15');
    remove_theme_mod( 'dinero_steps_page_icon15');
    remove_theme_mod( 'dinero_steps_page_title_15');
    remove_theme_mod( 'dinero_steps_page_description_15');
    remove_theme_mod( 'dinero_steps_section_t_padding');
    remove_theme_mod( 'dinero_steps_section_b_padding');
    remove_theme_mod( 'luzuk_steps_title_heading1');
    remove_theme_mod( 'luzuk_premium_steps_section_background');
    remove_theme_mod( 'luzuk_steps_bg_color');
    remove_theme_mod( 'luzuk_steps_bg_image');
    remove_theme_mod( 'dinero_steps_image_opacity');
    remove_theme_mod( 'dinero_steps_title_color1' );
    remove_theme_mod( 'dinero_steps_title_color2' );
    remove_theme_mod( 'dinero_steps_titleborder_color1' );
    remove_theme_mod( 'dinero_steps_titleborder_color2' );
    remove_theme_mod( 'dinero_steps_subtitle_color' );
    remove_theme_mod( 'dinero_steps_title_case');
    remove_theme_mod( 'dinero_steps_head_align');
    remove_theme_mod( 'dinero_steps_box_align'); 
    remove_theme_mod( 'dinero_steps_box_onload_effects');
    remove_theme_mod( 'dinero_steps_section_width');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}



add_action( 'wp_ajax_dinero_project_reset_settings', 'dinero_project_reset_settings' );
function dinero_project_reset_settings() {
    remove_theme_mod( 'project_area_disable' ); 
    remove_theme_mod( 'dinero_project_maintitle');
    remove_theme_mod( 'dinero_project_head_icon_enable');
    remove_theme_mod( 'dinero_project_head_icon');
    remove_theme_mod( 'dinero_project_subtitle');
    remove_theme_mod( 'dinero_project_section_option');
    remove_theme_mod( 'dinero_project_area_lbl'); 
    remove_theme_mod( 'dinero_project_section_lbl');  
    remove_theme_mod( 'dinero_project_npp_count');
    remove_theme_mod( 'dinero_project_heading1');
    remove_theme_mod( 'dinero_project_page1');
    remove_theme_mod( 'dinero_project_heading2');
    remove_theme_mod( 'dinero_project_page2');
    remove_theme_mod( 'dinero_project_heading3');
    remove_theme_mod( 'dinero_project_page3');
    remove_theme_mod( 'dinero_project_heading4');
    remove_theme_mod( 'dinero_project_page4');
    remove_theme_mod( 'dinero_project_heading5');
    remove_theme_mod( 'dinero_project_page5');
    remove_theme_mod( 'dinero_project_heading6');
    remove_theme_mod( 'dinero_project_page6');
    remove_theme_mod( 'dinero_project_heading7');
    remove_theme_mod( 'dinero_project_page7');
    remove_theme_mod( 'dinero_project_heading8');
    remove_theme_mod( 'dinero_project_page8');
    remove_theme_mod( 'dinero_project_heading9');
    remove_theme_mod( 'dinero_project_page9');
    remove_theme_mod( 'dinero_project_heading10');
    remove_theme_mod( 'dinero_project_page10');
    remove_theme_mod( 'dinero_project_heading11');
    remove_theme_mod( 'dinero_project_page11');
    remove_theme_mod( 'dinero_project_heading12');
    remove_theme_mod( 'dinero_project_page12');
    remove_theme_mod( 'dinero_project_title_case');
    remove_theme_mod( 'dinero_project_box_align');
    remove_theme_mod( 'dinero_project_box_onload_effects');
    remove_theme_mod( 'dinero_project_section_width');
    remove_theme_mod( 'dinero_project_head_align');
    remove_theme_mod( 'dinero_project_section_t_padding');
    remove_theme_mod( 'dinero_project_section_b_padding');
    remove_theme_mod( 'luzuk_project_title_heading1');
    remove_theme_mod( 'luzuk_premium_project_section_background');
    remove_theme_mod( 'luzuk_project_bg_color');
    remove_theme_mod( 'luzuk_project_bg_image');
    remove_theme_mod( 'dinero_project_image_opacity');
    remove_theme_mod( 'dinero_project_title_color1' );
    remove_theme_mod( 'dinero_project_title_color2' );
    remove_theme_mod( 'dinero_project_titleborder_color1' );
    remove_theme_mod( 'dinero_project_titleborder_color2' );
    remove_theme_mod( 'dinero_project_subtitle_color' );
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_facility_reset_settings', 'dinero_facility_reset_settings' );
function dinero_facility_reset_settings() {
    remove_theme_mod( 'facility_area_disable' );  
    remove_theme_mod( 'dinero_facility_maintitle'); 
    remove_theme_mod( 'dinero_facility_head_icon_enable');
    remove_theme_mod( 'dinero_facility_head_icon');
    remove_theme_mod( 'dinero_facility_subtitle');
    remove_theme_mod( 'dinero_facility_npp_count_heading');
    remove_theme_mod( 'dinero_facility_npp_count');
    remove_theme_mod( 'dinero_facility_page1');
    remove_theme_mod( 'dinero_facility_page_icon1');
    remove_theme_mod( 'dinero_facility_page_title_1');
    remove_theme_mod( 'dinero_facility_page_description_1');
    remove_theme_mod( 'dinero_facility_page2');
    remove_theme_mod( 'dinero_facility_page_icon2');
    remove_theme_mod( 'dinero_facility_page_title_2');
    remove_theme_mod( 'dinero_facility_page_description_2');
    remove_theme_mod( 'dinero_facility_page3');
    remove_theme_mod( 'dinero_facility_page_icon3');
    remove_theme_mod( 'dinero_facility_page_title_3');
    remove_theme_mod( 'dinero_facility_page_description_3');
    remove_theme_mod( 'dinero_facility_page4');
    remove_theme_mod( 'dinero_facility_page_icon4');
    remove_theme_mod( 'dinero_facility_page_title_4');
    remove_theme_mod( 'dinero_facility_page_description_4');
    remove_theme_mod( 'dinero_facility_page5');
    remove_theme_mod( 'dinero_facility_page_icon5');
    remove_theme_mod( 'dinero_facility_page_title_5');
    remove_theme_mod( 'dinero_facility_page_description_5');
    remove_theme_mod( 'dinero_facility_page6');
    remove_theme_mod( 'dinero_facility_page_icon6');
    remove_theme_mod( 'dinero_facility_page_title_6');
    remove_theme_mod( 'dinero_facility_page_description_6');
    remove_theme_mod( 'dinero_facility_page7');
    remove_theme_mod( 'dinero_facility_page_icon7');
    remove_theme_mod( 'dinero_facility_page_title_7');
    remove_theme_mod( 'dinero_facility_page_description_7');
    remove_theme_mod( 'dinero_facility_page8');
    remove_theme_mod( 'dinero_facility_page_icon8');
    remove_theme_mod( 'dinero_facility_page_title_8');
    remove_theme_mod( 'dinero_facility_page_description_8');
    remove_theme_mod( 'dinero_facility_page9');
    remove_theme_mod( 'dinero_facility_page_icon9');
    remove_theme_mod( 'dinero_facility_page_title_9');
    remove_theme_mod( 'dinero_facility_page_description_9');
    remove_theme_mod( 'dinero_facility_page10');
    remove_theme_mod( 'dinero_facility_page_icon10');
    remove_theme_mod( 'dinero_facility_page_title_10');
    remove_theme_mod( 'dinero_facility_page_description_10');
    remove_theme_mod( 'dinero_facility_page11');
    remove_theme_mod( 'dinero_facility_page_icon11');
    remove_theme_mod( 'dinero_facility_page_title_11');
    remove_theme_mod( 'dinero_facility_page_description_11');
    remove_theme_mod( 'dinero_facility_page12');
    remove_theme_mod( 'dinero_facility_page_icon12');
    remove_theme_mod( 'dinero_facility_page_title_12');
    remove_theme_mod( 'dinero_facility_page_description_12');
    remove_theme_mod( 'dinero_facility_page13');
    remove_theme_mod( 'dinero_facility_page_icon13');
    remove_theme_mod( 'dinero_facility_page_title_13');
    remove_theme_mod( 'dinero_facility_page_description_13');
    remove_theme_mod( 'dinero_facility_page14');
    remove_theme_mod( 'dinero_facility_page_icon14');
    remove_theme_mod( 'dinero_facility_page_title_14');
    remove_theme_mod( 'dinero_facility_page_description_14');
    remove_theme_mod( 'dinero_facility_page15');
    remove_theme_mod( 'dinero_facility_page_icon15');
    remove_theme_mod( 'dinero_facility_page_title_15');
    remove_theme_mod( 'dinero_facility_page_description_15');
    remove_theme_mod( 'dinero_facility_section_t_padding');
    remove_theme_mod( 'dinero_facility_section_b_padding');
    remove_theme_mod( 'luzuk_facility_title_heading1');
    remove_theme_mod( 'luzuk_premium_facility_section_background');
    remove_theme_mod( 'luzuk_facility_bg_color');
    remove_theme_mod( 'luzuk_facility_bg_image');
    remove_theme_mod( 'dinero_facility_image_opacity');
    remove_theme_mod( 'dinero_facility_title_color1' );
    remove_theme_mod( 'dinero_facility_title_color2' );
    remove_theme_mod( 'dinero_facility_titleborder_color1' );
    remove_theme_mod( 'dinero_facility_titleborder_color2' );
    remove_theme_mod( 'dinero_facility_subtitle_color' );
    remove_theme_mod( 'dinero_facility_title_case');
    remove_theme_mod( 'dinero_facility_head_align');
    remove_theme_mod( 'dinero_facility_box_align');    
    remove_theme_mod( 'dinero_facility_box_onload_effects');
    remove_theme_mod( 'dinero_facility_section_width');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}


add_action( 'wp_ajax_dinero_team_reset_settings', 'dinero_team_reset_settings' );
function dinero_team_reset_settings() {
    remove_theme_mod( 'team_area_disable' ); 
    remove_theme_mod( 'dinero_team_maintitle');
    remove_theme_mod( 'dinero_team_head_icon_enable');
    remove_theme_mod( 'dinero_team_head_icon');
    remove_theme_mod( 'dinero_team_subtitle');
    remove_theme_mod( 'dinero_team_section_option');
    remove_theme_mod( 'dinero_team_shortcode');
    remove_theme_mod( 'dinero_team_section_width');
    remove_theme_mod( 'dinero_team_head_align');
    remove_theme_mod( 'dinero_team_head_align');
    remove_theme_mod( 'dinero_team_section_t_padding');
    remove_theme_mod( 'dinero_team_onload_effects');
    remove_theme_mod( 'luzuk_team_title_heading1');
    remove_theme_mod( 'luzuk_premium_team_section_background');
    remove_theme_mod( 'luzuk_team_bg_color');
    remove_theme_mod( 'luzuk_team_bg_image');
    remove_theme_mod( 'dinero_team_image_opacity');
    remove_theme_mod( 'dinero_team_title_color1' );
    remove_theme_mod( 'dinero_team_title_color2' );
    remove_theme_mod( 'dinero_team_titleborder_color1' );
    remove_theme_mod( 'dinero_team_titleborder_color2' );
    remove_theme_mod( 'dinero_team_subtitle_color' );
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_testimonials_reset_settings', 'dinero_testimonials_reset_settings' );
function dinero_testimonials_reset_settings() {
    remove_theme_mod( 'testimonials_area_disable' ); 
    remove_theme_mod( 'dinero_testimonials_maintitle');
    remove_theme_mod( 'dinero_testimonials_head_icon_enable');
    remove_theme_mod( 'dinero_testimonials_head_icon');
    remove_theme_mod( 'dinero_testimonials_subtitle');
    remove_theme_mod( 'dinero_testimonials_area_lbl'); 
    remove_theme_mod( 'dinero_testimonials_section_lbl');  
    remove_theme_mod( 'dinero_testimonials_npp_count');
    remove_theme_mod( 'dinero_testimonials_heading1');
    remove_theme_mod( 'dinero_testimonials_page1');
    remove_theme_mod( 'dinero_testimonials_heading2');
    remove_theme_mod( 'dinero_testimonials_page2');
    remove_theme_mod( 'dinero_testimonials_heading3');
    remove_theme_mod( 'dinero_testimonials_page3');
    remove_theme_mod( 'dinero_testimonials_heading4');
    remove_theme_mod( 'dinero_testimonials_page4');
    remove_theme_mod( 'dinero_testimonials_heading5');
    remove_theme_mod( 'dinero_testimonials_page5');
    remove_theme_mod( 'dinero_testimonials_heading6');
    remove_theme_mod( 'dinero_testimonials_page6');
    remove_theme_mod( 'dinero_testimonials_heading7');
    remove_theme_mod( 'dinero_testimonials_page7');
    remove_theme_mod( 'dinero_testimonials_heading8');
    remove_theme_mod( 'dinero_testimonials_page8');
    remove_theme_mod( 'dinero_testimonials_heading9');
    remove_theme_mod( 'dinero_testimonials_page9');
    remove_theme_mod( 'dinero_testimonials_heading10');
    remove_theme_mod( 'dinero_testimonials_page10');
    remove_theme_mod( 'dinero_testimonials_heading11');
    remove_theme_mod( 'dinero_testimonials_page11');
    remove_theme_mod( 'dinero_testimonials_heading12');
    remove_theme_mod( 'dinero_testimonials_page12');
    remove_theme_mod( 'dinero_testimonials_section_option');
    remove_theme_mod( 'dinero_testimonials_section_width');
    remove_theme_mod( 'dinero_testimonials_head_align');
    remove_theme_mod( 'dinero_testimonials_section_t_padding');
    remove_theme_mod( 'dinero_testimonials_section_b_padding');
    remove_theme_mod( 'luzuk_testimonials_title_heading1');
    remove_theme_mod( 'luzuk_premium_testimonials_section_background');
    remove_theme_mod( 'luzuk_testimonials_bg_color');
    remove_theme_mod( 'luzuk_testimonials_bg_image');
    remove_theme_mod( 'dinero_testimonials_image_opacity');
    remove_theme_mod( 'dinero_testimonials_title_color1' );
    remove_theme_mod( 'dinero_testimonials_title_color2' );
    remove_theme_mod( 'dinero_testimonials_titleborder_color1' );
    remove_theme_mod( 'dinero_testimonials_titleborder_color2' );
    remove_theme_mod( 'dinero_testimonials_subtitle_color' );
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_pricing_reset_settings', 'dinero_pricing_reset_settings' );
function dinero_pricing_reset_settings() {
    remove_theme_mod('pricing_area_disable'); 
    remove_theme_mod('dinero_pricing_maintitle');
    remove_theme_mod('dinero_pricing_head_icon_enable');
    remove_theme_mod('dinero_pricing_head_icon');
    remove_theme_mod('dinero_pricing_subtitle');
    remove_theme_mod('dinero_pricing_npp_heading');
    remove_theme_mod('dinero_pricing_npp_count');
    remove_theme_mod('dinero_pricing_plan_heading_1');
    remove_theme_mod('dinero_pricing_plan_name_1');
    remove_theme_mod('dinero_pricing_plan_tagline_1');
    remove_theme_mod('dinero_pricing_plan_unit_1');
    remove_theme_mod('dinero_pricing_plan_price_1');                
    remove_theme_mod('dinero_pricing_plan_content_1');
    remove_theme_mod('pricing_page_button_title_1');
    remove_theme_mod('dinero_pricing_plan_url_1');
    remove_theme_mod('dinero_pricing_plan_heading_2');
    remove_theme_mod('dinero_pricing_plan_name_2');
    remove_theme_mod('dinero_pricing_plan_tagline_2');
    remove_theme_mod('dinero_pricing_plan_unit_2');
    remove_theme_mod('dinero_pricing_plan_price_2');                
    remove_theme_mod('dinero_pricing_plan_content_2');
    remove_theme_mod('pricing_page_button_title_2');
    remove_theme_mod('dinero_pricing_plan_url_2');
    remove_theme_mod('dinero_pricing_plan_heading_3');
    remove_theme_mod('dinero_pricing_plan_name_3');
    remove_theme_mod('dinero_pricing_plan_tagline_3');
    remove_theme_mod('dinero_pricing_plan_unit_3');
    remove_theme_mod('dinero_pricing_plan_price_3');                
    remove_theme_mod('dinero_pricing_plan_content_3');
    remove_theme_mod('pricing_page_button_title_3');
    remove_theme_mod('dinero_pricing_plan_url_3');
    remove_theme_mod('dinero_pricing_plan_heading_4');
    remove_theme_mod('dinero_pricing_plan_name_4');
    remove_theme_mod('dinero_pricing_plan_tagline_4');
    remove_theme_mod('dinero_pricing_plan_unit_4');
    remove_theme_mod('dinero_pricing_plan_price_4');                
    remove_theme_mod('dinero_pricing_plan_content_4');
    remove_theme_mod('pricing_page_button_title_4');
    remove_theme_mod('dinero_pricing_plan_url_4');
    remove_theme_mod('dinero_pricing_plan_heading_5');
    remove_theme_mod('dinero_pricing_plan_name_5');
    remove_theme_mod('dinero_pricing_plan_tagline_5');
    remove_theme_mod('dinero_pricing_plan_unit_5');
    remove_theme_mod('dinero_pricing_plan_price_5');                
    remove_theme_mod('dinero_pricing_plan_content_5');
    remove_theme_mod('pricing_page_button_title_5');
    remove_theme_mod('dinero_pricing_plan_url_5');
    remove_theme_mod('dinero_pricing_plan_heading_6');
    remove_theme_mod('dinero_pricing_plan_name_6');
    remove_theme_mod('dinero_pricing_plan_tagline_6');
    remove_theme_mod('dinero_pricing_plan_unit_6');
    remove_theme_mod('dinero_pricing_plan_price_6');                
    remove_theme_mod('dinero_pricing_plan_content_6');
    remove_theme_mod('pricing_page_button_title_6');
    remove_theme_mod('dinero_pricing_plan_url_6');
    remove_theme_mod('dinero_pricing_plan_heading_7');
    remove_theme_mod('dinero_pricing_plan_name_7');
    remove_theme_mod('dinero_pricing_plan_tagline_7');
    remove_theme_mod('dinero_pricing_plan_unit_7');
    remove_theme_mod('dinero_pricing_plan_price_7');                
    remove_theme_mod('dinero_pricing_plan_content_7');
    remove_theme_mod('pricing_page_button_title_7');
    remove_theme_mod('dinero_pricing_plan_url_7');
    remove_theme_mod('dinero_pricing_plan_heading_8');
    remove_theme_mod('dinero_pricing_plan_name_8');
    remove_theme_mod('dinero_pricing_plan_tagline_8');
    remove_theme_mod('dinero_pricing_plan_unit_8');
    remove_theme_mod('dinero_pricing_plan_price_8');                
    remove_theme_mod('dinero_pricing_plan_content_8');
    remove_theme_mod('pricing_page_button_title_8');
    remove_theme_mod('dinero_pricing_plan_url_8');
    remove_theme_mod('dinero_pricing_plan_heading_9');
    remove_theme_mod('dinero_pricing_plan_name_9');
    remove_theme_mod('dinero_pricing_plan_tagline_9');
    remove_theme_mod('dinero_pricing_plan_unit_9');
    remove_theme_mod('dinero_pricing_plan_price_9');                
    remove_theme_mod('dinero_pricing_plan_content_9');
    remove_theme_mod('pricing_page_button_title_9');
    remove_theme_mod('dinero_pricing_plan_url_9');
    remove_theme_mod('dinero_pricing_plan_heading_10');
    remove_theme_mod('dinero_pricing_plan_name_10');
    remove_theme_mod('dinero_pricing_plan_tagline_10');
    remove_theme_mod('dinero_pricing_plan_unit_10');
    remove_theme_mod('dinero_pricing_plan_price_10');                
    remove_theme_mod('dinero_pricing_plan_content_10');
    remove_theme_mod('pricing_page_button_title_10');
    remove_theme_mod('dinero_pricing_plan_url_10');
    remove_theme_mod('dinero_pricing_plan_heading_11');
    remove_theme_mod('dinero_pricing_plan_name_11');
    remove_theme_mod('dinero_pricing_plan_tagline_11');
    remove_theme_mod('dinero_pricing_plan_unit_11');
    remove_theme_mod('dinero_pricing_plan_price_11');                
    remove_theme_mod('dinero_pricing_plan_content_11');
    remove_theme_mod('pricing_page_button_title_11');
    remove_theme_mod('dinero_pricing_plan_url_11');
    remove_theme_mod('dinero_pricing_plan_heading_12');
    remove_theme_mod('dinero_pricing_plan_name_12');
    remove_theme_mod('dinero_pricing_plan_tagline_12');
    remove_theme_mod('dinero_pricing_plan_unit_12');
    remove_theme_mod('dinero_pricing_plan_price_12');                
    remove_theme_mod('dinero_pricing_plan_content_12');
    remove_theme_mod('pricing_page_button_title_12');
    remove_theme_mod('dinero_pricing_plan_url_12');
    remove_theme_mod('dinero_pricing_section_t_padding');
    remove_theme_mod('dinero_pricing_section_b_padding');
    remove_theme_mod('luzuk_pricing_title_heading1');
    remove_theme_mod('luzuk_premium_pricing_section_background');
    remove_theme_mod('luzuk_pricing_bg_color');
    remove_theme_mod('luzuk_pricing_bg_image');
    remove_theme_mod('dinero_pricing_image_opacity');
    remove_theme_mod('dinero_pricing_title_color1');
    remove_theme_mod('dinero_pricing_title_color2');
    remove_theme_mod('dinero_pricing_subtitle_color');
    remove_theme_mod('dinero_pricing_title_case');
    remove_theme_mod('dinero_pricing_head_align');
    remove_theme_mod('dinero_pricing_box_align');
    remove_theme_mod('dinero_pricing_box_onload_effects');
    remove_theme_mod('dinero_pricing_section_width');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}


add_action( 'wp_ajax_dinero_contact_reset_settings', 'dinero_contact_reset_settings' );
function dinero_contact_reset_settings() {
    remove_theme_mod('contact_area_disable');  
    remove_theme_mod('dinero_contact_phonelabel');
    remove_theme_mod('dinero_contact_phone1');
    remove_theme_mod('dinero_contact_phone2');
    remove_theme_mod('dinero_contact_addresslabel');
    remove_theme_mod('dinero_contact_address');
    remove_theme_mod('dinero_contact_emaillabel');
    remove_theme_mod('dinero_contact_email1');
    remove_theme_mod('dinero_contact_email2');
    remove_theme_mod('dinero_contact_maintitle');
    remove_theme_mod('dinero_contact_head_icon_enable');
    remove_theme_mod('dinero_contact_head_icon');
    remove_theme_mod('dinero_contact_form_shortcode');
    remove_theme_mod('dinero_contactl_section_t_padding');
    remove_theme_mod('dinero_contactl_section_b_padding');
    remove_theme_mod('dinero_contactr_section_t_padding');
    remove_theme_mod('dinero_contactr_section_b_padding');
    remove_theme_mod('dinero_contact_head_align');
    remove_theme_mod('luzuk_contact_title_heading1');
    remove_theme_mod('luzuk_premium_contact_section_background');
    remove_theme_mod('luzuk_contact_bg_color');
    remove_theme_mod('luzuk_contact_bg_image');
    remove_theme_mod('dinero_contact_image_opacity');     
    remove_theme_mod('dinero_contact_box_onload_effects');
    remove_theme_mod( 'dinero_contact_title_color1' );
    remove_theme_mod( 'dinero_contact_titleborder_color1' );
    remove_theme_mod( 'dinero_contact_titleborder_color2' );
    remove_theme_mod( 'dinero_contact_section_width' );   
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}


add_action( 'wp_ajax_dinero_blog_reset_settings', 'dinero_blog_reset_settings' );
function dinero_blog_reset_settings() {
     remove_theme_mod('blog_area_disable'); 
     remove_theme_mod('blogs_maintitle');
    remove_theme_mod('dinero_blog_head_icon_enable');
    remove_theme_mod('dinero_blog_head_icon');
     remove_theme_mod('blogs_subtitle');
     remove_theme_mod('blog_post_count');
     remove_theme_mod('blog_cat_exclude');
     remove_theme_mod('dinero_blog_section_t_padding');
     remove_theme_mod('dinero_blog_section_b_padding');
     remove_theme_mod('dinero_blog_head_align');
     remove_theme_mod('dinero_blog_content_align');
     remove_theme_mod('luzuk_blog_title_heading1');
     remove_theme_mod('luzuk_premium_blog_section_background');
     remove_theme_mod('luzuk_blog_bg_color');
     remove_theme_mod('luzuk_blog_bg_image');
     remove_theme_mod('dinero_blog_image_opacity');
     remove_theme_mod('dinero_blog_title_color1');
     remove_theme_mod('dinero_blog_title_color2');
     remove_theme_mod('dinero_blog_subtitle_color');  
     remove_theme_mod('dinero_blog_box_onload_effects');
      remove_theme_mod('dinero_blog_post_image_height');
       remove_theme_mod('dinero_blog_post_excerpt');
     remove_theme_mod('dinero_blog_section_width');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_ourclient_reset_settings', 'dinero_ourclient_reset_settings' );
function dinero_ourclient_reset_settings() {
    remove_theme_mod('ourclient_area_disable'); 
    remove_theme_mod('dinero_ourclient_npp_count_heading');
    remove_theme_mod('dinero_ourclient_npp_count');
    remove_theme_mod('dinero_ourclient_page1');
    remove_theme_mod('dinero_ourclient_page_icon1');
    remove_theme_mod('dinero_ourclient_page_url_1');
    remove_theme_mod('dinero_ourclient_page2');
    remove_theme_mod('dinero_ourclient_page_icon2');
    remove_theme_mod('dinero_ourclient_page_url_2');
    remove_theme_mod('dinero_ourclient_page3');
    remove_theme_mod('dinero_ourclient_page_icon3');
    remove_theme_mod('dinero_ourclient_page_url_3');
    remove_theme_mod('dinero_ourclient_page4');
    remove_theme_mod('dinero_ourclient_page_icon4');
    remove_theme_mod('dinero_ourclient_page_url_4');
    remove_theme_mod('dinero_ourclient_page5');
    remove_theme_mod('dinero_ourclient_page_icon5');
    remove_theme_mod('dinero_ourclient_page_url_5');
    remove_theme_mod('dinero_ourclient_page6');
    remove_theme_mod('dinero_ourclient_page_icon6');
    remove_theme_mod('dinero_ourclient_page_url_6');
    remove_theme_mod('dinero_ourclient_page7');
    remove_theme_mod('dinero_ourclient_page_icon7');
    remove_theme_mod('dinero_ourclient_page_url_7');
    remove_theme_mod('dinero_ourclient_page8');
    remove_theme_mod('dinero_ourclient_page_icon8');
    remove_theme_mod('dinero_ourclient_page_url_8');
    remove_theme_mod('dinero_ourclient_page9');
    remove_theme_mod('dinero_ourclient_page_icon9');
    remove_theme_mod('dinero_ourclient_page_url_9');
    remove_theme_mod('dinero_ourclient_page10');
    remove_theme_mod('dinero_ourclient_page_icon10');
    remove_theme_mod('dinero_ourclient_page_url_10');
    remove_theme_mod('dinero_ourclient_page11');
    remove_theme_mod('dinero_ourclient_page_icon11');
    remove_theme_mod('dinero_ourclient_page_url_11');
    remove_theme_mod('dinero_ourclient_page12');
    remove_theme_mod('dinero_ourclient_page_icon12');
    remove_theme_mod('dinero_ourclient_page_url_12');
    remove_theme_mod('dinero_ourclient_page13');
    remove_theme_mod('dinero_ourclient_page_icon13');
    remove_theme_mod('dinero_ourclient_page_url_13');
    remove_theme_mod('dinero_ourclient_page14');
    remove_theme_mod('dinero_ourclient_page_icon14');
    remove_theme_mod('dinero_ourclient_page_url_14');
    remove_theme_mod('dinero_ourclient_page15');
    remove_theme_mod('dinero_ourclient_page_icon15');
    remove_theme_mod('dinero_ourclient_page_url_15');
    remove_theme_mod('dinero_ourclient_section_t_padding');
    remove_theme_mod('dinero_ourclient_section_b_padding');
    remove_theme_mod('luzuk_ourclient_title_heading1');
    remove_theme_mod('luzuk_premium_ourclient_section_background');
    remove_theme_mod('luzuk_ourclient_bg_color');
    remove_theme_mod('luzuk_ourclient_bg_image');
    remove_theme_mod('dinero_ourclient_image_opacity');
    remove_theme_mod('dinero_ourclient_box_align');       
    remove_theme_mod('dinero_ourclient_box_onload_effects');
    remove_theme_mod('dinero_ourclient_section_width');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_newsletter_reset_settings', 'dinero_newsletter_reset_settings' );
function dinero_newsletter_reset_settings() {
    remove_theme_mod('newsletter_area_disable'); 
    remove_theme_mod('dinero_newsletter_head_icon_enable'); 
    remove_theme_mod('dinero_newsletter_head_icon'); 
    remove_theme_mod('dinero_newsletter_maintitle');                 
    remove_theme_mod('dinero_newsletter_subtitle'); 
    remove_theme_mod('dinero_newsletter_shortcode'); 
    remove_theme_mod('dinero_newsletter_section_t_padding'); 
    remove_theme_mod('dinero_newsletter_section_b_padding'); 
    remove_theme_mod('luzuk_newsletter_title_heading1'); 
    remove_theme_mod('luzuk_premium_newsletter_section_background'); 
    remove_theme_mod('luzuk_newsletter_bg_color'); 
    remove_theme_mod('luzuk_newsletter_bg_image'); 
    remove_theme_mod('dinero_newsletter_image_opacity'); 
    remove_theme_mod('dinero_newsletterarea_secsubtitle_color'); 
    remove_theme_mod('dinero_newsletterarea_sectitle_color');   
    remove_theme_mod('dinero_newsletter_head_align');     
    remove_theme_mod('dinero_newsletter_box_onload_effects'); 
    remove_theme_mod('dinero_newsletter_section_width'); 
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}


add_action( 'wp_ajax_dinero_footer_reset_settings', 'dinero_footer_reset_settings' );
function dinero_footer_reset_settings() {
    remove_theme_mod('dinero_footer_copyrighttext');
    remove_theme_mod('dinero_footer_section_top_t_padding');
    remove_theme_mod('dinero_footer_section_top_b_padding');
    remove_theme_mod('dinero_footer_section_bottom_t_padding');
    remove_theme_mod('dinero_footer_section_bottom_b_padding');
    // remove_theme_mod('luzuk_footer_title_heading1');
    // remove_theme_mod('luzuk_premium_footer_section_background');
    // remove_theme_mod('luzuk_footer_bg_color');
    // remove_theme_mod('luzuk_footer_bg_image');
    remove_theme_mod('dinero_footer_image_opacity');
    remove_theme_mod('dinero_footer_box_align'); 
    remove_theme_mod('dinero_footer_copyright_align');   
    remove_theme_mod('dinero_footer_onload_effects');   
    remove_theme_mod('dinero_footer_box_onload_effects');
    remove_theme_mod('footerarea_title_color');
    remove_theme_mod('footerarea_text_color');
    remove_theme_mod('footerarea_hglightsctext_color');
    remove_theme_mod('footerarea_icon_color');
    remove_theme_mod('footerarea_sicon_color');
    remove_theme_mod('footerarea_siconhover_color');
    remove_theme_mod('footerarea_menu_color');
    remove_theme_mod('footerarea_menuhover_color');
    remove_theme_mod('footerarea_activemenu_color');
    remove_theme_mod('footerarea_datext_color');
    remove_theme_mod('footerarea_tableborder_color');
    remove_theme_mod('footerarea_formtextlabel_color');
    remove_theme_mod('footerarea_formtext_color');
    remove_theme_mod('footerarea_formbuttontext_color');
    remove_theme_mod('footerareabutton_border_color');
    remove_theme_mod('footerarea_otherfbgs_color');
    remove_theme_mod('dinero_footer_setting_width');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_allsetting_reset_settings', 'dinero_allsetting_reset_settings' );
function dinero_allsetting_reset_settings() {
    remove_theme_mod('dinero_show_sticky_header');
    remove_theme_mod('dinero_header_style');
     remove_theme_mod('dinero_header_width');
    remove_theme_mod('header_fb');
    remove_theme_mod('header_tw');
    remove_theme_mod('header_in');
    remove_theme_mod('header_youtube');
    remove_theme_mod('header_instagram');
    remove_theme_mod('header_whatsapp');
    remove_theme_mod('header_pinterest');
    remove_theme_mod('header_contlabel');
    remove_theme_mod('luzuk_headermain_phone');
    remove_theme_mod('luzuk_headermain_email');
    remove_theme_mod('header_bottombgColor');
    remove_theme_mod('header_topbgColor1');
    remove_theme_mod('header_topbgColor2');
    remove_theme_mod('header_SiteTitleColor');
    remove_theme_mod('header_SiteTaglineColor');
    remove_theme_mod('headereemail_color');
    remove_theme_mod('headereemailhove_color');
    remove_theme_mod('headereemailicon_color');
    remove_theme_mod('headerephoneicon_color');
    remove_theme_mod('headerphone_color');
    remove_theme_mod('header_socialColor');
    remove_theme_mod('header_socialhoverColor');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_logosetting_reset_settings', 'dinero_logosetting_reset_settings' );
function dinero_logosetting_reset_settings() {
    remove_theme_mod('header_stickylabel');
    remove_theme_mod('custom_logo');
    remove_theme_mod('blogname');
    remove_theme_mod('blogdescription');
    remove_theme_mod('site_icon');
    remove_theme_mod( 'dinero_show_site_title' );
    remove_theme_mod( 'dinero_show_tagline' );
    remove_theme_mod( 'dinero_logo_size' );
    remove_theme_mod( 'dinero_logo_height' );
    remove_theme_mod( 'dinero_logo_margin' );
    remove_theme_mod( 'dinero_logo_top_margin' );
    remove_theme_mod( 'dinero_logo_bottom_margin' );
    remove_theme_mod( 'dinero_logo_left_margin' );
    remove_theme_mod( 'dinero_logo_right_margin' );
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}


add_action( 'wp_ajax_dinero_menusetting_reset_settings', 'dinero_menusetting_reset_settings' );
function dinero_menusetting_reset_settings() {
    remove_theme_mod('dinero_submenu_animation');
    remove_theme_mod('dinero_menu_case');
    remove_theme_mod('dinero_menu_font_size');
    remove_theme_mod('dinero_menu_font_weight');
    remove_theme_mod('header_topmenusColor');
     remove_theme_mod('header_topmenushoverColor');
     remove_theme_mod('header_topmenusactiveColor');
     remove_theme_mod('header_topsubmenusColor');
     remove_theme_mod('header_submenusbgssc1Color');
     remove_theme_mod('header_submenusbgssc2Color');
     remove_theme_mod('header_topsubmenuiconColor');
     remove_theme_mod('header_respnavtoggbarbgssColor');
     remove_theme_mod('header_respnavbsbgssColor');
     remove_theme_mod('header_navigationrespnavbrssColor');
     remove_theme_mod('dinero_respmenu_font_size');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_othersetting_reset_settings', 'dinero_othersetting_reset_settings' );
function dinero_othersetting_reset_settings() {
    remove_theme_mod('back_top_btn_on_off');
    remove_theme_mod('luzuk_breadcrumbhometxt');
    remove_theme_mod('luzuk_template_innerpage_backttoparrcbgcolor');  
    remove_theme_mod('luzuk_template_innerpage_backttoparrcbghvrcolor');          
    remove_theme_mod('luzuk_template_innerpage_breadcrumbtitlecolor');
    remove_theme_mod('luzuk_template_innerpage_breadcrumbcurrenttitlecolor');
    remove_theme_mod('luzuk_template_innerpage_breadcrumbcurrenttitlehovercolor');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_blogpages_reset_settings', 'dinero_blogpages_reset_settings' );
function dinero_blogpages_reset_settings() {
    remove_theme_mod('blog_featured_img_on_off');
    remove_theme_mod('dinero_blogpage_post_image_height');
    remove_theme_mod('dinero_show_author');
    remove_theme_mod('dinero_show_date');
    remove_theme_mod('dinero_show_time');
    remove_theme_mod('dinero_show_category');
    remove_theme_mod('dinero_show_comments');
    remove_theme_mod('dinero_show_tags');
    remove_theme_mod('allblog_btnlabel1');                
    remove_theme_mod('allblog_btnlabel');
    remove_theme_mod('blog_page_button_display');
    remove_theme_mod('blog_page_btn_txt');
    remove_theme_mod('blog_socials_on_off');
    remove_theme_mod('luzuk__blog_layout');
    remove_theme_mod('luzuk_excerpt_length');
    remove_theme_mod('luzuk_template_innerpage_blogimgoverlaycolor1');
    remove_theme_mod('luzuk_template_innerpage_blogimgoverlaycolor2');
    remove_theme_mod('luzuk_template_innerpage_blogbuttoniconcolor');
    remove_theme_mod('luzuk_template_innerpage_blogbuttoniconbgcolor');
    remove_theme_mod('luzuk_template_innerpage_blogtitlecolor');
    remove_theme_mod('luzuk_template_innerpage_blogtitlehovercolor');
    remove_theme_mod('luzuk_template_innerpage_blogsocialcolor');
    remove_theme_mod('luzuk_template_innerpage_blogsocialbgcolor');
    remove_theme_mod('luzuk_template_innerpage_blogsocialhovercolor');
    remove_theme_mod('luzuk_template_innerpage_blogsocialbghovercolor');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_single_post_reset_settings', 'dinero_single_post_reset_settings' );
function dinero_single_post_reset_settings() {
    remove_theme_mod('featured_img_on_off');
    remove_theme_mod('dinero_single_post_image_height');
    remove_theme_mod('dinero_single_show_author');
    remove_theme_mod('dinero_single_show_date');
    remove_theme_mod('dinero_single_show_time');
    remove_theme_mod('dinero_single_show_category');
    remove_theme_mod('dinero_single_show_comments');
    remove_theme_mod('dinero_single_show_tags');
    remove_theme_mod('single_blog_socials_on_off');
    remove_theme_mod('luzuk__blogspost_layout');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_innerpages_reset_settings', 'dinero_innerpages_reset_settings' );
function dinero_innerpages_reset_settings() {
    remove_theme_mod('innerpage_featured_img_on_off');
    remove_theme_mod('dinero_innerpage_image_height');
    remove_theme_mod('breadcrumb_on_off');
    remove_theme_mod('page_title_on_off');
    remove_theme_mod('luzuk__page_layout');
    remove_theme_mod('dinero_inner_page_width');
    remove_theme_mod('dinero_innerpage_pagetitle_t_padding');
    remove_theme_mod('dinero_innerpage_pagetitle_b_padding');
    remove_theme_mod('dinero_innerpage_image_opacity');
    remove_theme_mod('dinero_innerpage_header_box_onload_effects');
    remove_theme_mod('luzuk_template_innerpagemainsectionbox_color');
    remove_theme_mod('luzuk_template_innerpage_titlecolor');
    remove_theme_mod('luzuk_template_innerpage_bgcolor1');
    remove_theme_mod('luzuk_template_innerpage_bgcolor2');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxheading1_color');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxheading2_color');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxheading3_color');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxheading4_color');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxheading5_color');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxheading6_color');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxheadingborderc1_color');
    remove_theme_mod('template_innerpage_contentboxsidebartitlecolor');                
    remove_theme_mod('template_innerpage_contentboxsidebartitlebordercolor');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxtext_color');
    remove_theme_mod('luzuk_template_innerpageallothrtheadtextcolcolor_color');
    remove_theme_mod('luzuk_template_innerpageallothrtheadtextbgsscolcolor_color');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxtextlinks_color');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxtextlinkshvrs_color');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxtextlinksicon_color');
    remove_theme_mod('luzuk_template_innerpagemainsectionboxtextlinksiconbgssclr_color');
    remove_theme_mod('luzuk_template_innerpagemainsectionsidebarborderrs_color');
    remove_theme_mod('luzuk_template_innerpagesidebardaytxt_color');
    remove_theme_mod('luzuk_template_innerpagesidebardaybgsstxt_color');
    remove_theme_mod('luzuk_template_innerpagesblockquote_color');
    remove_theme_mod('luzuk_template_innerpagepagination_color');
    remove_theme_mod('luzuk_template_innerpagepaginationbg_color');
    remove_theme_mod('luzuk_template_innerpagepaginationborder_color');
    remove_theme_mod('luzuk_template_innerpagepaginationactive_color');
    remove_theme_mod('luzuk_template_innerpagepaginationbgactive_color');
    remove_theme_mod('luzuk_template_innerpagepaginationborderactive_color');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_contactpages_reset_settings', 'dinero_contactpages_reset_settings' );
function dinero_contactpages_reset_settings() {
    remove_theme_mod('dinero_contactpage_address_label');
    remove_theme_mod('dinero_contactpage_address');
    remove_theme_mod('dinero_contactpage_address_line1');
    remove_theme_mod('dinero_contactpage_address_line2');
    remove_theme_mod('dinero_contactpage_phone_label');
    remove_theme_mod('dinero_contactpage_phone');
    remove_theme_mod('dinero_contactpage_phone_another');
    remove_theme_mod('dinero_contactpage_email_label');                
    remove_theme_mod('dinero_contactpage_email');
    remove_theme_mod('dinero_contactpage_email_another');
    remove_theme_mod('dinero_contactpage_time_label');
    remove_theme_mod('dinero_contactpage_day');
    remove_theme_mod('dinero_contactpage_time_time');
    remove_theme_mod('dinero_contactpage_formtitle');
    remove_theme_mod('dinero_contactpage_form_shortcode');
    remove_theme_mod('dinero_contactpage_iframe_shortcode');
    remove_theme_mod('dinero_contactpage_content_align');
    remove_theme_mod('dinero_contactpage_box_onload_effects');
    remove_theme_mod('dinero_contactpage_iconbg_color1');
    remove_theme_mod('dinero_contactpage_iconbg_color2');
    remove_theme_mod('dinero_contactpage_icon_color');
    remove_theme_mod('dinero_contactpage_label_color');
    remove_theme_mod('dinero_contactpage_info_color');
    remove_theme_mod('dinero_contactpage_infohover_color');
    remove_theme_mod('dinero_contactpage_border_color');
    remove_theme_mod('dinero_contactpage_heading_color');
    remove_theme_mod('dinero_contactpage_headingborder_color1');
    remove_theme_mod('dinero_contactpage_headingborder_color2');
    remove_theme_mod('dinero_contactpage_formtext_color');
    remove_theme_mod('dinero_contactpage_formlabel_color');
    remove_theme_mod('dinero_contactpage_formbg_color');
    remove_theme_mod('dinero_contactpage_formborder_color');
    remove_theme_mod('dinero_contactpage_formbtnbg_color1');
    remove_theme_mod('dinero_contactpage_formbtnbg_color2');
    remove_theme_mod('dinero_contactpage_formbtntext_color');
    remove_theme_mod('dinero_contactpage_mapborder_color');

    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

add_action( 'wp_ajax_dinero_shoppage_reset_settings', 'dinero_shoppage_reset_settings' );
function dinero_shoppage_reset_settings() {
    remove_theme_mod('luzuk_shop_sidebar');
    wp_send_json_success(
        array(
            'success' => true,
            'message' => "Reset Completed",
        )
    );
}

// function dinero_header_image( $image_url ){
//     global $post;

//     if( is_singular() ){
//         $image_url      = get_the_post_thumbnail_url( $post->ID, 'full' );
//         $header_image = get_header_image();
//         $fallback_image = ! empty( $header_image ) ?  $header_image : esc_url(get_template_directory_uri()) . '/assets/images/header-default.png';
//         $image_url      = ( ! empty( $image_url) ) ? $image_url : $fallback_image;
//     }
//     return $image_url;
// }



add_action('admin_menu', 'luzuk_lite_reorder_appearance_menu', 999);

function luzuk_lite_reorder_appearance_menu() {
    global $submenu;

    if (isset($submenu['themes.php'])) {
        $themes_submenu = $submenu['themes.php'];

        // Find and extract the Themes Dashboard item
        foreach ($themes_submenu as $key => $item) {
            if ($item[2] === 'themes-dashboard') {
                $dashboard_item = $item;
                unset($themes_submenu[$key]);
                break;
            }
        }

        // Re-index and add Themes Dashboard at the top
        if (isset($dashboard_item)) {
            $themes_submenu = array_values($themes_submenu); // reindex
            array_unshift($themes_submenu, $dashboard_item);
            $submenu['themes.php'] = $themes_submenu;
        }
    }
}

// Hook into current_screen to detect if we're on our custom page
add_action('current_screen', 'luzuk_lite_hide_admin_notices_on_custom_page');

function luzuk_lite_hide_admin_notices_on_custom_page($screen) {
    // Check for our custom page slug
    if ($screen->id === 'appearance_page_themes-dashboard') {
        // Remove all actions that show admin notices
        remove_all_actions('admin_notices');
        remove_all_actions('all_admin_notices');
        remove_all_actions('network_admin_notices');
    }
}

add_action('admin_menu', 'luzuk_lite_add_themes_dashboard_menu');

function luzuk_lite_add_themes_dashboard_menu() {
    add_theme_page(
        'Themes Dashboard',
        'Themes Dashboard',
        'manage_options',
        'themes-dashboard',
        'luzuk_lite_themes_dashboard_page'
    );
}

function luzuk_lite_themes_dashboard_page() {
    // Handle force ping request
    if ( isset( $_GET['force_tracker_ping'] ) && check_admin_referer( 'force_tracker_ping' ) ) {
        if ( function_exists( 'luzuk_lite_force_tracker_ping' ) ) {
            $result = luzuk_lite_force_tracker_ping();
            if ( $result['success'] ) {
                echo '<div class="notice notice-success is-dismissible"><p>' . esc_html( $result['message'] ) . '</p></div>';
            } else {
                echo '<div class="notice notice-error is-dismissible"><p>' . esc_html( $result['message'] ) . '</p></div>';
            }
        }
    }

    echo luzuk_lite_render_combined_dashboard();
}

function luzuk_lite_render_combined_dashboard() {
    $theme = wp_get_theme();
    $theme_name = $theme->get('Name');
    $screenshot = $theme->get_screenshot();
	$theme_description = $theme->get('Description');
    $theme_version = $theme->get('Version');

    $customize_url = admin_url('customize.php');

	// Dashboard file
	$dashboard_url = 'https://raw.githubusercontent.com/LuzukThemes/themes-dashboard/main/dashboard.html';
	$dashboard_response = wp_remote_get($dashboard_url);
	$dashboard_html = '';

	if (!is_wp_error($dashboard_response)) {
		$dashboard_html = wp_remote_retrieve_body($dashboard_response);
	} else {
		$dashboard_html = '<div class="notice notice-error"><p>Unable to load Dashboard content from GitHub.</p></div>';
	}

    ob_start(); ?>
    <div class="wrap">
        <h1>Themes Dashboard</h1>
        <div style="display: flex; gap: 30px; margin-top: 30px;">

            <!-- Left Column -->
            <div style="flex: 1; background: #fff; padding: 20px; border: 1px solid #ddd; border-radius: 8px;">
				<h2 style="margin: 0 0 30px;background: #000;color: #fff;padding: 22px;text-align: center;border-radius: 6px;">Use this coupon code and get 15% discount instantly <span style="background: #ff0000; color: #fff; padding: 5px 10px; border-radius: 5px;margin-left: 10px;">LUZUKDISCOUNT</span></h2>
                <img src="<?php echo esc_url($screenshot); ?>" alt="Theme Screenshot" style="max-width: 50%; border: 1px solid #ccc; float: left; margin-right: 20px; border-radius: 8px; border-right-color: #ff0000; border-bottom-color: #ff0000;" />
				<div style="background: #fff; padding: 20px; border: 1px solid #ddd; border-radius: 8px;">
					<h2 style="margin: 20px 0 30px;"><?php echo esc_html($theme_name); ?></h2>
					<p><strong>Version:</strong> <?php echo esc_html($theme_version); ?></p>
					<p><?php echo esc_html($theme_description); ?></p>
				</div>
                <div style="margin: 15px 0 50px;">
                    <a href="https://www.luzukdemo.com/demo/dinero/" target="_blank" class="button" style="background: #000; color: #fff; margin-right: 10px; padding: 6px 24px; font-size: 16px; font-weight: bold">Live Demo</a>
					<a href="https://www.luzukdemo.com/docs/dinero/" target="_blank" class="button" style="background: #000; color: #fff; margin-right: 10px; padding: 6px 24px; font-size: 16px; font-weight: bold">Pro Documentation</a>
					<a href="https://www.luzuk.com/products/multipurpose-corporate-wordpress-theme/" target="_blank" class="button" style="background: #0056ff; color: #fff; margin-right: 10px; padding: 6px 24px; font-size: 16px; font-weight: bold">Buy Premium</a>
                </div>

                <?php echo $dashboard_html; ?>

		</div>
          
		<div style="display: flex; gap: 30px; margin-top: 30px; text-align: center;">
			<div style="flex: 2; margin: 20px 0; padding: 20px; background: #f7f7f7; border: 1px dashed #aaa;">
                <div class="coupon-ticket">
                    <div class="coupon-title">Get 15% OFF</div>
                    <div>Use Code Below:</div>
                    <div class="coupon-code" onclick="copyCoupon(this)">LUZUKDISCOUNT</div>
                </div>
                <script>
                    function copyCoupon(el) {
                        const coupon = el.textContent;
                        navigator.clipboard.writeText(coupon).then(() => {
                        el.classList.add("copied");
                        setTimeout(() => {
                            el.classList.remove("copied");
                        }, 2000);
                        });
                    }
                </script>
                  <style>
      
                .coupon-ticket {
                width: 320px;
                margin: 40px auto;
                padding: 20px;
                border: 2px dashed #ff4d4d;
                border-radius: 10px;
                background-color: #fff4f4;
                font-family: Arial, sans-serif;
                text-align: center;
                position: relative;
                }

                .coupon-ticket::before,
                .coupon-ticket::after {
                content: "";
                position: absolute;
                top: 50%;
                width: 20px;
                height: 20px;
                background-color: #fff4f4;
                border: 2px dashed #ff4d4d;
                border-radius: 50%;
                transform: translateY(-50%);
                }

                .coupon-ticket::before {
                left: -12px;
                }

                .coupon-ticket::after {
                right: -12px;
                }

                .coupon-title {
                font-size: 20px;
                color: #d80000;
                font-weight: bold;
                margin-bottom: 10px;
                }

                .coupon-code {
                display: inline-block;
                background-color: #d80000;
                color: #fff;
                padding: 8px 16px;
                font-size: 16px;
                border-radius: 4px;
                margin-top: 5px;
                letter-spacing: 1px;
                cursor: pointer;
                }
                .coupon-code::after {
                content: "Click to copy";
                position: absolute;
                top: -30px;
                left: 50%;
                transform: translateX(-50%);
                background: #333;
                color: #fff;
                padding: 5px 8px;
                border-radius: 4px;
                font-size: 12px;
                white-space: nowrap;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.3s ease;
            }

            .coupon-code:hover::after {
                opacity: 1;
            }

            .coupon-code.copied::after {
                content: "Copied!";
                background: #4caf50;
            }
            </style>
				<a href="https://www.luzuk.com/products/multipurpose-corporate-wordpress-theme/" target="_blank" class="button button-primary" style="display: block; padding: 10px; background: #77b255;font-weight: bold; margin-top: 10px;">UPGRADE NOW</a><br>
			</div>
			<div style="flex: 2; margin: 20px 0; padding: 20px;"></div>
		</div>
		
    <?php
    return ob_get_clean();
}

/**
 * Show notice on frontend pages that contain shortcodes.
 * Free theme: inform user that shortcodes require premium.
 */
function luzuk_lite_shortcode_premium_notice( $content ) {
    if ( is_admin() ) {
        return $content;
    }
 
    if ( ! is_singular( 'page' ) || ! in_the_loop() || ! is_main_query() ) {
        return $content;
    }
 
    global $post;
    if ( ! $post instanceof WP_Post ) {
        return $content;
    }
 
    // Simple detection: if the original content contains shortcode syntax
    if ( strpos( $post->post_content, '[' ) === false || strpos( $post->post_content, ']' ) === false ) {
        return $content;
    }
 
    $notice  = '<div class="luzuk-shortcode-premium-notice" style="margin:20px 0;padding:12px 15px;border:1px solid #e1a200;background:#fff8e5;color:#333;font-size:14px;border-radius:4px;">';
    $notice .= esc_html__( 'Shortcodes are available only in the premium version of this theme. To use shortcode features, please purchase the premium theme.', 'Luzuk Premium' );
    $notice .= '</div>';
 
    // Add big upgrade button under the notice text
    $notice .= '<a href="https://www.luzuk.com/products/multipurpose-corporate-wordpress-theme/" target="_blank" class="button button-primary" style="    color: #fff;display:block;padding:10px;background:#77b255;font-weight:bold;margin:10px 0 0 0;text-align:center;">UPGRADE NOW</a>';
 
    return $notice . $content;
}
add_filter( 'the_content', 'luzuk_lite_shortcode_premium_notice', 5 );
?>
