PluginProbe
Debug Log Viewer / 2.1
Debug Log Viewer v2.1
2.5 2.5.1 2.5.2 2.4 trunk 1.0.2 1.0.3 1.1 1.1.1 1.2 1.2.1 1.3 1.4 1.4.1 1.4.2 1.4.3 2.0.1 2.0.3 2.0.4 2.0.5 2.1 2.2.3
debug-log-viewer / front / views / components / log-table.tpl.php

log-table.tpl.php in Debug Log Viewer 2.1, at front/views/components/log-table.tpl.php

108 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) {
4 exit; // Exit if accessed directly
5 }
6
7 use DebugLogViewer\Admin\Controllers\LogController;
8
9 $dbg_lv_log_controller = new LogController();
10 $dbg_lv_path = $dbg_lv_log_controller->getLogFilePath();
11 $dbg_lv_current_tab = isset($_GET['tab']) ? sanitize_text_field(wp_unslash($_GET['tab'])) : 'log-view';
12 ?>
13
14 <div class="log-path-display ph-no-capture">
15 <div class="log-path-text">
16 <span>
17 <?php echo esc_html($dbg_lv_path); ?>
18 </span>
19 </div>
20
21 <div class="log-path-icons">
22 <!-- Popover triggers will be generated by JavaScript -->
23 </div>
24 </div>
25
26 <div class="table-wrapper">
27 <div class="right-subheader">
28 <div class="togglers-group mt-3 mb-4">
29 <!-- Debug Mode -->
30 <div class="log-info-block form-switch">
31 <input
32 id="dbg_lv_toggle_debug_mode"
33 type="checkbox"
34 <?php checked(WP_DEBUG, true); ?>
35 name="debug_mode"
36 class="form-check-input" />
37 <label class="form-check-label" for="dbg_lv_toggle_debug_mode"><?php esc_html_e('Debug mode', 'debug-log-viewer'); ?></label>
38 </div>
39
40 <!-- Debug Scripts -->
41 <div class="log-info-block form-switch">
42 <input
43 id="dbg_lv_toggle_debug_scripts"
44 type="checkbox"
45 <?php checked(SCRIPT_DEBUG, true); ?>
46 name="debug_scripts"
47 class="form-check-input" />
48 <label class="form-check-label" for="dbg_lv_toggle_debug_scripts"><?php esc_html_e('Debug scripts', 'debug-log-viewer'); ?></label>
49 </div>
50
51 <!-- Log in File -->
52 <div class="log-info-block form-switch">
53 <?php
54 $dbg_lv_is_custom_path = LogController::isCustomLoggingPath();
55 $dbg_lv_is_disabled = $dbg_lv_is_custom_path;
56 $dbg_lv_is_checked = $dbg_lv_is_custom_path || in_array(WP_DEBUG_LOG, [1, true, '1', 'true'], true) ? 'checked' : '';
57 ?>
58 <input
59 id="dbg_lv_toggle_log_in_file"
60 <?php disabled($dbg_lv_is_disabled); ?>
61 type="checkbox"
62 <?php echo esc_attr($dbg_lv_is_checked); ?>
63 name="log_in_file"
64 class="form-check-input" />
65 <label class="form-check-label" for="dbg_lv_toggle_log_in_file"><?php esc_html_e('Log in file', 'debug-log-viewer'); ?></label>
66 </div>
67
68 <!-- Display Errors -->
69 <div class="log-info-block form-switch">
70 <input
71 id="dbg_lv_toggle_display_errors"
72 type="checkbox"
73 <?php checked(WP_DEBUG_DISPLAY, true); ?>
74 name="display_errors"
75 class="form-check-input" />
76 <label class="form-check-label" for="dbg_lv_toggle_display_errors"><?php esc_html_e('Display errors', 'debug-log-viewer'); ?></label>
77 </div>
78 </div>
79 <div class="search-input-wrapper">
80 <i class="fa-solid fa-magnifying-glass search-icon"></i>
81 <input type="search" placeholder="<?php esc_attr_e('Search in log...', 'debug-log-viewer') ?>" class="text-input search-input">
82 </div>
83 </div>
84
85 <div id="dbg_lv_log-table_wrapper">
86 <div class="modal" tabindex="-1">
87 <div class="modal-dialog modal-lg modal-dialog-centered">
88 <div class="modal-content">
89 <div class="modal-body"></div>
90 </div>
91 </div>
92 </div>
93 <table id="dbg_lv_log-table" class="display striped" style="width:100%">
94 <thead>
95 <tr>
96 <th><?php esc_html_e('Timestamp', 'debug-log-viewer'); ?></th>
97 <th><?php esc_html_e('Type', 'debug-log-viewer'); ?></th>
98 <th><?php esc_html_e('Datetime', 'debug-log-viewer'); ?></th>
99 <th><?php esc_html_e('Description', 'debug-log-viewer'); ?></th>
100 <th><?php esc_html_e('File', 'debug-log-viewer'); ?></th>
101 <th><?php esc_html_e('Line', 'debug-log-viewer'); ?></th>
102 </tr>
103 </thead>
104 </table>
105
106 </div>
107 </div>
108