Add Debug tab and section for debug tools

This commit is contained in:
Marcus Quinn
2025-03-15 05:23:52 +00:00
parent d85ba26d0f
commit fae6ecdbfc

View File

@ -514,6 +514,9 @@ function wp_allstars_settings_page() {
<a href="?page=wp-allstars&tab=theme" class="nav-tab <?php echo $active_tab == 'theme' ? 'nav-tab-active' : ''; ?>"> <a href="?page=wp-allstars&tab=theme" class="nav-tab <?php echo $active_tab == 'theme' ? 'nav-tab-active' : ''; ?>">
<?php esc_html_e('Theme', 'wp-allstars'); ?> <?php esc_html_e('Theme', 'wp-allstars'); ?>
</a> </a>
<a href="?page=wp-allstars&tab=debug" class="nav-tab <?php echo $active_tab == 'debug' ? 'nav-tab-active' : ''; ?>">
<?php esc_html_e('Debug', 'wp-allstars'); ?>
</a>
</h2> </h2>
</div> </div>
@ -927,7 +930,30 @@ function wp_allstars_settings_page() {
<?php esc_html_e('Minifies JavaScript files to reduce file size and improve load times.', 'wp-allstars'); ?> <?php esc_html_e('Minifies JavaScript files to reduce file size and improve load times.', 'wp-allstars'); ?>
</p> </p>
</div> </div>
<?php endif; ?> <?php elseif ($active_tab == 'debug'): ?>
<div class="wpa-plugin-filters">
<a href="?page=wp-allstars&tab=debug&category=debug"
class="button <?php echo $active_category == 'debug' ? 'button-primary' : ''; ?>">
<?php esc_html_e('Debug Tools', 'wp-allstars'); ?>
</a>
</div>
<div class="wp-list-table-container">
<div class="wpa-loading-overlay">
<span class="spinner is-active"></span>
</div>
<div id="wpa-plugin-list"></div>
</div>
<script>
jQuery(document).ready(function($) {
// Load debug plugins on page load
var currentCategory = 'debug';
loadPlugins(currentCategory);
});
</script>
<?php endif; ?>
</div> </div>
</div> </div>
</div> </div>