@@ -157,7 +157,7 @@ protected static function render_posts( $posts ) {
157157
158158 $ by_year = array ();
159159 foreach ( $ posts as $ post ) {
160- $ year = (int ) get_the_date ( 'Y ' , $ post );
160+ $ year = (int ) get_the_date ( 'Y ' , $ post );
161161 $ by_year [ $ year ][] = $ post ;
162162 }
163163 krsort ( $ by_year );
@@ -168,20 +168,23 @@ protected static function render_posts( $posts ) {
168168 <p class="on-this-day-intro">
169169 <?php
170170 printf (
171- /* translators: 1: Number of posts. 2: Number of years. */
172- esc_html ( _n (
173- 'You published %1$s post on this day across %2$s year. ' ,
174- 'You published %1$s posts on this day across %2$s years. ' ,
175- $ post_count
176- ) ),
171+ esc_html (
172+ /* translators: 1: Number of posts. 2: Number of years. */
173+ _n (
174+ 'You published %1$s post on this day across %2$s year. ' ,
175+ 'You published %1$s posts on this day across %2$s years. ' ,
176+ $ post_count
177+ )
178+ ),
177179 '<strong> ' . esc_html ( number_format_i18n ( $ post_count ) ) . '</strong> ' ,
178180 '<strong> ' . esc_html ( number_format_i18n ( $ year_count ) ) . '</strong> '
179181 );
180182 ?>
181183 </p>
182184
183185 <ul class="on-this-day-timeline">
184- <?php foreach ( $ by_year as $ year => $ year_posts ) :
186+ <?php
187+ foreach ( $ by_year as $ year => $ year_posts ) :
185188 $ years_ago = $ current_year - (int ) $ year ;
186189 ?>
187190 <li class="on-this-day-year-group">
@@ -247,7 +250,11 @@ protected static function render_post( $post ) {
247250 <?php endif ; ?>
248251 <div class="on-this-day-post-body">
249252 <h4 class="on-this-day-post-title">
250- <a href="<?php echo esc_url ( $ edit_link ); ?> "><?php echo esc_html ( $ title ); ?> </a><?php if ( 'private ' === $ status ) : ?> <span class="on-this-day-chip on-this-day-chip-private"><?php _e ( 'Private ' ); ?> </span><?php endif ; ?>
253+ <a href="<?php echo esc_url ( $ edit_link ); ?> "><?php echo esc_html ( $ title ); ?> </a>
254+ <?php
255+ if ( 'private ' === $ status ) :
256+ ?>
257+ <span class="on-this-day-chip on-this-day-chip-private"><?php _e ( 'Private ' ); ?> </span><?php endif ; ?>
251258 </h4>
252259 <?php if ( $ excerpt ) : ?>
253260 <p class="on-this-day-post-excerpt"><?php echo esc_html ( $ excerpt ); ?> </p>
0 commit comments