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'] )
|
if ( $page->ID == $args['selected'] )
|
||||||
$output .= ' selected="selected"';
|
$output .= ' selected="selected"';
|
||||||
$output .= '>';
|
$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 .= $pad . esc_html( $title );
|
||||||
$output .= "</option>\n";
|
$output .= "</option>\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue