Opened 3 years ago

Closed 3 years ago

#13696 closed defect (bug) (fixed)

Clean up menu editing / creating

Reported by: filosofo Owned by:
Priority: normal Milestone: 3.0
Component: Menus Version: 3.0
Severity: normal Keywords: has-patch
Cc:

Description

Currently, wp_create_nav_menu is used only in wp_update_nav_menu_object.

  • There's no need to expose a limited menu-creation API when wp_update_nav_menu_object handles that already.
  • wp_create_nav_menu is doubling some of the sanity checks done already in wp_update_nav_menu_object, so we should simplify the logic.

Attachments (2)

clean-up-menu-editing-api.13696.diff (3.4 KB) - added by filosofo 3 years ago.
clean-up-menu-editing-api.13696.2.diff (3.3 KB) - added by filosofo 3 years ago.

Download all attachments as: .zip

Change History (5)

comment:1   ryan3 years ago

wp_create_nav_menu() is already being used by plugins. I'd rather not take that away now that we are RC.

clean-up-menu-editing-api.13696.2.diff makes wp_create_nav_menu just wrap wp_update_nav_menu_object, so we still lose the duplicated logic.

comment:3   ryan3 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.