Plugin Directory

Changeset 3341697


Ignore:
Timestamp:
08/08/2025 02:13:30 PM (8 months ago)
Author:
twkmedia
Message:

Changed: The log content is now displayed in reverse order, with the newest entries first.

Location:
debug-log-admin-viewer
Files:
22 added
5 edited

Legend:

Unmodified
Added
Removed
  • debug-log-admin-viewer/trunk/CHANGELOG.md

    r3262970 r3341697  
    44The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
    55and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
     6
     7## [1.0.2] - 2025-08-08
     8### Changed
     9- The log content is now displayed in reverse order, with the newest entries first.
     10
    611
    712## [1.0.1] - 2025-03-27
     
    3641  - WP_DEBUG_DISPLAY
    3742
     43[1.0.2]: https://github.com/aidamartinez/debug-log-admin-viewer/releases/tag/v1.0.2
    3844[1.0.1]: https://github.com/aidamartinez/debug-log-admin-viewer/releases/tag/v1.0.1
    3945[1.0.0]: https://github.com/aidamartinez/debug-log-admin-viewer/releases/tag/v1.0.0
  • debug-log-admin-viewer/trunk/admin/class-debug-log-admin-viewer-admin.php

    r3262970 r3341697  
    454454     * Get the debug log content.
    455455     *
    456      * @return string The debug log content.
     456     * @return string The debug log content with newest entries first.
    457457     */
    458458    public function debug_log_admin_viewer_get_debug_log_content() {
     
    468468        }
    469469
    470         $content = file_get_contents($log_file);
    471         return $content ?: '';
     470        $content = @file_get_contents($log_file);
     471        if ($content === false) {
     472            error_log('Failed to read debug log file');
     473            return '';
     474        }
     475       
     476        $content = trim($content);
     477        if (empty($content)) {
     478            return '';
     479        }
     480       
     481        // Split the content into lines and reverse the array to show newest first
     482        $lines = explode(PHP_EOL, $content);
     483        $lines = array_filter($lines); // Remove empty lines
     484        $lines = array_reverse($lines);
     485       
     486        // Rebuild the content with newlines
     487        return implode(PHP_EOL, $lines);
    472488    }
    473489
  • debug-log-admin-viewer/trunk/debug-log-admin-viewer.php

    r3262970 r3341697  
    1111 * Plugin URI:        https://wordpress.org/plugins/debug-log-admin-viewer
    1212 * Description:       A powerful debug log admin viewer with filtering and search capabilities, plus debug settings management.
    13  * Version:           1.0.1
     13 * Version:           1.0.2
    1414 * Author:            TWK Media
    1515 * Author URI:        https://www.thewebkitchen.co.uk/
     
    2424}
    2525
    26 define( 'DEBUG_LOG_ADMIN_VIEWER_VERSION', '1.0.1' );
     26define( 'DEBUG_LOG_ADMIN_VIEWER_VERSION', '1.0.2' );
    2727define( 'DEBUG_LOG_ADMIN_VIEWER_DIR', plugin_dir_path( __FILE__ ) );
    2828
  • debug-log-admin-viewer/trunk/readme.md

    r3286300 r3341697  
    55Requires at least: 5.0
    66Tested up to: 6.8
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88Requires PHP: 7.4
    99License: GPLv2 or later
  • debug-log-admin-viewer/trunk/readme.txt

    r3286300 r3341697  
    44Requires at least: 5.0
    55Tested up to: 6.8
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77Requires PHP: 7.4
    88License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.