mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-10 12:50:18 +01:00
Display empty-titled pages properly in Walker_PageDropdown, like we do in Walker_Page.
fixes #27218. Built from https://develop.svn.wordpress.org/trunk@27360 git-svn-id: http://core.svn.wordpress.org/trunk@27210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ffc4ca7b01
commit
8fa00f68e7
@ -1147,7 +1147,13 @@ class Walker_PageDropdown extends Walker {
|
||||
if ( $page->ID == $args['selected'] )
|
||||
$output .= ' selected="selected"';
|
||||
$output .= '>';
|
||||
$title = apply_filters( 'list_pages', $page->post_title, $page );
|
||||
|
||||
$title = $page->post_title;
|
||||
if ( '' === $title ) {
|
||||
$title = sprintf( __( '#%d (no title)' ), $page->ID );
|
||||
}
|
||||
|
||||
$title = apply_filters( 'list_pages', $title, $page );
|
||||
$output .= $pad . esc_html( $title );
|
||||
$output .= "</option>\n";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user