Make WordPress Core

Opened 16 years ago

Closed 11 years ago

Last modified 11 years ago

#8298 closed defect (bug) (duplicate)

wp_page_menu needs to override wp_list_pages include argument to be functional

Reported by: technosailor's profile technosailor Owned by: technosailor's profile technosailor
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Template Keywords: has-patch needs-testing gsoc
Focuses: 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 (3)

8298.diff (921 bytes) - added by technosailor 16 years ago.
8298-2.diff (1020 bytes) - added by technosailor 14 years ago.
8298.2.diff (1.6 KB) - added by wojtek.szkutnik 14 years ago.

Download all attachments as: .zip

Change History (15)

@technosailor
16 years ago

#1 @jacobsantos
16 years ago

  • 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

#2 @markjaquith
16 years ago

  • Milestone changed from 2.7 to 2.8
  • Version set to 2.7

#3 @Denis-de-Bernardy
15 years ago

  • Keywords needs-patch added; template tag pages removed
  • Milestone changed from 2.8 to Future Release

broken patch

#4 @Denis-de-Bernardy
15 years ago

  • Component changed from General to Template

#5 @Denis-de-Bernardy
15 years ago

  • Milestone changed from Future Release to 2.9

#6 @azaozz
15 years ago

  • Milestone changed from 2.9 to Future Release

#7 @technosailor
14 years ago

  • Cc technosailor added
  • Keywords has-patch added; needs-patch removed
  • Status changed from new to assigned
  • Version changed from 2.7 to 3.0

Refreshed patch for 3.0. Can we get this in?

@technosailor
14 years ago

#8 @wojtek.szkutnik
14 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords needs-testing gsoc added

Was the previous patch working? ('include' vs 'included')
Wasn't it supposed to be looking like the one I am submitting?

#9 @hakre
14 years ago

Patch still applies clean. Milestone is still on future release, probably something for 3.1?

#10 @technosailor
11 years ago

Duplicate of #12945. Closing

#11 @technosailor
11 years ago

  • Resolution set to wontfix
  • Status changed from assigned to closed

#12 @SergeyBiryukov
11 years ago

  • Milestone Future Release deleted
  • Resolution changed from wontfix to duplicate

Duplicate of #12945.

Note: See TracTickets for help on using tickets.