Display empty-titled pages properly in Walker_PageDropdown, like we do in Walker_Page.
fixes #27218. git-svn-id: https://develop.svn.wordpress.org/trunk@27360 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6869d203d0
commit
9c9aa55274
|
@ -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