Add menus, menu items to import and export — at Version 1
|Reported by:||nacin||Owned by:|
Description (last modified by nacin)
Menus and their menu items should be included in the WXR. Switching can_export to true should mostly rectify this.
However, that introduces some issues. Including them in the post type and taxonomy dropdowns is not intuitive. You either need to export everything, or just export the menu tax and item PT (and you need to know to select both). Not every post type is going to be "content" that belongs in the dropdown, but that doesn't mean it shouldn't be somehow portable. (Same with taxonomies.)
Thus to me it makes sense that can_export might need to be split into A) showing it in the export UI, and B) can it be included in the WXR file. We can then handle our own UI, perhaps with a checkbox, "Export menus." Or something.
That of course brings up another concern, which is that menu items have associated posts, which means they need to also be exported. So really you should not be able to export just menus and menu items, unless of course all of your menu items are custom links (but how can we know that?). Ironically, a simplified export.php from 2.9 would have served us well here, as we'd always just export everything.
Offering a patch for import is particularly challenging, because we'll not only need to map the post-taxonomy relationships (which the importer should handle for menus out of the box) but also the relationships between a menu item and the associated post or term. That introduces new problems. What happens when the associated post or term is not included in the WXR file? Does the menu item convert to a custom link? (Is there any indication that it became broken on import?) Or do we decline to import the menu item? (What about children menu items?)
Clearly a lot of questions here. I think it is pretty safe to say that we do want menus exportable (they are much more like content than basic settings), but the implementation will not be easy. Suggestions welcome.