[wp-hackers] Current page and category parents, in wp-includes/classes.php

Callum Macdonald lists.automattic.com at callum-macdonald.com
Tue Sep 11 16:40:25 GMT 2007


G'day,

I've added a patch to trac ticket 2395[1] to recursively add 
class="current_page_parent" or class="current-cat-parent" to all parents 
(including grandparents, great-grandparents, etc).

I've also added a second patch which includes the above and also adds a 
new class="current_page_parent_lN" and class="current-cat-parent-lN" 
where N is the number of levels above the current page, from 0 upwards. 
For example, current_page_parent_l0 means the current page, 
current-cat-parent-l1 means the current category's parent, 
current_page_parent_l2 means the current page's grandparent, and so on.

I'd like to propose changing the milestone for this ticket to 2.4 seeing 
as there is now a patch available. If I don't hear any objections over 
the next few days I'll go ahead and do that in trac.

I'd welcome any feedback / comments / suggestions on the patch.

Cheers - Callum.

[1] http://trac.wordpress.org/ticket/2395

This work was sponsored by http://www.4-14.org.uk/



More information about the wp-hackers mailing list