Make WordPress Core


Ignore:
Timestamp:
03/02/2014 10:33:25 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Display empty-titled pages properly in Walker_PageDropdown, like we do in Walker_Page.

fixes #27218.

File:
1 edited

Legend:

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

    r27334 r27360  
    11481148            $output .= ' selected="selected"';
    11491149        $output .= '>';
    1150         $title = apply_filters( 'list_pages', $page->post_title, $page );
     1150
     1151        $title = $page->post_title;
     1152        if ( '' === $title ) {
     1153            $title = sprintf( __( '#%d (no title)' ), $page->ID );
     1154        }
     1155
     1156        $title = apply_filters( 'list_pages', $title, $page );
    11511157        $output .= $pad . esc_html( $title );
    11521158        $output .= "</option>\n";
Note: See TracChangeset for help on using the changeset viewer.