Add name arg to wp_dropdown_pages().
git-svn-id: http://svn.automattic.com/wordpress/trunk@3575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
672530a9da
commit
740d8f1c1f
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue