Changeset 10814
- Timestamp:
- 03/18/2009 09:43:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/classes.php
r10810 r10814 1173 1173 1174 1174 extract($args, EXTR_SKIP); 1175 $css_class = 'page_item page-item-'.$page->ID;1175 $css_class = array('page_item', 'page-item-'.$page->ID); 1176 1176 if ( !empty($current_page) ) { 1177 1177 $_current_page = get_page( $current_page ); 1178 1178 if ( isset($_current_page->ancestors) && in_array($page->ID, (array) $_current_page->ancestors) ) 1179 $css_class .= 'current_page_ancestor';1179 $css_class[] = 'current_page_ancestor'; 1180 1180 if ( $page->ID == $current_page ) 1181 $css_class .= 'current_page_item';1181 $css_class[] = 'current_page_item'; 1182 1182 elseif ( $_current_page && $page->ID == $_current_page->post_parent ) 1183 $css_class .= 'current_page_parent';1183 $css_class[] = 'current_page_parent'; 1184 1184 } elseif ( $page->ID == get_option('page_for_posts') ) { 1185 $css_class .= ' current_page_parent'; 1186 } 1185 $css_class[] = 'current_page_parent'; 1186 } 1187 1188 $css_class = implode(' ', apply_filters('page_css_class', $css_class, $page)); 1187 1189 1188 1190 $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '">' . $link_before . apply_filters('the_title', $page->post_title) . $link_after . '</a>';
Note: See TracChangeset
for help on using the changeset viewer.