[wp-trac] Re: [WordPress Trac] #4351: Modify Walker_Page to add
current_page_tree class for some style
WordPress Trac
wp-trac at lists.automattic.com
Sat Jan 26 05:47:42 GMT 2008
#4351: Modify Walker_Page to add current_page_tree class for some style
-------------------------------------------------+--------------------------
Reporter: ev3rywh3re | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.5
Component: Template | Version: 2.3
Severity: normal | Resolution:
Keywords: Walker_Page wp_list_pages has-patch |
-------------------------------------------------+--------------------------
Comment (by ev3rywh3re):
Driving home in nasty south Louisiana rain while avoiding Mardi Gras
revelers cleared my head.
Attached as r-6666-classes.php.txt is the rewrite of the Walker_Page class
I'm using in a widget.
This minor rewrite is designed to insert two new classes:
current_page_root - is placed on the root UL.
current_page_branch - is placed on the preceding LI.
I believe current_page_root would probably work for most folks. This also
introduces a new class function and two new variables in an attempt to
call get_page as little as possible.
There may be easier / better performing methods.
--
Ticket URL: <http://trac.wordpress.org/ticket/4351#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list