diff --git a/wp-includes/classes.php b/wp-includes/classes.php
index b55d8ef976..f60b50d8bf 100644
--- a/wp-includes/classes.php
+++ b/wp-includes/classes.php
@@ -503,8 +503,11 @@ class Walker_Page extends Walker {
$indent = str_repeat("\t", $depth);
$css_class = 'page_item';
+ $_current_page = get_page( $current_page );
if ( $page->ID == $current_page )
$css_class .= ' current_page_item';
+ elseif ( $_current_page && $page->ID == $_current_page->post_parent )
+ $css_class .= ' current_page_parent';
$output .= $indent . '
' . $page->post_title . '';
@@ -612,11 +615,15 @@ class Walker_Category extends Walker {
if ( isset($show_date) && $show_date ) {
$link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
}
-
+
+ $_current_category = get_category( $current_category );
+
if ( 'list' == $args['style'] ) {
$output .= "\tcat_ID == $current_category) && is_category() )
$output .= ' class="current-cat"';
+ elseif ( ($category->cat_ID == $_current_category->category_parent) && is_category() )
+ $output .= ' class="current-cat-parent"';
$output .= ">$link\n";
} else {
$output .= "\t$link
\n";