Make WordPress Core

Ticket #27218: 27218.patch

File 27218.patch, 670 bytes (added by SergeyBiryukov, 11 years ago)
  • src/wp-includes/post-template.php

     
    11341134                if ( $page->ID == $args['selected'] )
    11351135                        $output .= ' selected="selected"';
    11361136                $output .= '>';
    1137                 $title = apply_filters( 'list_pages', $page->post_title, $page );
     1137
     1138                $title = $page->post_title;
     1139                if ( '' === $title ) {
     1140                        $title = sprintf( __( '#%d (no title)' ), $page->ID );
     1141                }
     1142
     1143                $title = apply_filters( 'list_pages', $title, $page );
    11381144                $output .= $pad . esc_html( $title );
    11391145                $output .= "</option>\n";
    11401146        }