Ticket #7993: 7993.diff
| File 7993.diff, 2.1 KB (added by , 16 years ago) |
|---|
-
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' => 0 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 ( (int) $tab_index > 0 ) 727 $tab_index_attribute = " tabindex=\"$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' => 0 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 624 625 $tab_index_attribute = ''; 626 if ( (int) $tab_index > 0 ) 627 $tab_index_attribute = " tabindex=\"$tab_index\""; 628 625 629 $output = ''; 626 630 if ( !empty($users) ) { 627 631 $name = esc_attr( $name ); … … 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";