Ticket #7993: 7993.2.diff
| File 7993.2.diff, 2.9 KB (added by , 16 years ago) |
|---|
-
category-template.php
343 343 'selected' => 0, 'hierarchical' => 0, 344 344 'name' => 'cat', 'id' => '', 345 345 'class' => 'postform', 'depth' => 0, 346 'tab_index' => 0, 'taxonomy' => 'category',346 'tab_index' => false, 'taxonomy' => 'category', 347 347 'hide_if_empty' => false 348 348 ); 349 349 … … 365 365 extract( $r ); 366 366 367 367 $tab_index_attribute = ''; 368 if ( (int) $tab_index > 0)369 $tab_index_attribute = " tabindex=\" $tab_index\"";368 if ( false !== $tab_index ) 369 $tab_index_attribute = " tabindex=\"" . absint($tab_index) . "\""; 370 370 371 371 $categories = get_terms( $taxonomy, $r ); 372 372 $name = esc_attr( $name ); -
post-template.php
712 712 'selected' => 0, 'echo' => 1, 713 713 'name' => 'page_id', 'id' => '', 714 714 'show_option_none' => '', 'show_option_no_change' => '', 715 'option_none_value' => '' 715 'option_none_value' => '', 'tab_index' => false 716 716 ); 717 717 718 718 $r = wp_parse_args( $args, $defaults ); … … 721 721 $pages = get_pages($r); 722 722 $output = ''; 723 723 $name = esc_attr($name); 724 725 $tab_index_attribute = ''; 726 if ( false !== $tab_index ) 727 $tab_index_attribute = " tabindex=\"" . absint($tab_index) . "\""; 728 724 729 // Back-compat with old system where both id and name were based on $name argument 725 730 if ( empty($id) ) 726 731 $id = $name; 727 732 728 733 if ( ! empty($pages) ) { 729 $output = "<select name=\"$name\" id=\"$id\" >\n";734 $output = "<select name=\"$name\" id=\"$id\" $tab_index_attribute>\n"; 730 735 if ( $show_option_no_change ) 731 736 $output .= "\t<option value=\"-1\">$show_option_no_change</option>"; 732 737 if ( $show_option_none ) -
user.php
590 590 'include' => '', 'exclude' => '', 'multi' => 0, 591 591 'show' => 'display_name', 'echo' => 1, 592 592 'selected' => 0, 'name' => 'user', 'class' => '', 'blog_id' => $GLOBALS['blog_id'], 593 'id' => '', 593 'id' => '', 'tab_index' => false 594 594 ); 595 595 596 596 $defaults['selected'] = is_author() ? get_query_var( 'author' ) : 0; … … 621 621 $query .= " ORDER BY $orderby $order"; 622 622 623 623 $users = $wpdb->get_results( $query ); 624 625 $tab_index_attribute = ''; 626 if ( false !== $tab_index ) 627 $tab_index_attribute = " tabindex=\"" . absint($tab_index) . "\""; 624 628 625 629 $output = ''; 626 630 if ( !empty($users) ) { … … 630 634 else 631 635 $id = $id ? " id='" . esc_attr( $id ) . "'" : " id='$name'"; 632 636 633 $output = "<select name='{$name}'{$id} class='$class' >\n";637 $output = "<select name='{$name}'{$id} class='$class' $tab_index_attribute>\n"; 634 638 635 639 if ( $show_option_all ) 636 640 $output .= "\t<option value='0'>$show_option_all</option>\n";