From 9676fe46f680a4d1dcac3fe89c598844b51ec2b6 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 23 Aug 2024 17:10:45 -0400 Subject: [PATCH 1/2] Adding relative time display --- template-parts/log-display.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/template-parts/log-display.php b/template-parts/log-display.php index ee480d5a..9591b0ea 100644 --- a/template-parts/log-display.php +++ b/template-parts/log-display.php @@ -167,9 +167,6 @@ function ai_logger_render_table( array $data ): void {

@@ -218,16 +215,26 @@ function ai_logger_render_table( array $data ): void { + - format( $ai_logger_date_format ) ); ?> - - - - setTimezone( wp_timezone() )->format( $ai_logger_date_format ) ); ?> + setTimezone( wp_timezone() )->format( $ai_logger_date_format ), + human_time_diff( $log['datetime']->getTimestamp() ), + ), + ); + ?> + + + format( $ai_logger_date_format ) ); ?> + From d5032957a50d2692424fd741f83b06bf58181bed Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Fri, 23 Aug 2024 17:13:18 -0400 Subject: [PATCH 2/2] New version --- logger.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logger.php b/logger.php index 88937f0e..52732997 100644 --- a/logger.php +++ b/logger.php @@ -3,7 +3,7 @@ * Plugin Name: Alley Logger * Plugin URI: https://github.com/alleyinteractive/logger * Description: A Monolog-based logging tool for WordPress. Supports storing log message in a custom post type or in individual posts and terms. - * Version: 2.4.3 + * Version: 2.4.4 * Author: Alley Interactive * Author URI: https://alley.com/ * Requires at least: 5.9