2014-07-28 14:50:11 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2015-11-03 13:53:50 +00:00
|
|
|
* Admin View: Page - Status
|
2014-07-28 14:50:11 +00:00
|
|
|
*/
|
|
|
|
|
2014-07-28 15:16:35 +00:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
2015-01-20 10:41:26 +00:00
|
|
|
exit;
|
2014-07-28 15:16:35 +00:00
|
|
|
}
|
2014-07-28 14:50:11 +00:00
|
|
|
|
2015-01-20 10:41:26 +00:00
|
|
|
$current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( $_REQUEST['tab'] ) : 'status';
|
2016-02-17 18:23:50 +00:00
|
|
|
$tabs = array(
|
2016-10-12 10:16:30 +00:00
|
|
|
'status' => __( 'System status', 'woocommerce' ),
|
2016-02-17 18:23:50 +00:00
|
|
|
'tools' => __( 'Tools', 'woocommerce' ),
|
|
|
|
'logs' => __( 'Logs', 'woocommerce' ),
|
|
|
|
);
|
2016-05-06 18:27:56 +00:00
|
|
|
$tabs = apply_filters( 'woocommerce_admin_status_tabs', $tabs );
|
2014-07-28 14:50:11 +00:00
|
|
|
?>
|
2013-07-18 14:22:05 +00:00
|
|
|
<div class="wrap woocommerce">
|
2016-04-01 09:53:30 +00:00
|
|
|
<nav class="nav-tab-wrapper woo-nav-tab-wrapper">
|
2013-07-18 14:22:05 +00:00
|
|
|
<?php
|
2018-03-05 18:59:17 +00:00
|
|
|
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';
|
2013-07-18 14:22:05 +00:00
|
|
|
}
|
2018-03-05 18:59:17 +00:00
|
|
|
echo '">' . $label . '</a>';
|
|
|
|
}
|
2013-07-18 14:22:05 +00:00
|
|
|
?>
|
2016-04-01 09:53:30 +00:00
|
|
|
</nav>
|
2016-05-06 18:27:56 +00:00
|
|
|
<h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1>
|
2013-07-18 14:22:05 +00:00
|
|
|
<?php
|
2018-03-05 18:59:17 +00:00
|
|
|
switch ( $current_tab ) {
|
|
|
|
case 'tools':
|
|
|
|
WC_Admin_Status::status_tools();
|
2013-07-18 14:22:05 +00:00
|
|
|
break;
|
2018-03-05 18:59:17 +00:00
|
|
|
case 'logs':
|
|
|
|
WC_Admin_Status::status_logs();
|
2014-05-28 10:12:35 +00:00
|
|
|
break;
|
2018-03-05 18:59:17 +00:00
|
|
|
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();
|
|
|
|
}
|
2013-07-18 14:22:05 +00:00
|
|
|
break;
|
2018-03-05 18:59:17 +00:00
|
|
|
}
|
2013-07-18 14:22:05 +00:00
|
|
|
?>
|
2015-11-03 13:31:20 +00:00
|
|
|
</div>
|