[wp-trac] [WordPress Trac] #8298: wp_page_menu needs to override wp_ist_pages include argument to be functional

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 20 19:43:13 GMT 2008


#8298: wp_page_menu needs to override wp_ist_pages include argument to be
functional
--------------------------+-------------------------------------------------
 Reporter:  technosailor  |       Owner:  technosailor       
     Type:  defect        |      Status:  new                
 Priority:  normal        |   Milestone:  2.7                
Component:  General       |     Version:                     
 Severity:  normal        |    Keywords:  template tag, pages
--------------------------+-------------------------------------------------
 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.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8298>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list