2014-07-28 14:50:11 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Admin View: Page - Status Tools
|
2021-04-28 07:36:10 +00:00
|
|
|
*
|
|
|
|
* @package WooCommerce
|
2014-07-28 14:50:11 +00:00
|
|
|
*/
|
|
|
|
|
2021-04-28 07:47:31 +00:00
|
|
|
use Automattic\WooCommerce\Utilities\ArrayUtil;
|
|
|
|
|
2014-07-28 15:16:35 +00:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
2015-03-07 03:16:08 +00:00
|
|
|
exit;
|
2014-07-28 15:16:35 +00:00
|
|
|
}
|
2014-07-28 14:50:11 +00:00
|
|
|
|
|
|
|
?>
|
2013-10-23 15:52:58 +00:00
|
|
|
<form method="post" action="options.php">
|
|
|
|
<?php settings_fields( 'woocommerce_status_settings_fields' ); ?>
|
2017-08-30 14:39:54 +00:00
|
|
|
<table class="wc_status_table wc_status_table--tools widefat" cellspacing="0">
|
2013-10-23 15:52:58 +00:00
|
|
|
<tbody class="tools">
|
2021-04-28 07:36:10 +00:00
|
|
|
<?php foreach ( $tools as $action_name => $tool ) : ?>
|
|
|
|
<tr class="<?php echo sanitize_html_class( $action_name ); ?>">
|
2017-08-15 11:05:34 +00:00
|
|
|
<th>
|
|
|
|
<strong class="name"><?php echo esc_html( $tool['name'] ); ?></strong>
|
|
|
|
<p class="description"><?php echo wp_kses_post( $tool['desc'] ); ?></p>
|
|
|
|
</th>
|
|
|
|
<td class="run-tool">
|
2021-04-28 07:47:31 +00:00
|
|
|
<a <?php echo ArrayUtil::is_truthy( $tool, 'disabled' ) ? 'disabled' : ''; ?> href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin.php?page=wc-status&tab=tools&action=' . $action_name ), 'debug_action' ) ); ?>" class="button button-large <?php echo esc_attr( $action_name ); ?>"><?php echo esc_html( $tool['button'] ); ?></a>
|
2013-10-23 16:21:03 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2014-06-04 17:25:49 +00:00
|
|
|
<?php endforeach; ?>
|
2013-10-23 15:52:58 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2014-06-04 17:25:49 +00:00
|
|
|
</form>
|