diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 94b01eb484..1a7fc1bb1b 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -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 .= "\n"; }