Changeset 13348
- Timestamp:
- 02/23/2010 11:13:54 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-navigation.php
r13344 r13348 107 107 } elseif ( $postCounter > 0 && $menu_selected_id > 0 ) { 108 108 $menu_items = wp_get_nav_menu_items( $menu_selected_id, array('orderby' => 'ID', 'output' => ARRAY_A, 'output_key' => 'ID') ); 109 $parent_menu_ids = array(); 109 110 110 111 // Loop through all POST variables … … 131 132 else 132 133 $post['post_content_filtered'] = ''; 133 if ( $parent_id > 0 && isset( $ _POST[ 'dbid' .$parent_id ] ) )134 $post[ 'post_parent' ] = (int) $_POST[ 'dbid' .$parent_id ];134 if ( $parent_id > 0 && isset( $parent_menu_ids[ $parent_id ] ) ) 135 $post[ 'post_parent' ] = $parent_menu_ids[ $parent_id ]; 135 136 136 137 // New menu item … … 142 143 unset( $menu_items[$db_id] ); 143 144 } 145 $parent_menu_ids[ $k ] = $db_id; 146 144 147 update_post_meta($db_id, 'menu_type', $linktype); 145 148 update_post_meta($db_id, 'object_id', $object_id);
Note: See TracChangeset
for help on using the changeset viewer.