diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index d3cf27a445..2ba72a38f3 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -1679,22 +1679,6 @@ function wp_get_archives( $args = '' ) { // this is what will separate dates on weekly archive links $archive_week_separator = '–'; - // over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride - $archive_date_format_over_ride = 0; - - // options for daily archive (only if you over-ride the general date format) - $archive_day_date_format = 'Y/m/d'; - - // options for weekly archive (only if you over-ride the general date format) - $archive_week_start_date_format = 'Y/m/d'; - $archive_week_end_date_format = 'Y/m/d'; - - if ( ! $archive_date_format_over_ride ) { - $archive_day_date_format = get_option( 'date_format' ); - $archive_week_start_date_format = get_option( 'date_format' ); - $archive_week_end_date_format = get_option( 'date_format' ); - } - $sql_where = $wpdb->prepare( "WHERE post_type = %s AND post_status = 'publish'", $r['post_type'] ); /** @@ -1788,7 +1772,7 @@ function wp_get_archives( $args = '' ) { $url = add_query_arg( 'post_type', $r['post_type'], $url ); } $date = sprintf( '%1$d-%2$02d-%3$02d 00:00:00', $result->year, $result->month, $result->dayofmonth ); - $text = mysql2date( $archive_day_date_format, $date ); + $text = mysql2date( get_option( 'date_format' ), $date ); if ( $r['show_post_count'] ) { $r['after'] = ' (' . $result->posts . ')' . $after; } @@ -1812,8 +1796,8 @@ function wp_get_archives( $args = '' ) { $arc_year = $result->yr; $arc_w_last = $result->week; $arc_week = get_weekstartend( $result->yyyymmdd, get_option( 'start_of_week' ) ); - $arc_week_start = date_i18n( $archive_week_start_date_format, $arc_week['start'] ); - $arc_week_end = date_i18n( $archive_week_end_date_format, $arc_week['end'] ); + $arc_week_start = date_i18n( get_option( 'date_format' ), $arc_week['start'] ); + $arc_week_end = date_i18n( get_option( 'date_format' ), $arc_week['end'] ); $url = sprintf( '%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&', '=', $result->week ); if ( 'post' !== $r['post_type'] ) { $url = add_query_arg( 'post_type', $r['post_type'], $url );