Remove several one-time variables from `wp_get_archives()`, added in [24] and [190].
Props pbearne for initial patch. Fixes #36243. Built from https://develop.svn.wordpress.org/trunk@37005 git-svn-id: http://core.svn.wordpress.org/trunk@36972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
90f70fab53
commit
48c366c1f4
|
@ -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 );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-beta3-37004';
|
||||
$wp_version = '4.5-beta3-37005';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue