From 167fd8edf18126c2a8cd08a366762a2ac79ce9ae Mon Sep 17 00:00:00 2001 From: ren <18050944+renintw@users.noreply.github.com> Date: Thu, 7 Dec 2023 05:26:38 +0900 Subject: [PATCH] Convert UNIX timestamp to human readable format. --- .../themes/wporg-events-2023/src/event-list/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 a11dbf0881..065482dafe 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 @@ -55,7 +55,7 @@ function render( $attributes, $content, $block ) { // Group events by month year. $grouped_events = array(); foreach ( $filtered_events as $event ) { - $event_month_year = gmdate('F Y', $event->timestamp); + $event_month_year = gmdate('F Y', esc_html( $event->timestamp) ); $grouped_events[ $event_month_year ][] = $event; } @@ -67,7 +67,7 @@ function render( $attributes, $content, $block ) { $content .= '
  • '; $content .= '

    ' . esc_html($event->title) . '

    '; $content .= '
    ' . esc_html($event->location) . '
    '; - $content .= '
    ' . esc_html( $event->timestamp ) . '
    '; + $content .= '
    ' . gmdate( 'F j, Y', esc_html( $event->timestamp ) ) . '
    '; $content .= '
  • '; }