WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#20093 closed enhancement (duplicate)

Allow plugin and theme authors to add extra fields to the navigation menu items editor

Reported by: sayontan Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3.1
Component: General Keywords: has-patch
Focuses: Cc:
PR Number:

Description

If a plugin / theme author has to add input fields to the navigation menu editor, the only way is to extend the Walker_Nav_Menu_Edit class, replicate the start_el function, and modify this function to add fields. This can cause issues upon core upgrades. I am attaching a patch that includes an action hook after all the core fields are shown, so that plugin / theme authors can use this hook to add more custom fields. A corresponding hook for saving is not needed, since wp_update_nav_menu_item takes care of that.

Attachments (1)

nav-menu.php.diff (624 bytes) - added by sayontan 8 years ago.

Download all attachments as: .zip

Change History (3)

#1 @toscho
8 years ago

  • Cc info@… added

#2 @ocean90
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.