Make WordPress Core

Changeset 37005


Ignore:
Timestamp:
03/16/2016 10:19:43 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Remove several one-time variables from wp_get_archives(), added in [24] and [190].

Props pbearne for initial patch.
Fixes #36243.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r36975 r37005  
    16801680    $archive_week_separator = '–';
    16811681
    1682     // over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride
    1683     $archive_date_format_over_ride = 0;
    1684 
    1685     // options for daily archive (only if you over-ride the general date format)
    1686     $archive_day_date_format = 'Y/m/d';
    1687 
    1688     // options for weekly archive (only if you over-ride the general date format)
    1689     $archive_week_start_date_format = 'Y/m/d';
    1690     $archive_week_end_date_format   = 'Y/m/d';
    1691 
    1692     if ( ! $archive_date_format_over_ride ) {
    1693         $archive_day_date_format = get_option( 'date_format' );
    1694         $archive_week_start_date_format = get_option( 'date_format' );
    1695         $archive_week_end_date_format = get_option( 'date_format' );
    1696     }
    1697 
    16981682    $sql_where = $wpdb->prepare( "WHERE post_type = %s AND post_status = 'publish'", $r['post_type'] );
    16991683
     
    17891773                }
    17901774                $date = sprintf( '%1$d-%2$02d-%3$02d 00:00:00', $result->year, $result->month, $result->dayofmonth );
    1791                 $text = mysql2date( $archive_day_date_format, $date );
     1775                $text = mysql2date( get_option( 'date_format' ), $date );
    17921776                if ( $r['show_post_count'] ) {
    17931777                    $r['after'] = ' (' . $result->posts . ')' . $after;
     
    18131797                    $arc_w_last     = $result->week;
    18141798                    $arc_week       = get_weekstartend( $result->yyyymmdd, get_option( 'start_of_week' ) );
    1815                     $arc_week_start = date_i18n( $archive_week_start_date_format, $arc_week['start'] );
    1816                     $arc_week_end   = date_i18n( $archive_week_end_date_format, $arc_week['end'] );
     1799                    $arc_week_start = date_i18n( get_option( 'date_format' ), $arc_week['start'] );
     1800                    $arc_week_end   = date_i18n( get_option( 'date_format' ), $arc_week['end'] );
    18171801                    $url            = sprintf( '%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', home_url(), '', '?', '=', $arc_year, '&', '=', $result->week );
    18181802                    if ( 'post' !== $r['post_type'] ) {
Note: See TracChangeset for help on using the changeset viewer.