Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#13342 closed defect (bug) (fixed)

Allow Custom Menu Edit Markup

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

Description

Menus need a way for plugin authors to customize their edit markup.

For example, with a plugin I want to create a menu option that changes descendant menu items automatically based on context. Currently, there is no way to alter the existing menu edit page to present my plugin's UI.

This patch allows plugin authors to filter the Walker class which handles the admin menu edit markup, so the markup can differ for each menu.

Attachments (1)

allow_custom_menu_editing.13342.diff (1.5 KB) - added by filosofo 15 years ago.

Download all attachments as: .zip

Change History (5)

#1 @filosofo
15 years ago

I also corrected the documentation. (Proximate in the file, but unrelated).

#2 follow-up: @nacin
15 years ago

Don't think we need the string message in WP_Error, but looks sane to me.

#3 in reply to: ↑ 2 @filosofo
15 years ago

Replying to nacin:

Don't think we need the string message in WP_Error, but looks sane to me.

I'm fine with its doing nothing instead, but I put that there since it already bubbles up error objects from retrieving the nav menu.

#4 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [14645]) Add wp_edit_nav_menu_walker filter for specifying a custom edit nav menu walker. Props filosofo. fixes #13342

Note: See TracTickets for help on using tickets.