Skip to content

Commit 40effe6

Browse files
Automation: Updating built files with changes. [dependabot skip]
1 parent a115bfa commit 40effe6

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

src/wp-includes/blocks/rss.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,15 @@ function render_block_core_rss( $attributes ) {
4343
}
4444
$title = "<div class='wp-block-rss__item-title'>{$title}</div>";
4545

46-
$date_markup = '';
47-
if ( ! empty( $attributes['displayDate'] ) ) {
48-
$timestamp = $item->get_date( 'U' );
46+
$date = '';
47+
if ( $attributes['displayDate'] ) {
48+
$date = $item->get_date( 'U' );
4949

50-
if ( $timestamp ) {
51-
$gmt_offset = get_option( 'gmt_offset' );
52-
$timestamp += (int) ( (float) $gmt_offset * HOUR_IN_SECONDS );
53-
54-
$date_markup = sprintf(
50+
if ( $date ) {
51+
$date = sprintf(
5552
'<time datetime="%1$s" class="wp-block-rss__item-publish-date">%2$s</time> ',
56-
esc_attr( date_i18n( 'c', $timestamp ) ),
57-
esc_html( date_i18n( get_option( 'date_format' ), $timestamp ) )
53+
esc_attr( date_i18n( 'c', $date ) ),
54+
esc_attr( date_i18n( get_option( 'date_format' ), $date ) )
5855
);
5956
}
6057
}
@@ -88,7 +85,7 @@ function render_block_core_rss( $attributes ) {
8885
$excerpt = '<div class="wp-block-rss__item-excerpt">' . esc_html( $excerpt ) . '</div>';
8986
}
9087

91-
$list_items .= "<li class='wp-block-rss__item'>{$title}{$date_markup}{$author}{$excerpt}</li>";
88+
$list_items .= "<li class='wp-block-rss__item'>{$title}{$date}{$author}{$excerpt}</li>";
9289
}
9390

9491
$classnames = array();

0 commit comments

Comments
 (0)