Ticket #20156: post-template.multiselect_dropdown_pages.patch
File post-template.multiselect_dropdown_pages.patch, 885 bytes (added by , 12 years ago) |
---|
-
post-template.php
774 774 'selected' => 0, 'echo' => 1, 775 775 'name' => 'page_id', 'id' => '', 776 776 'show_option_none' => '', 'show_option_no_change' => '', 777 'option_none_value' => '' 777 'option_none_value' => '', 778 'multiselect' => false 778 779 ); 779 780 780 781 $r = wp_parse_args( $args, $defaults ); … … 787 788 $id = $name; 788 789 789 790 if ( ! empty($pages) ) { 790 $output = "<select name='" . esc_attr( $name ) . "' id='" . esc_attr( $id ) . "'>\n";791 $output = "<select name='" . esc_attr( $name ) . "'".(($multiselect) ? "multiple='multiple'" : "") ." id='" . esc_attr( $id ) . "'>\n"; 791 792 if ( $show_option_no_change ) 792 793 $output .= "\t<option value=\"-1\">$show_option_no_change</option>"; 793 794 if ( $show_option_none )