fix incorrect modification time in logs dropdown
This commit is contained in:
parent
2fcd2edbd3
commit
f3dd7be2b0
|
@ -26,8 +26,13 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
<?php foreach ( $logs as $log_key => $log_file ) : ?>
|
<?php foreach ( $logs as $log_key => $log_file ) : ?>
|
||||||
<?php
|
<?php
|
||||||
$timestamp = filemtime( WC_LOG_DIR . $log_file );
|
$timestamp = filemtime( WC_LOG_DIR . $log_file );
|
||||||
/* translators: 1: last access date 2: last access time */
|
$date = sprintf(
|
||||||
$date = sprintf( __( '%1$s at %2$s', 'woocommerce' ), date_i18n( wc_date_format(), $timestamp ), date_i18n( wc_time_format(), $timestamp ) );
|
/* translators: 1: last access date 2: last access time 3: last access timezone abbreviation */
|
||||||
|
__( '%1$s at %2$s %3$s', 'woocommerce' ),
|
||||||
|
wp_date( wc_date_format(), $timestamp ),
|
||||||
|
wp_date( wc_time_format(), $timestamp ),
|
||||||
|
wp_date( 'T', $timestamp )
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo esc_attr( $log_key ); ?>" <?php selected( sanitize_title( $viewed_log ), $log_key ); ?>><?php echo esc_html( $log_file ); ?> (<?php echo esc_html( $date ); ?>)</option>
|
<option value="<?php echo esc_attr( $log_key ); ?>" <?php selected( sanitize_title( $viewed_log ), $log_key ); ?>><?php echo esc_html( $log_file ); ?> (<?php echo esc_html( $date ); ?>)</option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
Loading…
Reference in New Issue