Add filtering for system status page tabs and actions too

This commit is contained in:
Allen Snook 2016-05-06 11:27:56 -07:00
parent 15402c2c3d
commit 58a04a1922
1 changed files with 7 additions and 3 deletions

View File

@ -13,7 +13,7 @@ $tabs = array(
'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">
@ -25,7 +25,7 @@ $tabs = array(
}
?>
</nav>
<h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1>
<h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1>
<?php
switch ( $current_tab ) {
case "tools" :
@ -35,7 +35,11 @@ $tabs = array(
WC_Admin_Status::status_logs();
break;
default :
WC_Admin_Status::status_report();
if ( has_action( 'woocommerce_admin_status_' . $current_tab ) ) {
do_action( 'woocommerce_admin_status_' . $current_tab );
} else {
WC_Admin_Status::status_report();
}
break;
}
?>