Ticket #8298 (new defect (bug))

Opened 2 months ago

Last modified 1 month ago

wp_page_menu needs to override wp_list_pages include argument to be functional

Reported by: technosailor Assigned to: technosailor
Priority: normal Milestone: 2.8
Component: General Version: 2.7
Severity: normal Keywords: template tag, pages
Cc:

Description

In exploring the new wp_page_menu() function, I realized that there is a byproduct of wp_list_pages that is unintuitive and possibly problematic for people wanting to output a menu. The 'include' argument overrides the use of child_of, parent, meta_key and meta_values parameters.

Menu creation assumes that only some top level pages will need to be used, thus the need for 'include', but wp_list_pages assumes that if you're including only a subset of pages, you're not including the subpages as well. Makes sense on both accounts.

For menu authors, I think expected behavior is that a top level menu would include subpages as well (e.g. a rollover horizontal nav).

I'm submitting a patch that delivers that expected behavior to only the new wp_page_menu() template tag. It reverse engineers the include by using the 'exclude' argument to exclude all pages except the ones passed with the wp_page_menu 'include' argument.

Attachments

8298.diff (0.9 kB) - added by technosailor on 11/20/08 19:43:29.

Change History

11/20/08 19:43:29 changed by technosailor

  • attachment 8298.diff added.

11/30/08 08:56:48 changed by jacobsantos

  • summary changed from wp_page_menu needs to override wp_ist_pages include argument to be functional to wp_page_menu needs to override wp_list_pages include argument to be functional.

12/09/08 12:39:04 changed by markjaquith

  • version set to 2.7.
  • milestone changed from 2.7 to 2.8.