Add name arg to wp_dropdown_pages().

git-svn-id: https://develop.svn.wordpress.org/trunk@3575 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-02-28 06:11:59 +00:00
parent e0feeb161a
commit 71232c4705
1 changed files with 3 additions and 2 deletions

View File

@ -344,14 +344,15 @@ function wp_dropdown_pages($args = '') {
$r['echo'] = 1;
if ( !isset($r['selected']) )
$r['selected'] = 0;
if ( !isset($r['name']) )
$r['name'] = 'page_id';
extract($r);
$pages = get_pages($args);
$output = '';
if ( ! empty($pages) ) {
$output = "<select name='page_id'>\n";
$output = "<select name='$name'>\n";
$output .= walk_page_tree($pages, $depth, '_page_dropdown_element', '', '', '', $selected);
$output .= "</select>\n";
}