html-admin-dashboard-setup.php
4 years ago
html-admin-page-addons-category-nav.php
4 years ago
html-admin-page-addons.php
3 years ago
html-admin-page-product-export.php
5 years ago
html-admin-page-reports.php
5 years ago
html-admin-page-status-logs-db.php
5 years ago
html-admin-page-status-logs.php
4 years ago
html-admin-page-status-report.php
3 years ago
html-admin-page-status-tools.php
3 years ago
html-admin-page-status.php
8 years ago
html-admin-settings.php
5 years ago
html-bulk-edit-product.php
3 years ago
html-email-template-preview.php
7 years ago
html-notice-base-table-missing.php
5 years ago
html-notice-custom.php
8 years ago
html-notice-download-dir-sync-complete.php
4 years ago
html-notice-install.php
5 years ago
html-notice-legacy-shipping.php
7 years ago
html-notice-maxmind-license-key.php
6 years ago
html-notice-no-shipping-methods.php
7 years ago
html-notice-redirect-only-download.php
4 years ago
html-notice-regenerating-lookup-table.php
5 years ago
html-notice-regenerating-thumbnails.php
8 years ago
html-notice-secure-connection.php
8 years ago
html-notice-template-check.php
5 years ago
html-notice-update.php
7 years ago
html-notice-updated.php
7 years ago
html-notice-updating.php
6 years ago
html-notice-uploads-directory-is-unprotected.php
3 years ago
html-notice-wp-php-minimum-requirements.php
6 years ago
html-quick-edit-product.php
5 years ago
html-report-by-date.php
5 years ago
html-admin-page-reports.php
86 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin View: Page - Reports |
| 4 | */ |
| 5 | |
| 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 7 | exit; |
| 8 | } |
| 9 | |
| 10 | ?> |
| 11 | <div class="wrap woocommerce"> |
| 12 | <?php if ( WC()->is_wc_admin_active() ) { ?> |
| 13 | <div id="message" class="error inline" style="margin-top:30px"> |
| 14 | <p> |
| 15 | <strong> |
| 16 | <?php |
| 17 | /* translators: 1: Link URL */ |
| 18 | echo wp_kses_post( sprintf( __( 'With the release of WooCommerce 4.0, these reports are being replaced. There is a new and better Analytics section available for users running WordPress 5.3+. Head on over to the <a href="%1$s">WooCommerce Analytics</a> or learn more about the new experience in the <a href="https://docs.woocommerce.com/document/woocommerce-analytics/" target="_blank">WooCommerce Analytics documentation</a>.', 'woocommerce' ), esc_url( wc_admin_url( '&path=/analytics/overview' ) ) ) ); |
| 19 | ?> |
| 20 | </strong> |
| 21 | </p> |
| 22 | </div> |
| 23 | <?php } ?> |
| 24 | <nav class="nav-tab-wrapper woo-nav-tab-wrapper"> |
| 25 | <?php |
| 26 | foreach ( $reports as $key => $report_group ) { |
| 27 | echo '<a href="' . admin_url( 'admin.php?page=wc-reports&tab=' . urlencode( $key ) ) . '" class="nav-tab '; |
| 28 | if ( $current_tab == $key ) { |
| 29 | echo 'nav-tab-active'; |
| 30 | } |
| 31 | echo '">' . esc_html( $report_group['title'] ) . '</a>'; |
| 32 | } |
| 33 | |
| 34 | do_action( 'wc_reports_tabs' ); |
| 35 | ?> |
| 36 | </nav> |
| 37 | <?php |
| 38 | if ( count( $reports[ $current_tab ]['reports'] ) > 1 ) { |
| 39 | ?> |
| 40 | <ul class="subsubsub"> |
| 41 | <li> |
| 42 | <?php |
| 43 | |
| 44 | $links = array(); |
| 45 | |
| 46 | foreach ( $reports[ $current_tab ]['reports'] as $key => $report ) { |
| 47 | $link = '<a href="admin.php?page=wc-reports&tab=' . urlencode( $current_tab ) . '&report=' . urlencode( $key ) . '" class="'; |
| 48 | |
| 49 | if ( $key == $current_report ) { |
| 50 | $link .= 'current'; |
| 51 | } |
| 52 | |
| 53 | $link .= '">' . $report['title'] . '</a>'; |
| 54 | |
| 55 | $links[] = $link; |
| 56 | } |
| 57 | |
| 58 | echo implode( ' | </li><li>', $links ); |
| 59 | |
| 60 | ?> |
| 61 | </li> |
| 62 | </ul> |
| 63 | <br class="clear" /> |
| 64 | <?php |
| 65 | } |
| 66 | |
| 67 | if ( isset( $reports[ $current_tab ]['reports'][ $current_report ] ) ) { |
| 68 | $report = $reports[ $current_tab ]['reports'][ $current_report ]; |
| 69 | |
| 70 | if ( ! isset( $report['hide_title'] ) || true != $report['hide_title'] ) { |
| 71 | echo '<h1>' . esc_html( $report['title'] ) . '</h1>'; |
| 72 | } else { |
| 73 | echo '<h1 class="screen-reader-text">' . esc_html( $report['title'] ) . '</h1>'; |
| 74 | } |
| 75 | |
| 76 | if ( $report['description'] ) { |
| 77 | echo '<p>' . $report['description'] . '</p>'; |
| 78 | } |
| 79 | |
| 80 | if ( $report['callback'] && ( is_callable( $report['callback'] ) ) ) { |
| 81 | call_user_func( $report['callback'], $current_report ); |
| 82 | } |
| 83 | } |
| 84 | ?> |
| 85 | </div> |
| 86 |