Changeset 1747 for trunk/wp-admin/admin-functions.php
- Timestamp:
- 10/05/2004 08:27:13 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r1715 r1747 708 708 } 709 709 710 function parent_dropdown($parent = 0, $level = 0) { 711 global $wpdb; 712 $items = $wpdb->get_results("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = $parent AND post_status = 'static' ORDER BY menu_order"); 713 if ($items) { 714 foreach ($items as $item) { 715 $pad = str_repeat(' ', $level * 3); 716 if ($item->ID == $current) 717 $current = ' selected="selected"'; 718 else 719 $current = ''; 720 721 echo "\n\t<option value='$item->ID'$current>$pad $item->post_title</a></option>"; 722 parent_dropdown($item->ID, $level + 1); 723 } 724 } else { 725 return false; 726 } 727 } 728 710 729 ?>
Note: See TracChangeset
for help on using the changeset viewer.