@@ -1376,16 +1376,26 @@ function toggleLayer( whichLayer ) {
13761376 }
13771377 ?>
13781378 <p><?php printf ( __ ( 'Cached pages since %1$s : <strong>%2$s</strong> ' , 'wp-super-cache ' ), date ( 'M j, Y ' , $ start_date ), number_format ( get_option ( 'wpsupercache_count ' ) ) ); ?> </p>
1379+ <?php
1380+ $ supercache_last_cached_option = get_option ( 'supercache_last_cached ' );
1381+ if ( is_array ( $ supercache_last_cached_option ) ) {
1382+ ?>
13791383 <p><?php _e ( 'Newest Cached Pages: ' , 'wp-super-cache ' ); ?> <ol>
13801384 <?php
1381- foreach ( array_reverse ( (array ) get_option ( 'supercache_last_cached ' ) ) as $ url ) {
1382- $ since = time () - strtotime ( $ url ['date ' ] );
1383- echo "<li><a title=' " . sprintf ( esc_html__ ( 'Cached %s seconds ago ' , 'wp-super-cache ' ), (int ) $ since ) . "' href=' " . site_url ( $ url ['url ' ] ) . "'> " . substr ( $ url ['url ' ], 0 , 20 ) . "</a></li> \n" ;
1385+ foreach ( array_reverse ( $ supercache_last_cached_option ) as $ url ) {
1386+ if ( ! is_array ( $ url ) ) {
1387+ continue ;
1388+ }
1389+ $ since = time () - strtotime ( $ url ['date ' ] ?? '' );
1390+ // translators: %s is the number of seconds since the page was cached.
1391+ echo "<li><a title=' " . sprintf ( esc_html__ ( 'Cached %s seconds ago ' , 'wp-super-cache ' ), (int ) $ since ) . "' href=' " . esc_url ( site_url ( $ url ['url ' ] ?? '' ) ) . "'> " . esc_html ( substr ( $ url ['url ' ] ?? '' , 0 , 20 ) ) . "</a></li> \n" ;
13841392 }
13851393 ?>
13861394 </ol>
13871395 <small><?php esc_html_e ( '(may not always be accurate on busy sites) ' , 'wp-super-cache ' ); ?> </small>
1388- </p><?php
1396+ </p>
1397+ <?php
1398+ }
13891399 } elseif ( false == get_option ( 'wpsupercache_start ' ) ) {
13901400 update_option ( 'wpsupercache_start ' , time () );
13911401 update_option ( 'wpsupercache_count ' , 0 );
0 commit comments