<?php
global $post;
?>

<?php do_action( 'dokan_dashboard_wrap_start' ); ?>

<div class="dokan-dashboard-wrap">

    <?php

    /**
     *  Adding dokan_dashboard_content_before hook
     *
     *  @hooked get_dashboard_side_navigation
     *
     *  @since 2.4
     */
    do_action( 'dokan_dashboard_content_before' );
    ?>

    <div class="dokan-dashboard-content dokan-product-listing">

        <?php

        /**
         *  Adding dokan_dashboard_content_before hook
         *
         *  @hooked get_dashboard_side_navigation
         *
         *  @since 2.4
         */
        do_action( 'dokan_dashboard_content_inside_before' );
        do_action( 'dokan_before_listing_product' );
        ?>

        <?php
        if(class_exists('PIXAD_Settings')) {
            if (class_exists('MemberOrder')) {
                if (isset($_GET['auto_id']) && $_GET['auto_id'] != '') {
                    if (is_string(get_post_status($_GET['auto_id']))) {
                        echo do_shortcode('[templines_add_item]');
                    } else {
                        echo pix_user_can_add_return_text(get_current_user_ID());
                        if (pix_user_can_add(get_current_user_ID())) {
                            echo do_shortcode('[templines_add_item]');
                        }
                    }
                } else {
                    echo pix_user_can_add_return_text(get_current_user_ID());
                    if (pix_user_can_add(get_current_user_ID())) {
                        echo do_shortcode('[templines_add_item]');
                    }
                }
            } else {
                echo do_shortcode('[templines_add_item]');
            }
        }


        ?>


        <?php

        /**
         *  Adding dokan_dashboard_content_before hook
         *
         *  @hooked get_dashboard_side_navigation
         *
         *  @since 2.4
         */
        do_action( 'dokan_dashboard_content_inside_after' );
        do_action( 'dokan_after_listing_product' );
        ?>

    </div><!-- #primary .content-area -->

    <?php

    /**
     *  Adding dokan_dashboard_content_after hook
     *
     *  @since 2.4
     */
    do_action( 'dokan_dashboard_content_after' );
    ?>

</div><!-- .dokan-dashboard-wrap -->

<?php do_action( 'dokan_dashboard_wrap_end' ); ?>
