Ticket #30082: 30082.diff
| File 30082.diff, 1.2 KB (added by , 11 years ago) |
|---|
-
src/wp-includes/post-template.php
937 937 */ 938 938 function wp_dropdown_pages( $args = '' ) { 939 939 $defaults = array( 940 'depth' => 0, 'child_of' => 0, 941 'selected' => 0, 'echo' => 1, 942 'name' => 'page_id', 'id' => '', 943 'show_option_none' => '', 'show_option_no_change' => '', 944 'option_none_value' => '' 940 'depth' => 0, 941 'child_of' => 0, 942 'selected' => 0, 943 'echo' => 1, 944 'name' => 'page_id', 945 'id' => '', 946 'class' => '', 947 'show_option_none' => '', 948 'show_option_no_change' => '', 949 'option_none_value' => '', 945 950 ); 946 951 947 952 $r = wp_parse_args( $args, $defaults ); … … 954 959 } 955 960 956 961 if ( ! empty( $pages ) ) { 957 $output = "<select name='" . esc_attr( $r['name'] ) . "' id='" . esc_attr( $r['id'] ) . "' >\n";962 $output = "<select name='" . esc_attr( $r['name'] ) . "' id='" . esc_attr( $r['id'] ) . "'class='" . esc_attr( $r['class'] ) . "'>\n"; 958 963 if ( $r['show_option_no_change'] ) { 959 964 $output .= "\t<option value=\"-1\">" . $r['show_option_no_change'] . "</option>\n"; 960 965 }