WordPress.org

Make WordPress Core

Ticket #19953: 19953.diff

File 19953.diff, 3.4 KB (added by solarissmoke, 6 years ago)
  • wp-includes/category-template.php

     
    271271 *     'orderby' (string) default is 'ID' - What column to use for ordering the
    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.
    277276 *     'hide_empty' (bool|int) default is 1 - Whether to hide categories that
     
    301300        $defaults = array(
    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,
    307306                'selected' => 0, 'hierarchical' => 0,
     
    325324                $r['pad_counts'] = true;
    326325        }
    327326
    328         $r['include_last_update_time'] = $r['show_last_update'];
    329327        extract( $r );
    330328
    331329        $tab_index_attribute = '';
     
    388386 *     'orderby' (string) default is 'ID' - What column to use for ordering the
    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.
    395391 *     'hide_empty' (bool|int) default is 1 - Whether to hide categories that
     
    417413        $defaults = array(
    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,
    423419                'feed' => '', 'feed_type' => '',
     
    433429        if ( !isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] )
    434430                $r['pad_counts'] = true;
    435431
    436         if ( isset( $r['show_date'] ) )
    437                 $r['include_last_update_time'] = $r['show_date'];
    438 
    439432        if ( true == $r['hierarchical'] ) {
    440433                $r['exclude_tree'] = $r['exclude'];
    441434                $r['exclude'] = '';
     
    874867                if ( !empty($show_count) )
    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";
    882872                        $class = 'cat-item cat-item-' . $category->term_id;
     
    942932         * @param string $output Passed by reference. Used to append additional content.
    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 ) {
    948938                $pad = str_repeat('&nbsp;', $depth * 3);
     
    955945                $output .= $pad.$cat_name;
    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        }
    964950}