Ticket #11433: 12397-update-wp_dropdown_pages.diff
| File 12397-update-wp_dropdown_pages.diff, 1008 bytes (added by jeremyclarke, 3 years ago) |
|---|
-
wp-includes/post-template.php
690 690 $defaults = array( 691 691 'depth' => 0, 'child_of' => 0, 692 692 'selected' => 0, 'echo' => 1, 693 'name' => 'page_id', 'show_option_none' => '', 'show_option_no_change' => '', 693 'name' => 'page_id', 'id' => '', 694 'show_option_none' => '', 'show_option_no_change' => '', 694 695 'option_none_value' => '' 695 696 ); 696 697 … … 700 701 $pages = get_pages($r); 701 702 $output = ''; 702 703 $name = esc_attr($name); 704 // Back-compat with old system where both id and name were based on $name argument 705 if ( empty($id) ) 706 $id = $name; 703 707 704 708 if ( ! empty($pages) ) { 705 $output = "<select name=\"$name\" id=\"$ name\">\n";709 $output = "<select name=\"$name\" id=\"$id\">\n"; 706 710 if ( $show_option_no_change ) 707 711 $output .= "\t<option value=\"-1\">$show_option_no_change</option>"; 708 712 if ( $show_option_none )
