<?php
require_once get_template_directory() . '/netbase-core/helper/template-tags.php';
function add_wrap_container_before(){
    global $post_id;
    $return = '';
    if ( $post_id ) {
        $return = '
            <div class="container">
                <div class="row">
                    <div id="primary" class="content-area page-full-width">
                        <main id="main" class="site-main left-sidebar" role="main">
                            <article class="page type-page status-publish hentry">
                                <div class="entry-content">
            ';
    }
   print $return;
}

function add_wrap_container_after(){
    print '
                                </div>
                            </article>
                        </main>
                    </div>
                </div>
            </div>
        ';
}

add_action('dokan_dashboard_wrap_before', 'add_wrap_container_before');
add_action('dokan_dashboard_wrap_after', 'add_wrap_container_after');

function edit_common_links_dashboard_menu() {

    $common_links = '
        <li class="dokan-common-links dokan-clearfix">
            <a title="' . __( 'Visit Store', 'estana' ) . '" class="tips" data-placement="top" href="' . dokan_get_store_url( get_current_user_id()) .'" target="_blank">
                <i class="fa fa-external-link"></i>
                ' . __( 'Visit Store', 'estana' ) . '
            </a>
        </li>
        <li class="dokan-common-links dokan-clearfix">
            <a title="' . __( 'Edit Account', 'estana' ) . '" class="tips" data-placement="top" href="' . dokan_get_navigation_url( 'edit-account' ) . '">
                <i class="fa fa-user"></i>
                ' . __( 'Edit Account', 'estana' ) . '
            </a>
        </li>
        <li class="dokan-common-links dokan-clearfix">
            <a title="' . __( 'Log out', 'estana' ) . '" class="tips" data-placement="top" href="' . wp_logout_url( home_url() ) . '">
                <i class="fa fa-power-off"></i>
                ' . __( 'Log out', 'estana' ) . '
            </a>
        </li>';

    return $common_links;
}
if(estana_get_options('nbcore_dashboard_style')) {
    add_filter( 'dokan_dashboard_nav_common_link', 'edit_common_links_dashboard_menu' );
}