97 | | $ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : ++$_wp_last_object_menu; // If we're to use $_wp_last_object_menu, increment it first. |
| 97 | // Adjust the position if it's already occupied |
| 98 | if ( is_int( $ptype_obj->menu_position ) && ( $ptype_obj->menu_position == $_wp_last_object_menu ) ) { |
| 99 | $ptype_menu_position = $ptype_obj->menu_position; |
| 100 | $_wp_last_object_menu; |
| 101 | } elseif ( is_int( $ptype_obj->menu_position ) && isset( $menu[$ptype_obj->menu_position] ) ) { |
| 102 | $ptype_menu_position = $ptype_obj->menu_position + 1; |
| 103 | } else { |
| 104 | $ptype_menu_position = $ptype_obj->menu_position; |
| 105 | } |