Changeset 13553 for trunk/wp-includes/category-template.php
- Timestamp:
- 03/02/2010 06:36:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category-template.php
r13268 r13553 315 315 * 'depth' (int) - The max depth. 316 316 * 'tab_index' (int) - Tab index for select element. 317 * 'name' (string) - The name attribute value for selected element. 318 * 'class' (string) - The class attribute value for selected element. 317 * 'name' (string) - The name attribute value for select element. 318 * 'id' (string) - The ID attribute value for select element. Defaults to name if omitted. 319 * 'class' (string) - The class attribute value for select element. 319 320 * 'selected' (int) - Which category ID is selected. 320 321 * … … 337 338 'exclude' => '', 'echo' => 1, 338 339 'selected' => 0, 'hierarchical' => 0, 339 'name' => 'cat', 'class' => 'postform', 340 'depth' => 0, 'tab_index' => 0, 341 'taxonomy' => 'category', 'hide_if_empty' => false 340 'name' => 'cat', 'id' => '', 341 'class' => 'postform', 'depth' => 0, 342 'tab_index' => 0, 'taxonomy' => 'category', 343 'hide_if_empty' => false 342 344 ); 343 345 … … 358 360 359 361 $categories = get_terms( $taxonomy, $r ); 360 $name = esc_attr($name); 361 $class = esc_attr($class); 362 $name = esc_attr( $name ); 363 $class = esc_attr( $class ); 364 $id = $id ? esc_attr( $id ) : $name; 362 365 363 366 if ( ! $r['hide_if_empty'] || ! empty($categories) ) 364 $output = "<select name='$name' id='$ name' class='$class' $tab_index_attribute>\n";367 $output = "<select name='$name' id='$id' class='$class' $tab_index_attribute>\n"; 365 368 else 366 369 $output = '';
Note: See TracChangeset
for help on using the changeset viewer.