/var/www/html/wp-content/plugins/woocommerce/includes/admin/views/html-admin-page-status.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
 * Admin View: Page - Status
 */

if ( ! defined'ABSPATH' ) ) {
    exit;
}

$current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title$_REQUEST['tab'] ) : 'status';
$tabs        = array(
    
'status' => __'System status''woocommerce' ),
    
'tools'  => __'Tools''woocommerce' ),
    
'logs'   => __'Logs''woocommerce' ),
);
$tabs        apply_filters'woocommerce_admin_status_tabs'$tabs );
?>
<div class="wrap woocommerce">
    <nav class="nav-tab-wrapper woo-nav-tab-wrapper">
        <?php
        
foreach ( $tabs as $name => $label ) {
            echo 
'<a href="' admin_url'admin.php?page=wc-status&tab=' $name ) . '" class="nav-tab ';
            if ( 
$current_tab == $name ) {
                echo 
'nav-tab-active';
            }
            echo 
'">' $label '</a>';
        }
        
?>
    </nav>
    <h1 class="screen-reader-text"><?php echo esc_html$tabs$current_tab ] ); ?></h1>
    <?php
    
switch ( $current_tab ) {
        case 
'tools':
            
WC_Admin_Status::status_tools();
            break;
        case 
'logs':
            
WC_Admin_Status::status_logs();
            break;
        default:
            if ( 
array_key_exists$current_tab$tabs ) && has_action'woocommerce_admin_status_content_' $current_tab ) ) {
                
do_action'woocommerce_admin_status_content_' $current_tab );
            } else {
                
WC_Admin_Status::status_report();
            }
            break;
    }
    
?>
</div>