diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 1644ce4c0..dbd3acce0 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -691,7 +691,8 @@ function wp_dropdown_pages($args = '') { $defaults = array( 'depth' => 0, 'child_of' => 0, 'selected' => 0, 'echo' => 1, - 'name' => 'page_id', 'show_option_none' => '', 'show_option_no_change' => '', + 'name' => 'page_id', 'id' => '', + 'show_option_none' => '', 'show_option_no_change' => '', 'option_none_value' => '' ); @@ -701,9 +702,12 @@ function wp_dropdown_pages($args = '') { $pages = get_pages($r); $output = ''; $name = esc_attr($name); + // Back-compat with old system where both id and name were based on $name argument + if ( empty($id) ) + $id = $name; if ( ! empty($pages) ) { - $output = "\n"; if ( $show_option_no_change ) $output .= "\t"; if ( $show_option_none )