<?php

/**
 * Liting the team/trainer details 
 * @param : int $pageId default is null
 * @param : boolean $isCustomizer default is false, if set to true will get the data stored with customizer
 * @param : int $i default is null, it will used as a iteration for data with customizer, this will be used only if the $isCustomizer is set to true.
 * @return: Text $text
 */
function teamShortCode($pageId = null, $isCustomizer = false, $i = null) {

    ob_start();

    $args = array('post_type' => 'lz_fitness_teams');
    if (!empty($pageId)) {
        $args['page_id'] = absint($pageId);
    }
    $args['posts_per_page'] = -1;
    $colCls = '';
    // if($isCustomizer == true){
    $cols = get_theme_mod('lz_fitness_team_npp_count', 3);
    $cols++;
    switch($cols){
        case 1:
            $colCls = 'col-md-12 col-sm-12 col-xs-12';
            break;
        case 2:
            $colCls = 'col-md-6 col-sm-6 col-xs-12';
            break;
        case 3:
        case 5:
        case 6:
            $colCls = 'col-md-4 col-sm-6 col-xs-12';
            break;
        default:
            $colCls = 'col-md-3 col-sm-6 col-xs-12';
            break;
    }
                
    // }
    $text = '';
    $query = new WP_Query($args);
    if ($query->have_posts()):
        $postN = 0;

        while ($query->have_posts()) : $query->the_post();
            $lz_fitness_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'total-team-thumb');
            if ($isCustomizer === true) {
                $lz_fitness_team_designation = get_theme_mod('lz_fitness_team_designation' . $i);
                $lz_fitness_team_facebook = get_theme_mod('lz_fitness_team_facebook' . $i);
                $lz_fitness_team_twitter = get_theme_mod('lz_fitness_team_twitter' . $i);
                 $lz_fitness_team_linkedin = get_theme_mod('lz_fitness_team_linkedin' . $i);
                  $lz_fitness_team_instagram = get_theme_mod('lz_fitness_team_instagram' . $i);
            } else {
                $lz_fitness_team_facebook = '';
                $lz_fitness_team_twitter = '';
                 $lz_fitness_team_linkedin = '';
                  $lz_fitness_team_instagram = '';
            }

            $post = get_post();
            //Social media urls
            $teamFacebook = get_post_meta($post->ID, 'teamFacebook', false);
            $lz_fitness_team_facebook = !empty($teamFacebook[0]) ? $teamFacebook[0] : '';
            $teamTwitter = get_post_meta($post->ID, 'teamTwitter', false);
            $lz_fitness_team_twitter = !empty($teamTwitter[0]) ? $teamTwitter[0] : '';

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

             $teamlinkedIn = get_post_meta($post->ID, 'teamlinkedIn', false);
            $lz_fitness_team_linkedin = !empty($teamlinkedIn[0]) ? $teamlinkedIn[0] : '';
            //designation
            $designation = get_post_meta($post->ID, 'designation', false);
            $lz_fitness_team_designation = !empty($designation[0]) ? $designation[0] : '';

            
            ?>
             <div class="row">
            <div class="<?php echo $colCls; ?>">
                <div class="ht-team-member text-center">
                    
                    <div class="ht-team-member-image">
                        <?php
                        if (has_post_thumbnail()) {
                            $image_url = $lz_fitness_image[0];
                        } else {
                            $image_url = get_template_directory_uri() . '/images/team-thumb.png';
                        }
                        ?>                  
                        <img src="<?php echo esc_url($image_url); ?>" alt="<?php the_title(); ?>" />

                       <div class="team-shape-border"></div>
                       
                        </div>
                       
                        <div class="ht-title-wrap">
                            <h6 class="member-name"><?php the_title(); ?></h6>                        
                      <!--   <div class class="ht-team-member-excerpt"> -->
                            <div class="ht-team-member-excerpt-wrap">
                                <div class="ht-team-member-span">
                                    <!-- <h6><?php //the_title(); ?></h6> -->
                                    <?php if (!empty($lz_fitness_team_designation)) { ?>
                                    <div class="team-member-designation"><?php echo($lz_fitness_team_designation); ?></div>
                                    <?php
                                    } ?>
                                    <div class="teamborder"></div> 
                                    <div class="team-content">
                                    <?php
                                        if(has_excerpt()){
                                          echo get_the_excerpt();
                                         }else{
                                          echo get_the_content();
                                         } 
                                     ?>
                               </div>
                                <!-- <div class="ht-team-detail"><?php //_e('Detail', 'total') ?></div> -->
                            </div>
                        </div>
                        <?php if ($lz_fitness_team_facebook || $lz_fitness_team_twitter || $lz_fitness_team_instagram || $lz_fitness_team_linkedin) { ?>
                        <div class="ht-team-social-id socialinnerpage">
                            <?php if ($lz_fitness_team_facebook) { ?>
                            <a target="_blank" href="<?php echo esc_url($lz_fitness_team_facebook) ?>"><i class="fa fa-facebook"></i></a>
                            <?php } ?>
                            <?php if ($lz_fitness_team_twitter) { ?>
                            <a target="_blank" href="<?php echo esc_url($lz_fitness_team_twitter) ?>"><i class="fa fa-twitter"></i></a>
                            <?php } ?>

                            <?php if ($lz_fitness_team_instagram) { ?>
                            <a target="_blank" href="<?php echo esc_url($lz_fitness_team_instagram) ?>"><i class="fa fa-instagram"></i></a>
                            <?php } ?>
                            <?php if ($lz_fitness_team_linkedin) { ?>
                            <a target="_blank" href="<?php echo esc_url($lz_fitness_team_linkedin) ?>"><i class="fa fa-linkedin"></i></a>
                            <?php } ?>
                        </div>                
                        <?php } ?>
                        
                   <!--  </div> -->
                </div>                 
                <div class="clearfix"></div> 
                </div>         
            </div>
              <script>
                            jQuery.noConflict();
                            $(function(){
                                function htteammemberHeight(){
                                    var ht = 0;
                                    $('#innerpage-box .ht-team-member').each(function(i){
                                        var tHt = $(this).height();
                                        if(ht<tHt){
                                            ht=tHt;
                                        }
                                    });
                                    $('#innerpage-box .ht-team-member').height(ht+'px');
                                }
                                htteammemberHeight();
                            });
                            $( window ).resize(function(){
                                htteammemberHeight();
                            });
                        </script>   


        <?php
    endwhile;
    $text = ob_get_contents();
    ob_clean();
endif;
wp_reset_postdata();
return $text;
}





/**
 * Liting the services details 
 * @param : int $pageId default is null
 * @param : boolean $isCustomizer default is false, if set to true will get the data stored with customizer
 * @param : int $i default is null, it will used as a iteration for data with customizer, this will be used only if the $isCustomizer is set to true.
 * @return: Text $text
 */
function featuredShortCode($pageId = null, $isCustomizer = false, $i = null) {
    ob_start();

    $args = array('post_type' => 'lz_fitness_features');
    if (!empty($pageId)) {
        $args['page_id'] = absint($pageId);
    }
    $args['posts_per_page'] = -1;
    $colCls = '';
    // if($isCustomizer == true){
    $cols = get_theme_mod('lz_fitness_featured_npp_count', 3);
     $lz_fitness_featured_page_icon1 = get_theme_mod('lz_fitness_featured_page_icon1'.$i);
    $cols++;
    switch($cols){
        case 1:
            $colCls = 'col-md-12 col-sm-12 col-xs-12';
            break;
        case 2:
            $colCls = 'col-md-6 col-sm-6 col-xs-12';
            break;
        case 3:
        case 5:
        case 6:
            $colCls = 'col-md-6 col-sm-6 col-xs-12';
            break;
        default:
            $colCls = 'col-md-6 col-sm-6 col-xs-12';
            break;
    }
                
    // }
    $text = '';
    $query = new WP_Query($args);
    if ($query->have_posts()):
        $postN = 0;

        while ($query->have_posts()) : $query->the_post();
            $lz_fitness_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'total-features-thumb');

            

            if ($isCustomizer === true) {
                $lz_fitness_features_designation = get_theme_mod('lz_fitness_features_designation' . $i);
            }
            $post = get_post();
            //designation
            $designation = get_post_meta($post->ID, 'designation', false);
            $lz_fitness_features_designation = !empty($designation[0]) ? $designation[0] : '';
           
            ?> 
            <div class="row">
            <div class="<?php echo $colCls; ?> fpost">
                        
                <div class="featured-post-box">
                   
                    <div class="featured-post">
                        <a class="secondry-bg" href="<?php echo esc_url(get_permalink()); ?>">
                             <div class="featured-icon">
                                <span class="<?php echo $lz_fitness_featured_page_icon1; ?>"></span>
                            </div>
                        </a>

                        <div class="featuredcontent-data">
                              <a class="secondry-bg" href="<?php echo esc_url(get_permalink()); ?>">
                                <div class="spinner"></div>
                                <div class="featured-img">
                                    <?php
                                    if (has_post_thumbnail()) {
                                        $image_url = $lz_fitness_image[0];
                                    } else {
                                        $image_url = get_template_directory_uri() . '/images/team-thumb.png';
                                    }
                                    ?>                  
                                    <img class="secondry-bg-img img-responsive" src="<?php echo esc_url($image_url); ?>" alt="<?php the_title(); ?>" />
                                </div>
                                </a>
                            <div class="featured-data">
                                <h5><?php echo wp_trim_words( get_the_title(), 4 ); ?></h5>
                                <div class="featuredborder"></div>
                                <div class="clearfix"></div> 
                                <p>
                                    <?php

                                    if(has_excerpt()){
                                      echo get_the_excerpt();
                                     }else{
                                      echo lz_fitness_excerpt( get_the_content() , 120 );
                                     } 
                                    ?>
                                </p>
                            </div>
                        </div>
                    </div> 
                           
                <div class="clearfix"></div>          
                </div>
           </div>    
        <?php
    endwhile;
    $text = ob_get_contents();
    ob_clean();
endif;
wp_reset_postdata();
return $text;
}




     /**
     * Use for the show the testimonials at home page and in testimonial page with shortcode
     * @param int $pageId default is null the id of a post
     * @param boolean $isCustomizer default is false if set to true it mean the output is set for the home page
     * @param int $i default null
     * @param boolean $showStaticVals default is false
     * @return void
     * @author Luzuk Premium <support@luzuk.com>
     * */
   function testimonialShortCode($pageId = null, $isCustomizer = false, $i = 0, $showStaticVals = false, $totalItems=0) {
    global $query;
    $args = array('post_type' => 'lz_fitness_testimoni');
    if (!empty($pageId)) {
        $args['page_id'] = absint($pageId);
    } else {
        $args['paged'] = max(1, get_query_var('paged'));
    }
    $args['posts_per_page'] = (!empty($args['posts_per_page'])) ? $args['posts_per_page'] : -1;
    $i = !empty($i) && is_numeric($i) ? $i : 0;
    $text = '';
    $query = new WP_Query($args);
    // print_r($query);
    if ($query->have_posts()):
        $cssCls = ($isCustomizer == false) ? 'col-md-6 col-sm-12' : 'col-sm-10 col-sm-offset-1';

        ob_start();
        while ($query->have_posts()) : $query->the_post();
            $post = get_post();
            $lz_fitness_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'total-team-thumb');
           // echo"(($i == 0) || ($i%2)==0)".__LINE__;
            if(($i == 0) || ($i%2)==0){
                ?>
                <div class="item <?php if ($i == 0) { ?>active<?php } ?>">
                    <div class="row">
                        <?php
                    }
                    ?>
                    <div class="<?php echo $cssCls; ?> padding0 testineer">
                        <?php if ($isCustomizer == false) { ?>
                            <div class="row">

                             <div class="col-sm-10 testimonial-contentbox">
                                <div class="quote-shape"></div>
                             <?php } ?>
                            <div class="team-thumb padding0">
                                <img src="<?php echo (!empty($lz_fitness_image[0])) ? $lz_fitness_image[0] : get_template_directory_uri() . '/images/team-thumb.png' ?>" class="img-responsive" alt="<?php the_title(); ?>" />

                            </div>
                            <div class="col-md-12 col-sm-12 padding0 test-box">
                                <h3 class="secondry-text"><?php the_title(); ?></h3>
                                 <div class="text-designation">
                                    <?php
                                    $name2 = get_post_meta($post->ID, 'testimonial_Sub_Title', false);
                                    echo (!empty($name2[0])) ? $name2[0] : '';
                                    ?>
                                </div>
                                <p><?php
                                      if (has_excerpt()) {
                                        echo get_the_excerpt();
                                    } else {
                                        echo get_the_content();
                                    }
                                ?>
                                </p>
                            </div>  
                    <?php if ($isCustomizer == false) { ?>
                     </div>

                    </div>
                <?php } ?>
                <div class="clearfix"></div>
            </div>
                <?php
            //echo"\n($i+1)%2 == 0 || $totalItems == ($i+1)";
                if(($i+1)%2 == 0 || $totalItems == ($i+1)){ ?>
            </div>
        </div>
        <?php
    }
    ?>

    <?php
endwhile;
$text = ob_get_contents();
ob_clean();
ob_end_flush();
endif;
wp_reset_postdata();
    // echo $text;
return $text;
}


/*End Testimonials*/

function faqShortcode($isHome = 0) {
    global $query;

    $args = array('post_type' => 'lz_faq');

    if (!empty($pageId)) {
        $args['page_id'] = absint($pageId);
    } else {
        $args['paged'] = max(1, get_query_var('paged'));
    }

    if(!empty($isHome) && $isHome == 1){
        $cols = get_theme_mod('faq_section_npp_count', 7);
        $cols++;
        $args['posts_per_page'] = $cols;
    }else{
        $args['posts_per_page'] = (!empty($args['posts_per_page'])) ? $args['posts_per_page'] : -1;
         // $cols = 5;
    }
    $faqPageId = get_theme_mod('faq_section_page_link');
    $query = new WP_Query($args);
    ob_start();
    // print_r($query);
    echo '<div class="faq">';
    if ($query->have_posts()){
        while ($query->have_posts()) : $query->the_post();
            $post = get_post();
            ?>
            <div class="row">
                    <div class="col-md-12 faq-content padding0">
                    <h6 class="faq-title"><?php the_title(); ?></h6>
                    <div class="faq-description">
                        <p><?php
                            if(!empty($isHome) && $isHome==1){
                                if (has_excerpt()) {
                                    echo get_the_excerpt();
                                } else {
                                    //echo lz_fitness_excerpt(get_the_content(),300);
                                     echo get_the_content();
                                }
                                // if(!empty($faqPageId)){
                                //     echo '<a href="'.get_permalink($faqPageId).'">Read More..</a>';
                                // }else{
                                //     echo '<a href="'.get_permalink($faqPageId).'">Read More..</a>';
                                // }
                            }else{
                                echo get_the_content();
                            }?>
                        </p>
                    </div> 
                </div>
            </div>
            <?php
        endwhile;
    }else{
        for($i=0; $i<$cols; $i++){
            ?>
            <div class="row">
                <div class="col-md-12 faq-content">
                    <h6 class="faq-title">Lorem Ipsum is simply dummy text of the printing and typesetting industry?</h6>
                    <div class="faq-description">
                        <p><?php
                            if(!empty($isHome) && $isHome==1){
                                ?>
                                Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. Lorem Ipsum is simply dummy text of the printing  typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
                                <br>
                                <?php
                                // if(!empty($faqPageId)){
                                //     echo '<a href="'.get_permalink($faqPageId).'">Read More..</a>';
                                // }else{
                                //     echo '<a href="'.get_permalink($faqPageId).'">Read More..</a>';
                                // }
                            }else{
                                ?>
                                Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. Lorem Ipsum is simply dummy text of the printing  typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.

                                Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. Lorem Ipsum is simply dummy text of the printing  typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
                                <?php
                            }?>
                        </p>
                    </div>  
                </div>
            </div>
            <?php
        }
    }
        echo '</div>';
        ?>

        <script>
            $(function(){
                $('.faq-description').hide();
                $('.faq-title').on('click', function(){
                    $('.faq-description.active').slideToggle(500).removeClass('active');
                    $(this).next().slideToggle(500).toggleClass('active');
                    
                });
            });
        </script>
        <?php
        $text = ob_get_contents();
        ob_clean();
        ob_end_flush();
    wp_reset_postdata();
    // echo $text;
    return $text;
}


   
 /*gallery*/

function galleryShortCode($pageId = null, $isCustomizer = false, $i = null) {

    ob_start();

    $args = array('post_type' => 'lz_fitness_gallery');
    if (!empty($pageId)) {
        $args['page_id'] = absint($pageId);
    }
    $args['posts_per_page'] = -1;
    $colCls = '';
    // if($isCustomizer == true){
    $cols = get_theme_mod('lz_fitness_gallery_npp_count', 8);  
    ++$cols;
    switch ($cols) {
        case 1:
            $colCls = 'col-md-12 col-sm-12 col-xs-12';
            break;
        case 2:
            $colCls = 'col-md-6 col-sm-6 col-xs-12';
        default: 
            $colCls = 'col-md-3 col-sm-6 col-xs-12';
            break;
    }
    // }
    $text = '';
    $query = new WP_Query($args);
    if ($query->have_posts()):
        $postN = 0;

        while ($query->have_posts()) : $query->the_post();
            $lz_fitness_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium_large');
            if ($isCustomizer === true) {
                // $lz_fitness_gallery_designation = get_theme_mod('lz_fitness_gallery_designation' . $i);
                // $lz_fitness_gallery_facebook = get_theme_mod('lz_fitness_gallery_facebook' . $i);
                // $lz_fitness_gallery_twitter = get_theme_mod('lz_fitness_gallery_twitter' . $i);
                // $lz_fitness_gallery_google_plus = get_theme_mod('lz_fitness_gallery_google_plus' . $i);
                // $lz_fitness_gallery_pintrest = get_theme_mod('lz_fitness_gallery_pintrest' . $i);
            } else {
                // $lz_fitness_gallery_facebook = '';
                // $lz_fitness_gallery_twitter = '';
                // $lz_fitness_gallery_google_plus = '';
                // $lz_fitness_gallery_pintrest = '';
            }

            $post = get_post();
            //Social media urls
            // $galleryFacebook = get_post_meta($post->ID, 'galleryFacebook', false);
            // $lz_fitness_gallery_facebook = !empty($teamFacebook[0]) ? $galleryFacebook[0] : '';
            // $galleryTwitter = get_post_meta($post->ID, 'galleryTwitter', false);
            // $lz_fitness_gallery_twitter = !empty($teamTwitter[0]) ? $galleryTwitter[0] : '';
            // $galleryGPlus = get_post_meta($post->ID, 'galleryGPlus', false);
            // $lz_fitness_gallery_google_plus = !empty($teamGPlus[0]) ? $galleryGPlus[0] : '';
            // $galleryPintrest = get_post_meta($post->ID, 'galleryPintrest', false);
            // $lz_fitness_gallery_pintrest = !empty($galleryPintrest[0]) ? $galleryPintrest[0] : '';
            // //designation
            // $designation = get_post_meta($post->ID, 'designation', false);
            // $lz_fitness_gallery_designation = !empty($designation[0]) ? $designation[0] : '';

            if (($postN % 4) == 0 && $isCustomizer == false) {
                ?>
                <div class="clearfix paddingBot20"></div>
                </div>
                <div class="row">
                    <?php
                }
                ++$postN;
                ?>
                
                <div class="<?php echo $colCls; ?> gallery-img lz-gallery-images slide-item">
                    <div class="ht-gallery-member">
                        <div class="ht-gallery-member-image">
                            <?php
                            if (has_post_thumbnail()) {
                                $image_url = $lz_fitness_image[0];
                            } else {
                                $image_url = get_template_directory_uri() . '/images/about1.jpg';
                            }
                            ?>
                            <a class="group1" href="<?php echo esc_url($image_url); ?>" title="<?php the_title(); ?>"> <img class="secondry-bg img-responsive" src="<?php echo esc_url($image_url); ?>" alt="<?php the_title(); ?>" /> </a>
                        </div>
                           
                               <!--  <h6 class="member-name"><?php //the_title(); ?></h6> -->
                            
                                   <!-- <div class="ht-gallery-member-excerpt-wrap"> -->
                                     <!--   <div class="ht-gallery-member-span"> -->
                                            <?php //if (!empty($lz_fitness_team_designation)) {// ?>
                                            <!-- <div class="ht-team-designation"><?php //echo esc_html($lz_fitness_team_designation); ?></div> -->
                                          <!--  <div class="ht-gallery-content">-->
                                            <?php                                   
                                           // if(has_excerpt()){
                                               // echo get_the_excerpt();
                                            // }else{
                                               // echo lz_fitness_excerpt( get_the_content() , 100 );
                                            // } 
                                            ?>
                                       <!--  </div>  -->
                                            <!-- <div class="ht-team-detail"><?php//_e('Detail', 'total') ?></div> -->
                                        <!-- </div> --> 
                                 <!--   </div> -->
                                
                                <!-- <?php// if ($lz_fitness_gallery_facebook || $lz_fitness_gallery_twitter || $lz_fitness_gallery_google_plus) { ?>
                                <div class="ht-team-social-id">
                                    <?php // if ($lz_fitness_gallery_facebook) { ?>
                                        <a target="_blank" href="<?php // echo esc_url($lz_fitness_gallery_facebook) ?>"><i class="fa fa-facebook"></i></a>
                                    <?php //} ?>
                                    <?php //if ($lz_fitness_gallery_twitter) { ?>
                                        <a target="_blank" href="<?php // echo esc_url($lz_fitness_gallery_twitter) ?>"><i class="fa fa-twitter"></i></a>
                                    <?php // } ?>
                                    <?php //if ($lz_fitness_gallery_google_plus) { ?>
                                        <a target="_blank" href="<?php // echo esc_url($lz_fitness_gallery_google_plus) ?>"><i class="fa fa-google-plus"></i></a>
                                    <?php //} ?>
                                    <?php // if ($lz_fitness_gallery_pintrest) { ?>
                                        <a target="_blank" href="<?php // echo esc_url($lz_fitness_gallery_pintrest) ?>"><i class="fa fa-pinterest-p"></i></a>
                                    <?php // } ?>
                                </div>                          
                                <?php// } ?> -->
                            
                        </div>
                </div>
                <?php
            endwhile;
            $text = ob_get_contents();
            ob_clean();
        endif;
        wp_reset_postdata();
        return $text;
}

    /**
     * Use for the show the testimonials at home page and in testimonial page with shortcode
     * @param int $pageId default is null the id of a post
     * @param boolean $isCustomizer default is false if set to true it mean the output is set for the home page
     * @param int $i default null
     * @param boolean $showStaticVals default is false
     * @return void
     * @author Luzuk Premium <support@luzuk.com>
     * */
   function pricingShortcode() {
        ob_start();
        $cols = get_theme_mod('lz_fitness_pricing_npp_count', 2);
        $cols++;
        switch ($cols) {
            case 1:
            $colCls = 'col-md-12 col-sm-12';
            break;
            case 2:
            $colCls = 'col-md-6 col-sm-6';
            break;
            case 3:
            $colCls = 'col-md-4 col-sm-4';
            break;
            default:
            $colCls = 'col-md-3 col-sm-6';
            break;
        }
        echo '<div id="pricing-page">';
        $showStatic = true;
        for ($i = 1; $i <= $cols; $i++) {
            $PlanPageId = get_theme_mod('lz_fitness_pricing_plan_page_' . $i);
            $planTitle  = get_theme_mod('lz_fitness_pricing_plan_name_' . $i, 'Plan');
            $planPrice  = get_theme_mod('lz_fitness_pricing_plan_price_' . $i,'9.99');
            $planContent= get_theme_mod('lz_fitness_pricing_plan_content_' . $i, '<ul><li>Service in Plan</li><li>Service in Plan </li><li>Service in Plan </li><li>Service in Plan</li><li>Service in Plan</li><li>Service in Plan </li></ul>');

            $link = get_theme_mod('pricing_plan_url'.$i);
            $url = get_theme_mod('pricing_plan_url_'.$i, '#');

            if ($PlanPageId || $planTitle || $planPrice || $planContent || $url) {
                $showStatic = false;
                ?>
                <div class="<?php echo $colCls; ?>">
                    <div class="ht-plan-block text-center">
                        <div class="ht-princing-icon"><?php echo esc_attr($planTitle); ?></div>
                        <div class="plan-amount"><sub>$</sub><?php echo esc_html($planPrice); ?></div>
                        <div class="ht-princing-excerpt">
                            <?php echo nl2br($planContent); ?>
                        </div>
                        <div class="ht-princing-link">
                           <a href="<?php echo esc_url(!empty($url)?$url:'#');?>"><?php _e('Join Now', 'lz-fitness-premium'); ?></a>
                        </div>
                    </div>
                </div>
                <?php
            }
        }
        if ($showStatic === true) {
            for ($i = 1; $i <= $cols; $i++) {
                $link = get_theme_mod('pricing_plan_url'.$i);
                 $url = get_theme_mod('pricing_plan_url_'.$i, '#');

                ?>
                <div class="<?php echo $colCls; ?>">
                    <div class="ht-plan-block text-center">
                        <div class="ht-princing-icon">Plan</div>
                        <div class="plan-amount"><sub>$</sub>9.99</div>
                        <div class="ht-princing-excerpt">
                            <?php echo nl2br("<li>Service12 in Plan</li><li>Service in Plan </li><li>Service in Plan </li><li>Service in Plan</li><li>Service in Plan</li><li>Service in Plan </li></ul>"); ?>
                        </div>
                        <div class="ht-princing-link">
                            <a href="<?php echo esc_url(!empty($url)?$url:'#');?>"><?php _e('Join Now', 'lz-fitness-premium'); ?></a>
                        </div>
                    </div>
                </div>
                <?php
            }
            echo '<div class="clearfix"></div>';
            echo '</div>';
        }

        $pricingHtml = ob_get_contents();
        // echo $pricingHtml;
        ob_flush();
        ob_clean();
    }




  /**
 * Get list of all categories from woocommerce theme
 * @param int $isObject return type in array of object default is true
 * @param int $itemPerPagenumber of items per page default -1
 * @param int $isParents to show the only parents default '0'
 * @param int $orderby name of field ordeing with default 'name'
 * @param int $order assending of deseinging default 'ASC'
 * @param int $hideEmpty show the empty categories or not default 'false'
 * @return Array/Object 
 * @author Luzuk 
 * @since version 1.0
 **/
function getWooCategories($isObject = true, $id=0, $isproduct_categories = 0, $itemPerPagenumber = -1, $orderby='name', $order='ASC', $hideEmpty = false){
    $categories = array();
    // echo 'asdlkfjoasdoh';
    $args = array(
        'taxonomy' => 'product_cat',
        'orderby' => $orderby, // 'slug',
        'hide_empty' => $hideEmpty,
        'number'=> 0
    );

    if($isproduct_categories == 0 ){
        $args['product_category'] = $isproduct_categories;
    }

    if(!empty($id) && $id >0 ){
        $args['term_taxonomy_id'] = $id;
    }
    $product_categories = get_terms($args);
    // print_r($parent_terms);
    foreach ($product_categories as $product_category) {
        if($isObject === true){
            $categories[] = $product_category;
        }elseif(!empty($product_category->term_id)){
            $categories[$product_category->term_id] = $product_category->name;
            // echo '&*&*&';
        }
        
    }
    // print_r($categories);
    return $categories;
}      