[wp-trac] [WordPress Trac] #14750: Add menus, menu items to import and export

WordPress Trac wp-trac at lists.automattic.com
Fri Oct 1 19:27:56 UTC 2010


#14750: Add menus, menu items to import and export
-----------------------------+----------------------------------------------
 Reporter:  nacin            |       Owner:              
     Type:  feature request  |      Status:  new         
 Priority:  normal           |   Milestone:  3.1         
Component:  Import           |     Version:              
 Severity:  normal           |    Keywords:  dev-feedback
-----------------------------+----------------------------------------------

Comment(by blepoxp):

 I did some digging around and found the following:

 * The 'nav_menu' taxonomy is included at the top of the export file in the
 main channel along with any other core / custom terms.[[BR]]
 * Posts with post type of 'nav_menu_item' already get included in the
 export file if all content types are selected. This is because can_export
 is true by default (it doesn't appear in the select box for content types
 on the export page because is_public is set to false).[[BR]]
 * Posts with post type of 'nav_menu_item' fail to have their associated
 'nav_menu' term taxonomy id associated with them in the export file.

 The above results in the following when imported via the core WordPress
 Importer plugin

 * New taxonomy and terms are created for the 'nav_menu' taxonomy if they
 do not exist already (ie the Menus themselves get imported.[[BR]]
 * New menu items are imported correctly.[[BR]]
 * New menu items are not correctly associated with their correct menu (no
 object_to_term_taxonomy relationship is established in the
 term_relationships table

 This means that all we have to do to get nav menus exporting / importing
 correctly when all content types are selected during export process is to
 a) Tweak export script to add the nav_menu to the nav_menu_items and b)
 tweak the import plugin to set those relationships correctly.

 Seems like this should be corrected before tackling user specified
 options. Thoughts?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14750#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list