WordPress.org

Make WordPress Core

Ticket #14329: classes.php.diff

File classes.php.diff, 546 bytes (added by layotte, 5 years ago)

Well, this is my simple fix... I just added _get_post_ancestors($_current_page); into the start_el function of classes, before testing if ancestors.

  • classes.php

     
    11901190                $css_class = array('page_item', 'page-item-'.$page->ID); 
    11911191                if ( !empty($current_page) ) { 
    11921192                        $_current_page = get_page( $current_page ); 
     1193                        _get_post_ancestors($_current_page); 
    11931194                        if ( isset($_current_page->ancestors) && in_array($page->ID, (array) $_current_page->ancestors) ) 
    11941195                                $css_class[] = 'current_page_ancestor'; 
    11951196                        if ( $page->ID == $current_page )