Changeset 3461944
- Timestamp:
- 02/15/2026 04:49:28 PM (6 weeks ago)
- Location:
- lumiblog-debug-log-inspector
- Files:
-
- 23 added
- 5 edited
-
assets/banner-1544x500.png (added)
-
assets/banner-772x250.png (added)
-
assets/screenshot-1.png (added)
-
assets/screenshot-2.png (added)
-
assets/screenshot-3.png (added)
-
assets/screenshot-4.png (added)
-
assets/screenshot-5.png (added)
-
assets/screenshot-6.png (added)
-
tags/1.1.0 (added)
-
tags/1.1.0/assets (added)
-
tags/1.1.0/assets/css (added)
-
tags/1.1.0/assets/css/admin-bar.css (added)
-
tags/1.1.0/assets/css/admin-style.css (added)
-
tags/1.1.0/assets/js (added)
-
tags/1.1.0/assets/js/admin-script.js (added)
-
tags/1.1.0/includes (added)
-
tags/1.1.0/includes/class-admin-bar.php (added)
-
tags/1.1.0/includes/class-log-inspector.php (added)
-
tags/1.1.0/includes/class-settings.php (added)
-
tags/1.1.0/lumiblog-debug-log-inspector.php (added)
-
tags/1.1.0/readme.txt (added)
-
tags/1.1.0/templates (added)
-
tags/1.1.0/templates/settings-page.php (added)
-
trunk/includes/class-admin-bar.php (modified) (2 diffs)
-
trunk/includes/class-settings.php (modified) (2 diffs)
-
trunk/lumiblog-debug-log-inspector.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/templates/settings-page.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lumiblog-debug-log-inspector/trunk/includes/class-admin-bar.php
r3448600 r3461944 65 65 'id' => $menu_id, 66 66 'title' => __( 'LOG INSPECTOR', 'lumiblog-debug-log-inspector' ), 67 'href' => admin_url( 'options-general.php?page= debug-log-inspector' ),67 'href' => admin_url( 'options-general.php?page=lumiblog-debug-log-inspector' ), 68 68 'meta' => array( 'class' => $css_class ), 69 69 ) ); … … 112 112 'title' => __( '⚙️ Settings', 'lumiblog-debug-log-inspector' ), 113 113 'id' => 'dli-settings-link', 114 'href' => admin_url( 'options-general.php?page= debug-log-inspector' ),114 'href' => admin_url( 'options-general.php?page=lumiblog-debug-log-inspector' ), 115 115 'meta' => array( 'class' => 'dli-admin-settings-link' ), 116 116 ) ); -
lumiblog-debug-log-inspector/trunk/includes/class-settings.php
r3448600 r3461944 21 21 add_action( 'admin_init', array( $this, 'handle_form_submission' ) ); 22 22 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) ); 23 add_action( 'current_screen', array( $this, 'register_footer_hooks' ) ); 24 } 25 26 /** 27 * Register admin footer hooks only on the plugin's settings page 28 */ 29 public function register_footer_hooks() { 30 $screen = get_current_screen(); 31 if ( ! $screen || 'settings_page_lumiblog-debug-log-inspector' !== $screen->id ) { 32 return; 33 } 34 add_filter( 'admin_footer_text', array( $this, 'custom_footer_text' ) ); 35 add_filter( 'update_footer', array( $this, 'custom_footer_version' ), 11 ); 36 } 37 38 /** 39 * Custom footer left text — rating prompt 40 * 41 * @return string 42 */ 43 public function custom_footer_text() { 44 return sprintf( 45 /* translators: %s: WordPress.org review URL */ 46 __( 'If you like <strong>Lumiblog Debug Log Inspector</strong>, please leave us a <a href="%s" target="_blank" rel="noopener noreferrer">★★★★★</a> rating. Thank you so much in advance!', 'lumiblog-debug-log-inspector' ), 47 'https://wordpress.org/support/plugin/lumiblog-debug-log-inspector/reviews/#new-post' 48 ); 49 } 50 51 /** 52 * Custom footer right text — plugin version 53 * 54 * @return string 55 */ 56 public function custom_footer_version() { 57 return sprintf( 58 /* translators: %s: plugin version number */ 59 __( 'Version %s', 'lumiblog-debug-log-inspector' ), 60 DEBUG_LOG_INSPECTOR_VERSION 61 ); 23 62 } 24 63 … … 186 225 update_option( 'debug_log_inspector_plugins', $plugins ); 187 226 $this->add_admin_notice( 'success', __( 'Plugin updated successfully!', 'lumiblog-debug-log-inspector' ) ); 227 wp_safe_redirect( admin_url( 'options-general.php?page=lumiblog-debug-log-inspector' ) ); 228 exit; 188 229 } 189 230 } -
lumiblog-debug-log-inspector/trunk/lumiblog-debug-log-inspector.php
r3448600 r3461944 4 4 * Plugin URI: https://wordpress.org/plugins/lumiblog-debug-log-inspector/ 5 5 * Description: Monitor debug logs for any WordPress plugin errors and display real-time status in the admin bar 6 * Version: 1. 0.06 * Version: 1.1.0 7 7 * Requires at least: 5.0 8 8 * Requires PHP: 7.0 9 9 * Author: Patrick Lumumba 10 * Author URI: https://lumumbas .blog10 * Author URI: https://lumumbas-blog.co.ke 11 11 * License: GPL v2 or later 12 12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 20 20 21 21 // Define plugin constants 22 define( 'DEBUG_LOG_INSPECTOR_VERSION', ' 2.0.0' );22 define( 'DEBUG_LOG_INSPECTOR_VERSION', '1.1.0' ); 23 23 define( 'DEBUG_LOG_INSPECTOR_PATH', plugin_dir_path( __FILE__ ) ); 24 24 define( 'DEBUG_LOG_INSPECTOR_URL', plugin_dir_url( __FILE__ ) ); -
lumiblog-debug-log-inspector/trunk/readme.txt
r3448600 r3461944 1 1 === Lumiblog Debug Log Inspector === 2 2 Contributors: lumiblog 3 Donate link: https://lumumbas .blog/support-wp-plugins3 Donate link: https://lumumbas-blog.co.ke/support-wp-plugins 4 4 Tags: debug, log, monitor, testing, error tracking 5 5 Requires at least: 5.0 6 6 Tested up to: 6.9 7 Stable tag: 1. 0.07 Stable tag: 1.1.0 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 163 163 **Step 3: Generate a Test Error** 164 164 165 Option A - Using a Test Plugin File: 166 167 1. Create a simple test plugin in `wp-content/plugins/test-error/test-error.php`: 168 169 ` 170 <?php 165 Note: Ensure that the test site is running on PHP 8.4+ 166 167 1. Add this code snippet inside of any active plugin's main file: 168 169 ` 171 170 /** 172 * Plugin Name: Test Error Generator 171 * DEBUG LOG INSPECTOR DEMO - PHP 8.4 Warning Trigger 172 * REMOVE AFTER DEMO/TESTING! 173 173 */ 174 if ( isset( $_GET['trigger_test_error'] ) ) { 175 trigger_error( 'This is a test error from WooCommerce integration', E_USER_WARNING ); 176 } 177 ` 178 179 2. Activate the test plugin 180 3. Visit: `yoursite.com/wp-admin/?trigger_test_error=1` 181 4. Check your admin bar - it should turn RED 182 183 Option B - Trigger a Real Error: 184 185 1. Temporarily add this line to any active plugin's main file: 186 `trigger_error( 'woocommerce test error for debugging', E_USER_WARNING );` 187 188 2. Reload any page in your WordPress admin 189 3. Remove the line immediately after testing 190 191 **Step 4: Check the Results** 192 193 1. Look at the admin bar - "LOG INSPECTOR" should now be RED 194 2. Click on "LOG INSPECTOR" to see: 195 - WooCommerce: ERROR! 196 - Last Error: [Your test error message] 197 3. Go to Settings > Log Inspector to manage monitored plugins 198 199 **Step 5: View the Debug Log (Optional)** 174 add_action( 'load-index.php', function() { 175 if ( version_compare( PHP_VERSION, '8.4.0', '>=' ) ) { 176 $test_array = array( 'name' => 'Debug Log Inspector' ); 177 $undefined_value = $test_array['email']; // Triggers warning 178 error_log( '[DLI-DEMO-PHP84] PHP 8.4 warning triggered!' ); 179 } 180 }); 181 ` 182 183 2. Reload the site's admin dashboard to trigger the error 184 3. Check your admin bar - it should turn RED 185 186 **Step 4: View the Debug Log (Optional)** 200 187 201 188 Navigate to `wp-content/debug.log` to see the actual error entries that were logged. … … 229 216 = Contributing = 230 217 231 Contributions are welcome! Please visit the plugin's WordPress.org pagefor more information.218 Contributions are welcome! Please visit the plugin's [Github Repo](https://github.com/lumumbapl/lumiblog-debug-log-inspector) for more information. 232 219 233 220 == Screenshots == 234 221 235 222 1. Settings page - Add new plugins to monitor 236 2. Monitored plugins list with enable/disable toggles237 3. Admin bar showing green status (no errors)223 2. Admin bar showing green status (no errors) 224 3. Monitored plugins list with enable/disable toggles 238 225 4. Admin bar showing red status with error details 239 226 5. General settings configuration 240 6. Add plugin form with field descriptions 241 7. Edit plugin interface 227 6. Edit plugin interface 242 228 243 229 == Changelog == 230 231 = 1.1.0 [February 15, 2026] = 232 * Fixed: Minor issues across the plugin [[Issue #1]](https://github.com/lumumbapl/lumiblog-debug-log-inspector/issues/1) 233 * Enhanced: Compatibility with PHP 8.5 [[Issue #2]](https://github.com/lumumbapl/lumiblog-debug-log-inspector/issues/2) 234 * Fixed: Inactive plugins incorrectly shown as enabled when "Only monitor active plugins" is turned on [[Issue #3]](https://github.com/lumumbapl/lumiblog-debug-log-inspector/issues/3) 235 * Fixed: Edit button for monitored plugins not working due to incorrect page slug [[Issue #4]](https://github.com/lumumbapl/lumiblog-debug-log-inspector/issues/4) 236 * Fixed: Edit form not reset to "Add New Plugin" after a successful update [[Issue #5]](https://github.com/lumumbapl/lumiblog-debug-log-inspector/issues/5) 237 * Fixed: Cancel button on the Edit Plugin page not working due to incorrect page slug [[Issue #6]](https://github.com/lumumbapl/lumiblog-debug-log-inspector/issues/6) 244 238 245 239 = 1.0.0 = … … 248 242 == Upgrade Notice == 249 243 250 = 2.0.0 = 251 Minor fixes 252 253 244 = 1.1.0 = 245 This update fixes several bugs including inactive plugins showing as enabled, broken Edit and Cancel buttons on the settings page, and improves compatibility with PHP 8.5. -
lumiblog-debug-log-inspector/trunk/templates/settings-page.php
r3448600 r3461944 76 76 </button> 77 77 <?php if ( $edit_plugin ) : ?> 78 <a href="<?php echo esc_url( admin_url( 'options-general.php?page= debug-log-inspector' ) ); ?>" class="button">78 <a href="<?php echo esc_url( admin_url( 'options-general.php?page=lumiblog-debug-log-inspector' ) ); ?>" class="button"> 79 79 <?php esc_html_e( 'Cancel', 'lumiblog-debug-log-inspector' ); ?> 80 80 </a> … … 107 107 foreach ( $plugins as $dli_plugin_index => $plugin ) : 108 108 $dli_plugin_is_enabled = isset( $plugin['enabled'] ) ? $plugin['enabled'] : true; 109 $dli_plugin_is_active = ! empty( $plugin['file_path'] ) ? Debug_Log_Inspector::is_plugin_active( $plugin['file_path'] ) : false; 109 $dli_plugin_is_active = ! empty( $plugin['file_path'] ) ? Debug_Log_Inspector::is_plugin_active( $plugin['file_path'] ) : false; 110 111 // When "Only monitor active plugins" is on and the WP plugin is inactive, 112 // monitoring is effectively disabled regardless of the plugin's own enabled flag. 113 $dli_auto_enable_overrides = $settings['auto_enable'] && ! empty( $plugin['file_path'] ) && ! $dli_plugin_is_active; 114 $dli_effectively_enabled = $dli_plugin_is_enabled && ! $dli_auto_enable_overrides; 110 115 ?> 111 <tr class="<?php echo $dli_ plugin_is_enabled ? '' : 'dli-disabled-row'; ?>">116 <tr class="<?php echo $dli_effectively_enabled ? '' : 'dli-disabled-row'; ?>"> 112 117 <td> 113 118 <form method="post" action="" style="display: inline;"> … … 115 120 <input type="hidden" name="debug_log_inspector_action" value="toggle_plugin"> 116 121 <input type="hidden" name="plugin_index" value="<?php echo esc_attr( $dli_plugin_index ); ?>"> 117 <button type="submit" class="button-link dli-toggle-btn" title="<?php echo $dli_plugin_is_enabled ? esc_attr__( 'Disable', 'lumiblog-debug-log-inspector' ) : esc_attr__( 'Enable', 'lumiblog-debug-log-inspector' ); ?>"> 118 <span class="dashicons dashicons-<?php echo $dli_plugin_is_enabled ? 'yes-alt' : 'dismiss'; ?>" style="color: <?php echo $dli_plugin_is_enabled ? '#46b450' : '#dc3232'; ?>;"></span> 122 <button type="submit" class="button-link dli-toggle-btn" 123 <?php if ( $dli_auto_enable_overrides ) : ?> 124 disabled 125 title="<?php esc_attr_e( 'Inactive – enable the plugin in WordPress or turn off "Only monitor active plugins"', 'lumiblog-debug-log-inspector' ); ?>" 126 <?php else : ?> 127 title="<?php echo $dli_plugin_is_enabled ? esc_attr__( 'Disable', 'lumiblog-debug-log-inspector' ) : esc_attr__( 'Enable', 'lumiblog-debug-log-inspector' ); ?>" 128 <?php endif; ?> 129 > 130 <span class="dashicons dashicons-<?php echo $dli_effectively_enabled ? 'yes-alt' : 'dismiss'; ?>" style="color: <?php echo $dli_effectively_enabled ? '#46b450' : '#dc3232'; ?>;"></span> 119 131 </button> 120 132 </form> … … 131 143 </td> 132 144 <td> 133 <a href="<?php echo esc_url( admin_url( 'options-general.php?page= debug-log-inspector&edit=' . $dli_plugin_index ) ); ?>" class="button button-small">145 <a href="<?php echo esc_url( admin_url( 'options-general.php?page=lumiblog-debug-log-inspector&edit=' . $dli_plugin_index ) ); ?>" class="button button-small"> 134 146 <?php esc_html_e( 'Edit', 'lumiblog-debug-log-inspector' ); ?> 135 147 </a>
Note: See TracChangeset
for help on using the changeset viewer.