From c7f5f957bd719d66d193210ba969ff8e46c37c7f Mon Sep 17 00:00:00 2001 From: ren <18050944+renintw@users.noreply.github.com> Date: Thu, 7 Dec 2023 04:04:17 +0900 Subject: [PATCH] Events: Convert event-list timestamp. Convert server-side Unix timestamps to a human-readable format and client-side timezone for the block WordPress Event List. --- .../wporg-events-2023/src/event-list/block.json | 3 ++- .../wporg-events-2023/src/event-list/index.php | 2 +- .../wporg-events-2023/src/event-list/view.js | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 public_html/wp-content/themes/wporg-events-2023/src/event-list/view.js diff --git a/public_html/wp-content/themes/wporg-events-2023/src/event-list/block.json b/public_html/wp-content/themes/wporg-events-2023/src/event-list/block.json index e90c17ef3b..f8c71d12a1 100644 --- a/public_html/wp-content/themes/wporg-events-2023/src/event-list/block.json +++ b/public_html/wp-content/themes/wporg-events-2023/src/event-list/block.json @@ -31,5 +31,6 @@ } }, "editorScript": "file:./index.js", - "style": "file:./style-index.css" + "style": "file:./style-index.css", + "viewScript": "file:./view.js" } diff --git a/public_html/wp-content/themes/wporg-events-2023/src/event-list/index.php b/public_html/wp-content/themes/wporg-events-2023/src/event-list/index.php index 2f20dd6ba3..4552590efc 100644 --- a/public_html/wp-content/themes/wporg-events-2023/src/event-list/index.php +++ b/public_html/wp-content/themes/wporg-events-2023/src/event-list/index.php @@ -59,7 +59,7 @@ function render( $attributes, $content, $block ) { $content .= '