WordPress.org

Make WordPress Core

Ticket #4351: r-6662-classes.php.txt

File r-6662-classes.php.txt, 668 bytes (added by ev3rywh3re, 7 years ago)

Simple patch for revision 6662

Line 
1Index: classes.php
2===================================================================
3--- classes.php (revision 6662)
4+++ classes.php (working copy)
5@@ -555,6 +555,8 @@
6                        $css_class .= ' current_page_item ';
7                elseif ( $_current_page && $page->ID == $_current_page->post_parent )
8                        $css_class .= ' current_page_parent';
9+                       
10+               if ( $depth == 1 && $_current_page->post_parent != 0 ) $css_class .= ' current_page_tree';
11 
12                $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '">' . apply_filters('the_title', $page->post_title) . '</a>';
13