Ticket #23406: 23406-wcc.diff
File 23406-wcc.diff, 2.9 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/template.php
24 24 var $tree_type = 'category'; 25 25 var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this 26 26 27 /** 28 * Starts the list before the elements are added. 29 * 30 * @see Walker:start_lvl() 31 * 32 * @since 2.5.1 33 * 34 * @param string $output Passed by reference. Used to append additional content. 35 * @param int $depth Depth of category. Used for tab indentation. 36 * @param array $args An array of arguments. @see wp_terms_checklist() 37 */ 27 38 function start_lvl( &$output, $depth = 0, $args = array() ) { 28 39 $indent = str_repeat("\t", $depth); 29 40 $output .= "$indent<ul class='children'>\n"; 30 41 } 31 42 43 /** 44 * Ends the list of after the elements are added. 45 * 46 * @see Walker::end_lvl() 47 * 48 * @since 2.5.1 49 * 50 * @param string $output Passed by reference. Used to append additional content. 51 * @param int $depth Depth of category. Used for tab indentation. 52 * @param array $args An array of arguments. @see wp_terms_checklist() 53 */ 32 54 function end_lvl( &$output, $depth = 0, $args = array() ) { 33 55 $indent = str_repeat("\t", $depth); 34 56 $output .= "$indent</ul>\n"; 35 57 } 36 58 59 /** 60 * Start the element output. 61 * 62 * @see Walker::start_el() 63 * 64 * @since 2.5.1 65 * 66 * @param string $output Passed by reference. Used to append additional content. 67 * @param object $category The current term object. 68 * @param int $depth Depth of the term in reference to parents. Default 0. 69 * @param array $args An array of arguments. @see wp_terms_checklist() 70 * @param int $id ID of the current term. 71 */ 37 72 function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { 38 73 extract($args); 39 74 if ( empty($taxonomy) ) … … 48 83 $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>'; 49 84 } 50 85 86 /** 87 * Ends the element output, if needed. 88 * 89 * @see Walker::end_el() 90 * 91 * @since 2.5.1 92 * 93 * @param string $output Passed by reference. Used to append additional content. 94 * @param object $category The current term object. 95 * @param int $depth Depth of the term in reference to parents. Default 0. 96 * @param array $args An array of arguments. @see wp_terms_checklist() 97 */ 51 98 function end_el( &$output, $category, $depth = 0, $args = array() ) { 52 99 $output .= "</li>\n"; 53 100 }