WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/05/13 15:41:46 (4 years ago)
Author:
markjaquith
Message:

Keep the Nav Menu walker from blowing up the layout on empty-titled items.

fixes #23254. props cais, SergeyBiryukov.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r24557 r24560  
    10731073        $css_class = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) ); 
    10741074 
     1075        if ( '' === $page->post_title ) 
     1076            $page->post_title = sprintf( __( '#%d (no title)' ), $page->ID ); 
     1077 
    10751078        $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_permalink($page->ID) . '">' . $link_before . apply_filters( 'the_title', $page->post_title, $page->ID ) . $link_after . '</a>'; 
    10761079 
Note: See TracChangeset for help on using the changeset viewer.