Changeset 7761 for trunk/wp-admin/includes/template.php
- Timestamp:
- 04/21/2008 07:30:54 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r7745 r7761 127 127 var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this 128 128 129 function start_lvl( $output, $depth, $args) {129 function start_lvl(&$output, $depth, $args) { 130 130 $indent = str_repeat("\t", $depth); 131 131 $output .= "$indent<ul class='children'>\n"; 132 return $output; 133 } 134 135 function end_lvl($output, $depth, $args) { 132 } 133 134 function end_lvl(&$output, $depth, $args) { 136 135 $indent = str_repeat("\t", $depth); 137 136 $output .= "$indent</ul>\n"; 138 return $output; 139 } 140 141 function start_el($output, $category, $depth, $args) { 137 } 138 139 function start_el(&$output, $category, $depth, $args) { 142 140 extract($args); 143 141 144 142 $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : ''; 145 143 $output .= "\n<li id='category-$category->term_id'$class>" . '<label for="in-category-' . $category->term_id . '" 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>'; 146 147 return $output; 148 } 149 150 function end_el($output, $category, $depth, $args) { 151 if ( 'list' != $args['style'] ) 152 return $output; 153 144 } 145 146 function end_el(&$output, $category, $depth, $args) { 154 147 $output .= "</li>\n"; 155 return $output;156 148 } 157 149 }
Note: See TracChangeset
for help on using the changeset viewer.