[wp-trac] [WordPress Trac] #23276: WordPress Importer: Update existing navs instead of new

WordPress Trac noreply at wordpress.org
Thu Jan 24 16:07:53 UTC 2013


#23276: WordPress Importer: Update existing navs instead of new
--------------------------+------------------------------
 Reporter:  WraithKenny   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Import        |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------
Changes (by WraithKenny):

 * keywords:  reporter-feedback =>


Comment:

 The issue:

 The current version of the plugin imports nav items using
 `wp_update_nav_menu_item( $menu_id, 0, $args )` which because of the
 second passed argument always creates a new item, even when the item
 exists already (actually, even when it doesn't, it creates a new one, but
 with a new id).

 The patch just uses the logic that all other post_types uses when
 importing to either create the item with the correct id, or update the
 existing item with the correct id (if the existing item is a nav item).

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


More information about the wp-trac mailing list