[wp-hackers] new menu management 3.0

Otto otto at ottodestruct.com
Mon Jun 21 19:25:27 UTC 2010

On Mon, Jun 21, 2010 at 2:08 PM, Andrew Nacin <wp at andrewnacin.com> wrote:
> Just to address the feature request here. I think it's perfectly valid, and
> I'm bummed we couldn't get it into 3.0. We did get auto-add top pages in,
> because the UX and UI was straightforward.
> However, dealing with the UX and UI surrounding auto-adding children was
> more difficult, and after lengthy conversations (and attempted patches) with
> some of the other devs, we just couldn't nail down what would be appropriate
> functionality in order to make it happen in time. (I won't get into it here
> unless someone wants to here it, but it is much more complicated than you'd
> think.) We keep saying menus are just v1. We would definitely accept this
> feature request for consideration for v2 of menus, and I'm pretty sure
> there's already a ticket for it.
> While building the menus system, I've seen various statements of "I guess
> I'll just end up using other plugins and wp_list_pages/wp_page_menu then".
> In some instances, they were legitimate weaknesses and we adjusted. But
> often, wp_list_pages is far more suitable for the use case being described
> anyway. ErinDS points out she will continue to use it and some plugins for
> some clients, and that's perfectly valid.

This is something I lamented about early on, and I fully understand
why it didn't make it into 3.0. Still, it's something that I think is
necessary for menus to be usable for more than trivial cases.

What I'd really like to see though is more generic than that. I'd like
what constitutes a "menu item" to be pluggable. Because of the design
of the menu items, menus basically consist of a static name and URL,
stored in a custom post type. This is a pretty strange way of thinking
about menus, it seems to be, because it doesn't allow plugins to
easily create their own callbacks to produce more than just a simple
menu item. It doesn't allow for a way to easily create new menu
"types", as it were.

Unfortunately, after looking over the code, I see no easy fix for
this. The menu system seems to make that implicit assumption that a
menu item is a static thing. If you want menus that dynamically adjust
to the content of the system, using the new menu system is simply a
poor fit. You just have to stick with wp_list_pages.


More information about the wp-hackers mailing list