Make WordPress Core

Ticket #7000: 7000.003.diff

File 7000.003.diff, 1.5 KB (added by aaroncampbell, 16 years ago)
  • trunk/wp-admin/includes/template.php

     
    461461        function start_el(&$output, $category, $depth, $args) {
    462462                extract($args);
    463463
     464                if ( $category->parent > 0 && in_array( $category->term_id, $selected_cats ) ) {
     465                        $parents = get_category_parents( $category->parent, false, ':' );
     466                        if ( is_wp_error($parents) ) {
     467                                $parents = '';
     468                        }
     469                }
     470
    464471                $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : '';
    465                 $output .= "\n<li id='category-$category->term_id'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="post_category[]" id="in-category-' . $category->term_id . '"' . (in_array( $category->term_id, $selected_cats ) ? ' checked="checked"' : "" ) . '/> ' . wp_specialchars( apply_filters('the_category', $category->name )) . '</label>';
     472                $output .= "\n<li id='category-$category->term_id'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="post_category[]" id="in-category-' . $category->term_id . '"' . (in_array( $category->term_id, $selected_cats ) ? ' checked="checked"' : "" ) . '/> ' . wp_specialchars( apply_filters('the_category', $parents . $category->name )) . '</label>';
    466473        }
    467474
    468475        function end_el(&$output, $category, $depth, $args) {