WordPress.org

Make WordPress Core

Ticket #16872: 16872.diff

File 16872.diff, 3.4 KB (added by solarissmoke, 7 years ago)

Clean up some old arguments from wp_list/dropdown_categories - they don't work any more

  • wp-includes/category-template.php

     
    272272 *     'orderby' (string) default is 'ID' - What column to use for ordering the
    273273 * categories.
    274274 *     'order' (string) default is 'ASC' - What direction to order categories.
    275  *     'show_last_update' (bool|int) default is 0 - See {@link get_categories()}
    276275 *     'show_count' (bool|int) default is 0 - Whether to show how many posts are
    277276 * in the category.
    278277 *     'hide_empty' (bool|int) default is 1 - Whether to hide categories that
     
    302301        $defaults = array(
    303302                'show_option_all' => '', 'show_option_none' => '',
    304303                'orderby' => 'id', 'order' => 'ASC',
    305                 'show_last_update' => 0, 'show_count' => 0,
     304                'show_count' => 0,
    306305                'hide_empty' => 1, 'child_of' => 0,
    307306                'exclude' => '', 'echo' => 1,
    308307                'selected' => 0, 'hierarchical' => 0,
     
    326325                $r['pad_counts'] = true;
    327326        }
    328327
    329         $r['include_last_update_time'] = $r['show_last_update'];
    330328        extract( $r );
    331329
    332330        $tab_index_attribute = '';
     
    389387 *     'orderby' (string) default is 'ID' - What column to use for ordering the
    390388 * categories.
    391389 *     'order' (string) default is 'ASC' - What direction to order categories.
    392  *     'show_last_update' (bool|int) default is 0 - See {@link
    393  * walk_category_dropdown_tree()}
    394390 *     'show_count' (bool|int) default is 0 - Whether to show how many posts are
    395391 * in the category.
    396392 *     'hide_empty' (bool|int) default is 1 - Whether to hide categories that
     
    418414        $defaults = array(
    419415                'show_option_all' => '', 'show_option_none' => __('No categories'),
    420416                'orderby' => 'name', 'order' => 'ASC',
    421                 'show_last_update' => 0, 'style' => 'list',
     417                'style' => 'list',
    422418                'show_count' => 0, 'hide_empty' => 1,
    423419                'use_desc_for_title' => 1, 'child_of' => 0,
    424420                'feed' => '', 'feed_type' => '',
     
    434430        if ( !isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] )
    435431                $r['pad_counts'] = true;
    436432
    437         if ( isset( $r['show_date'] ) )
    438                 $r['include_last_update_time'] = $r['show_date'];
    439 
    440433        if ( true == $r['hierarchical'] ) {
    441434                $r['exclude_tree'] = $r['exclude'];
    442435                $r['exclude'] = '';
     
    873866                if ( !empty($show_count) )
    874867                        $link .= ' (' . intval($category->count) . ')';
    875868
    876                 if ( !empty($show_date) )
    877                         $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
    878 
    879869                if ( 'list' == $args['style'] ) {
    880870                        $output .= "\t<li";
    881871                        $class = 'cat-item cat-item-' . $category->term_id;
     
    941931         * @param string $output Passed by reference. Used to append additional content.
    942932         * @param object $category Category data object.
    943933         * @param int $depth Depth of category. Used for padding.
    944          * @param array $args Uses 'selected', 'show_count', and 'show_last_update' keys, if they exist.
     934         * @param array $args Uses 'selected' and 'show_count' keys, if they exist.
    945935         */
    946936        function start_el(&$output, $category, $depth, $args) {
    947937                $pad = str_repeat('&nbsp;', $depth * 3);
     
    954944                $output .= $pad.$cat_name;
    955945                if ( $args['show_count'] )
    956946                        $output .= '&nbsp;&nbsp;('. $category->count .')';
    957                 if ( $args['show_last_update'] ) {
    958                         $format = 'Y-m-d';
    959                         $output .= '&nbsp;&nbsp;' . gmdate($format, $category->last_update_timestamp);
    960                 }
    961947                $output .= "</option>\n";
    962948        }
    963949}