[wp-trac] [WordPress Trac] #8959: wp_list_pages and position of current_page_item / _parent / _ancestor

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 25 12:14:22 GMT 2009


#8959: wp_list_pages and position of current_page_item / _parent / _ancestor
-------------------------+--------------------------------------------------
 Reporter:  stgoos       |       Owner:  anonymous
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  2.7.1    
Component:  General      |     Version:           
 Severity:  normal       |    Keywords:           
-------------------------+--------------------------------------------------
 I'm currently using the CSS only menu dropdown solution from
 http://cssmenus.co.uk/dropdown.html which works great but I can't style
 the active menu selection properly as the class elements current_page_item
 / _parent / _ancestor are connected to the <li> tag rather then the <a
 href> tag. With this you can't highlight the actual menu path because it
 would affect whole submenus as well...

 My suggestion is to include an additional argument to the wp_list_pages
 function with which you can control the output location of the
 current_page_item / _parent / _ancestor class elements.

 Defaul behaviour: the current_page_ class elements gets assigned to the
 <li> tag just like it happens now.

 Alternative behaviour: the current_page_ class elements gets assigned to
 the <a href> tag to allow alternative css styling options.

 This would affect the following functions / files:
 - wp_list_pages function in /wp-includes/post-template.php
 - start_el function in /wp-includes/classes.php

 And probably also the wp_page_menu function in /wp-includes/post-
 template.php to keep that one in line with the wp_list_pages function.

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


More information about the wp-trac mailing list