WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/15/2012 04:46:01 PM (9 years ago)
Author:
duck_
Message:

Remove old show_last_update/include_last_update_time/show_date code from category template functions. Props solarissmoke. Fixes #19953.

File:
1 edited

Legend:

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

    r19712 r19927  
    272272 * categories.
    273273 *     'order' (string) default is 'ASC' - What direction to order categories.
    274  *     'show_last_update' (bool|int) default is 0 - See {@link get_categories()}
    275274 *     'show_count' (bool|int) default is 0 - Whether to show how many posts are
    276275 * in the category.
     
    302301        'show_option_all' => '', 'show_option_none' => '',
    303302        'orderby' => 'id', 'order' => 'ASC',
    304         'show_last_update' => 0, 'show_count' => 0,
     303        'show_count' => 0,
    305304        'hide_empty' => 1, 'child_of' => 0,
    306305        'exclude' => '', 'echo' => 1,
     
    326325    }
    327326
    328     $r['include_last_update_time'] = $r['show_last_update'];
    329327    extract( $r );
    330328
     
    389387 * categories.
    390388 *     'order' (string) default is 'ASC' - What direction to order categories.
    391  *     'show_last_update' (bool|int) default is 0 - See {@link
    392  * walk_category_dropdown_tree()}
    393389 *     'show_count' (bool|int) default is 0 - Whether to show how many posts are
    394390 * in the category.
     
    418414        'show_option_all' => '', 'show_option_none' => __('No categories'),
    419415        'orderby' => 'name', 'order' => 'ASC',
    420         'show_last_update' => 0, 'style' => 'list',
     416        'style' => 'list',
    421417        'show_count' => 0, 'hide_empty' => 1,
    422418        'use_desc_for_title' => 1, 'child_of' => 0,
     
    433429    if ( !isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] )
    434430        $r['pad_counts'] = true;
    435 
    436     if ( isset( $r['show_date'] ) )
    437         $r['include_last_update_time'] = $r['show_date'];
    438431
    439432    if ( true == $r['hierarchical'] ) {
     
    875868            $link .= ' (' . intval($category->count) . ')';
    876869
    877         if ( !empty($show_date) )
    878             $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
    879 
    880870        if ( 'list' == $args['style'] ) {
    881871            $output .= "\t<li";
     
    943933     * @param object $category Category data object.
    944934     * @param int $depth Depth of category. Used for padding.
    945      * @param array $args Uses 'selected', 'show_count', and 'show_last_update' keys, if they exist.
     935     * @param array $args Uses 'selected' and 'show_count' keys, if they exist.
    946936     */
    947937    function start_el( &$output, $category, $depth, $args, $id = 0 ) {
     
    956946        if ( $args['show_count'] )
    957947            $output .= '&nbsp;&nbsp;('. $category->count .')';
    958         if ( $args['show_last_update'] ) {
    959             $format = 'Y-m-d';
    960             $output .= '&nbsp;&nbsp;' . gmdate($format, $category->last_update_timestamp);
    961         }
    962948        $output .= "</option>\n";
    963949    }
Note: See TracChangeset for help on using the changeset viewer.