Set current_page_parent when using page_for_posts. Props betsyk. fixes #7518

git-svn-id: http://svn.automattic.com/wordpress/trunk@9299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-10-23 18:01:57 +00:00
parent 710529051d
commit fac34b2423
1 changed files with 2 additions and 0 deletions

View File

@ -1164,6 +1164,8 @@ class Walker_Page extends Walker {
$css_class .= ' current_page_item'; $css_class .= ' current_page_item';
elseif ( $_current_page && $page->ID == $_current_page->post_parent ) elseif ( $_current_page && $page->ID == $_current_page->post_parent )
$css_class .= ' current_page_parent'; $css_class .= ' current_page_parent';
} elseif ( $page->ID == get_settings('page_for_posts') ) {
$css_class .= ' current_page_parent';
} }
$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>'; $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>';