| @@ -1,0 +1,60 @@ | ||
| 1 | +<?php | |
| 2 | +/* | |
| 3 | + * License: GPLv3 | |
| 4 | + * License URI: https://www.gnu.org/licenses/gpl.txt | |
| 5 | + * Copyright 2012-2026 Jean-Sebastien Morisset (https://wpsso.com/) | |
| 6 | + */ | |
| 7 | + | |
| 8 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 9 | + | |
| 10 | + die( 'These aren\'t the droids you\'re looking for.' ); | |
| 11 | +} | |
| 12 | + | |
| 13 | +if ( ! class_exists( 'WpssoSubmenuDebug' ) && class_exists( 'WpssoAdmin' ) ) { | |
| 14 | + | |
| 15 | + class WpssoSubmenuDebug extends WpssoAdmin { | |
| 16 | + | |
| 17 | + public function __construct( &$plugin, $id, $name, $lib, $ext ) { | |
| 18 | + | |
| 19 | + $this->p =& $plugin; | |
| 20 | + | |
| 21 | + if ( $this->p->debug->enabled ) { | |
| 22 | + | |
| 23 | + $this->p->debug->mark(); | |
| 24 | + } | |
| 25 | + | |
| 26 | + $this->menu_id = $id; | |
| 27 | + $this->menu_name = $name; | |
| 28 | + $this->menu_lib = $lib; | |
| 29 | + $this->menu_ext = $ext; | |
| 30 | + | |
| 31 | + $this->menu_metaboxes = array( | |
| 32 | + 'debug_guide' => _x( 'Troubleshooting Guide', 'metabox title', 'wpsso' ), | |
| 33 | + ); | |
| 34 | + } | |
| 35 | + | |
| 36 | + /* | |
| 37 | + * Remove all action buttons. | |
| 38 | + */ | |
| 39 | + protected function add_form_buttons( &$form_button_rows ) { | |
| 40 | + | |
| 41 | + $form_button_rows = array(); | |
| 42 | + } | |
| 43 | + | |
| 44 | + /* | |
| 45 | + * Callback method must be public for add_meta_box() hook. | |
| 46 | + * | |
| 47 | + * See WpssoAdmin->add_settings_page_metaboxes(). | |
| 48 | + */ | |
| 49 | + public function show_metabox_debug_guide( $obj, $mb ) { | |
| 50 | + | |
| 51 | + echo '<table class="sucom-settings wpsso html-content-metabox">'; | |
| 52 | + | |
| 53 | + echo '<tr><td>'; | |
| 54 | + | |
| 55 | + echo $this->get_ext_file_content( $ext = 'wpsso', $rel_file = 'html/debug.html' ); | |
| 56 | + | |
| 57 | + echo '</td></tr></table>'; | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |