Skip to content

Commit ded7416

Browse files
committed
Run PHPCBF
1 parent 3d7ea6f commit ded7416

1 file changed

Lines changed: 24 additions & 18 deletions

File tree

src/wp-admin/includes/class-wp-on-this-day.php

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -457,13 +457,15 @@ protected static function render_posts( $posts, $window_days ) {
457457
<li class="<?php echo esc_attr( $group_classes ); ?>">
458458
<p class="on-this-day-year-header">
459459
<span class="on-this-day-year-number"><?php echo esc_html( $year ); ?></span>
460-
<span class="on-this-day-year-ago"><?php
460+
<span class="on-this-day-year-ago">
461+
<?php
461462
printf(
462463
/* translators: %s: Number of years, e.g. "1 year ago" or "5 years ago". */
463464
esc_html( _n( '%s year ago', '%s years ago', $years_ago ) ),
464465
esc_html( number_format_i18n( $years_ago ) )
465466
);
466-
?></span>
467+
?>
468+
</span>
467469
</p>
468470
<ul class="on-this-day-post-list">
469471
<?php foreach ( $year_posts as $post ) : ?>
@@ -548,27 +550,31 @@ protected static function render_post( $post, $window_days ) {
548550
<?php endif; ?>
549551

550552
<div class="on-this-day-post-meta">
551-
<time class="on-this-day-post-time" datetime="<?php echo esc_attr( $time_iso ); ?>"><?php
552-
if ( 1 === $window_days ) {
553-
echo esc_html( $time_str );
554-
} else {
555-
echo esc_html(
556-
sprintf(
557-
/* translators: 1: Post date, 2: Post time. */
558-
__( '%1$s at %2$s' ),
559-
$date_str,
560-
$time_str
561-
)
562-
);
563-
}
564-
?></time>
553+
<time class="on-this-day-post-time" datetime="<?php echo esc_attr( $time_iso ); ?>">
554+
<?php
555+
if ( 1 === $window_days ) {
556+
echo esc_html( $time_str );
557+
} else {
558+
echo esc_html(
559+
sprintf(
560+
/* translators: 1: Post date, 2: Post time. */
561+
__( '%1$s at %2$s' ),
562+
$date_str,
563+
$time_str
564+
)
565+
);
566+
}
567+
?>
568+
</time>
565569

566570
<?php if ( ! empty( $categories ) ) : ?>
567571
<span class="on-this-day-post-sep" aria-hidden="true">&middot;</span>
568-
<span class="on-this-day-post-categories"><?php
572+
<span class="on-this-day-post-categories">
573+
<?php
569574
$names = wp_list_pluck( array_slice( $categories, 0, 3 ), 'name' );
570575
echo esc_html( implode( ', ', $names ) );
571-
?></span>
576+
?>
577+
</span>
572578
<?php endif; ?>
573579

574580
<?php if ( $is_private ) : ?>

0 commit comments

Comments
 (0)