manipulations.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Category Manipulations page view (shell)
  4. *
  5. * Renders only the tab bar and an empty content container. Each tab's
  6. * markup and its (potentially expensive) data is fetched on demand via the
  7. * studiou_wcpcm_load_tab AJAX handler. This keeps the page-load request
  8. * lightweight and avoids PHP timeouts on large stores.
  9. *
  10. * @since 1.0.0
  11. * @package Studiou_WC_Product_Cat_Manage
  12. */
  13. // If this file is called directly, abort.
  14. if (!defined('WPINC')) {
  15. die;
  16. }
  17. $tabs = array(
  18. 'move' => __('Move products between categories', 'studiou-wc-product-cat-manage'),
  19. 'batch-description' => __('Batch description between categories', 'studiou-wc-product-cat-manage'),
  20. 'delete-products' => __('Delete products in category', 'studiou-wc-product-cat-manage'),
  21. 'clear-media' => __('Clear Media Categories', 'studiou-wc-product-cat-manage'),
  22. 'remove-unassigned' => __('Remove Not Assigned Media', 'studiou-wc-product-cat-manage'),
  23. 'upvp' => __('Update product variant prices', 'studiou-wc-product-cat-manage'),
  24. 'notes' => __('Important Notes', 'studiou-wc-product-cat-manage'),
  25. );
  26. ?>
  27. <div class="wrap studiou-wcpcm-wrap">
  28. <h1><?php echo esc_html__('Category Manipulations', 'studiou-wc-product-cat-manage'); ?></h1>
  29. <div class="studiou-wcpcm-notice-area">
  30. <!-- Area for displaying notices -->
  31. </div>
  32. <h2 class="nav-tab-wrapper studiou-wcpcm-tabs">
  33. <?php foreach ($tabs as $slug => $label): ?>
  34. <a href="#<?php echo esc_attr($slug); ?>"
  35. class="nav-tab"
  36. data-tab="<?php echo esc_attr($slug); ?>">
  37. <?php echo esc_html($label); ?>
  38. </a>
  39. <?php endforeach; ?>
  40. </h2>
  41. <div id="studiou-wcpcm-tab-content" class="studiou-wcpcm-tab-content">
  42. <div class="studiou-wcpcm-tab-loading">
  43. <?php echo esc_html__('Loading...', 'studiou-wc-product-cat-manage'); ?>
  44. </div>
  45. </div>
  46. </div>