html-admin-dashboard-setup.php
5 months ago
html-admin-page-addons-category-nav.php
4 years ago
html-admin-page-product-export.php
1 year ago
html-admin-page-reports.php
2 years ago
html-admin-page-status-logs-db.php
2 years ago
html-admin-page-status-logs.php
2 years ago
html-admin-page-status-report.php
1 month ago
html-admin-page-status-tools.php
2 years ago
html-admin-page-status.php
8 years ago
html-admin-settings.php
1 month ago
html-bulk-edit-product.php
1 year ago
html-email-template-preview.php
1 year ago
html-notice-base-table-missing.php
3 years ago
html-notice-custom.php
8 years ago
html-notice-download-dir-sync-complete.php
2 years ago
html-notice-install.php
5 years ago
html-notice-legacy-shipping.php
11 months ago
html-notice-maxmind-license-key.php
6 years ago
html-notice-no-shipping-methods.php
2 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
2 years ago
html-notice-sync-on-read-disabled.php
3 months ago
html-notice-template-check.php
2 years ago
html-notice-update.php
4 months ago
html-notice-updated.php
7 years ago
html-notice-updating.php
6 years ago
html-notice-uploads-directory-is-unprotected.php
2 years ago
html-notice-wp-php-minimum-requirements.php
2 years ago
html-quick-edit-product.php
1 year ago
html-report-by-date.php
5 years ago
html-admin-page-status-tools.php
59 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin View: Page - Status Tools |
| 4 | * |
| 5 | * @package WooCommerce |
| 6 | */ |
| 7 | |
| 8 | use Automattic\WooCommerce\Utilities\ArrayUtil; |
| 9 | |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | exit; |
| 12 | } |
| 13 | |
| 14 | foreach ( $tools as $action_name => $tool ) { |
| 15 | ?> |
| 16 | <form id="<?php echo esc_attr( 'form_' . $action_name ); ?>" method="GET" action="<?php echo esc_attr( esc_url( admin_url( 'admin.php?foo=bar' ) ) ); ?>"> |
| 17 | <?php wp_nonce_field( 'debug_action', '_wpnonce', false ); ?> |
| 18 | <input type="hidden" name="page" value="wc-status"/> |
| 19 | <input type="hidden" name="tab" value="tools"/> |
| 20 | <input type="hidden" name="action" value="<?php echo esc_attr( $action_name ); ?>"/> |
| 21 | </form> |
| 22 | <?php |
| 23 | } |
| 24 | ?> |
| 25 | |
| 26 | <table class="wc_status_table wc_status_table--tools widefat" cellspacing="0"> |
| 27 | <tbody class="tools"> |
| 28 | <?php foreach ( $tools as $action_name => $tool ) : ?> |
| 29 | <tr class="<?php echo sanitize_html_class( $action_name ); ?>"> |
| 30 | <th> |
| 31 | <strong class="name"><?php echo esc_html( $tool['name'] ); ?></strong> |
| 32 | <p class="description"> |
| 33 | <?php |
| 34 | echo wp_kses_post( $tool['desc'] ); |
| 35 | if ( ! is_null( ArrayUtil::get_value_or_default( $tool, 'selector' ) ) ) { |
| 36 | $selector = $tool['selector']; |
| 37 | if ( isset( $selector['description'] ) ) { |
| 38 | echo '</p><p class="description">'; |
| 39 | echo wp_kses_post( $selector['description'] ); |
| 40 | } |
| 41 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 42 | echo " <select style='width: 300px;' form='form_$action_name' id='selector_$action_name' data-allow_clear='true' class='{$selector['class']}' name='{$selector['name']}' data-placeholder='{$selector['placeholder']}' data-action='{$selector['search_action']}'></select>"; |
| 43 | } |
| 44 | ?> |
| 45 | </p> |
| 46 | </th> |
| 47 | <td class="run-tool"> |
| 48 | <?php if ( ! empty( $tool['status_text'] ) ) : ?> |
| 49 | <span class="run-tool-status"><?php echo wp_kses_post( $tool['status_text'] ); ?></span> |
| 50 | <?php endif; ?> |
| 51 | |
| 52 | <?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 53 | <input <?php echo ArrayUtil::is_truthy( $tool, 'disabled' ) ? 'disabled' : ''; ?> type="submit" form="<?php echo 'form_' . $action_name; ?>" class="button button-large" value="<?php echo esc_attr( $tool['button'] ); ?>" /> |
| 54 | </td> |
| 55 | </tr> |
| 56 | <?php endforeach; ?> |
| 57 | </tbody> |
| 58 | </table> |
| 59 |