Ejemplo n.º 1
0
 /**
  * Counting spam, pending, trash and save it private variable
  *
  * @global object $wpdb
  * @global object $current_user
  * @param string $post_type
  */
 function get_count($post_type)
 {
     global $wpdb, $current_user;
     $counts = dokan_count_comments($post_type, $current_user->ID);
     $this->pending = $counts->moderated;
     $this->spam = $counts->spam;
     $this->trash = $counts->trash;
 }
Ejemplo n.º 2
0
<?php

$user_id = get_current_user_id();
$orders_counts = dokan_count_orders($user_id);
$post_counts = dokan_count_posts('product', $user_id);
$comment_counts = dokan_count_comments('product', $user_id);
$pageviews = (int) dokan_author_pageviews($user_id);
$earning = dokan_author_total_sales($user_id);
$products_url = dokan_get_navigation_url('products');
$orders_url = dokan_get_navigation_url('orders');
$reviews_url = dokan_get_navigation_url('reviews');
?>

<div class="dokan-dashboard-wrap">
    <?php 
dokan_get_template('dashboard-nav.php', array('active_menu' => 'dashboard'));
?>

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

        <?php 
if (!dokan_is_seller_enabled($user_id)) {
    dokan_seller_not_enabled_notice();
}
?>

        <article class="dashboard-content-area">
            <?php 
echo dokan_get_profile_progressbar();
?>
            <div class="dokan-w6 dokan-dash-left">
Ejemplo n.º 3
0
 /**
  * Reviews View
  *
  * Reviews Comments this shortcode activation function
  *
  * @since 2.4
  *
  * @return void
  */
 function reviews_view()
 {
     global $wpdb, $current_user;
     if (is_user_logged_in()) {
         // initialize
         $this->post_type = 'product';
         $post_type = 'product';
         $counts = dokan_count_comments($post_type, $current_user->ID);
         $this->pending = $counts->moderated;
         $this->spam = $counts->spam;
         $this->trash = $counts->trash;
         dokan_get_template_part('review/content', '', array('pro' => true, 'post_type' => $post_type, 'counts' => $counts));
     }
 }
Ejemplo n.º 4
0
 /**
  * Get Comments Count
  *
  * @since 2.4
  *
  * @return integer
  */
 public function get_comment_counts()
 {
     return dokan_count_comments('product', $this->user_id);
 }