Make WordPress Core

Opened 16 years ago

Closed 12 years ago

#14414 closed feature request (duplicate)

Add an action hook to add fields to nav_menu items form

Reported by: DreadLox Owned by: Gecka
Priority: normal Milestone:
Component: Menus Version: 3.1
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

Hello,

In order to add a custom field to a nav menu item form, I have to setup a custom walker whereas a simple action hook could do the trick. Everything else is ok to handle and save the custom field. (http://loxdev.knc.nc/blog/wordpress/auto-populate-nav-menu-with-sub-pages/)

Here is how the asked action hook could be added:
http://github.com/loxK/Wordpress_Gecka_Submenu/blob/master/models/NavMenuHacks.php#L310-312

Attachments (1)

nav_menu_custom_fields.patch (644 bytes ) - added by Gecka 16 years ago.

Download all attachments as: .zip

Change History (10)

#1 @wonderslug
16 years ago

I think this should really be an alternative to the wp_edit_nav_menu_walker filter, which replaces the walker classname. This filter will cause clashes if multiple plugins change the classname of the walker. Only the last filter run will win.

This action would be a way for multiple plugins to add fields to the menu items (like is done with widget fields right now) and not have conflicts.

#2 @nacin
16 years ago

  • Milestone Awaiting ReviewFuture Release

#3 @Gecka
16 years ago

  • Keywords has-patch added
  • Owner set to Gecka
  • Status newaccepted
  • Version3.1

#4 @anonymized_126485
15 years ago

Is there any reason this one-line patch cannot be incorporated into 3.3 ...?

#5 @duck_
15 years ago

Closed #18889 as a duplicate. It had ticket18889.patch which suggested a large number of new filters.

Is there any reason this one-line patch cannot be incorporated into 3.3 ...?

Because the time for feature requests / enhancements passed a while ago.

#6 @ocean90
14 years ago

  • Milestone Future Release3.4

Closed as a duplicate: #20093

Related: #18584

#7 @nacin
14 years ago

  • Milestone 3.4Future Release

Since this is part of a walker, those doing big customizations can replace it. We should probably solve issues like nav-menus.php saving quite a bit of data before we open this up too much. Per IRC scrub.

#8 @chriscct7
12 years ago

@nacin Any update on this?

#9 @helen
12 years ago

  • Milestone Future Release
  • Resolutionduplicate
  • Status acceptedclosed

Calling this a dupe of #18584. Patch there includes this and is more comprehensive, and has more discussion.

Note: See TracTickets for help on using tickets.