Make WordPress Core

Ticket #23254: 23254.3.patch

File 23254.3.patch, 1.2 KB (added by SergeyBiryukov, 12 years ago)

With strict comparison

  • wp-includes/nav-menu.php

     
    641641                        $menu_item->object = $object->name;
    642642                        $menu_item->type_label = $object->labels->singular_name;
    643643
     644                        if ( '' === $menu_item->post_title )
     645                                $menu_item->post_title = sprintf( __( '#%d (no title)' ), $menu_item->ID );
     646
    644647                        $menu_item->title = $menu_item->post_title;
    645648                        $menu_item->url = get_permalink( $menu_item->ID );
    646649                        $menu_item->target = '';
  • wp-includes/post-template.php

     
    10571057
    10581058                $css_class = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) );
    10591059
     1060                if ( '' === $page->post_title )
     1061                        $page->post_title = sprintf( __( '#%d (no title)' ), $page->ID );
     1062
    10601063                $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_permalink($page->ID) . '">' . $link_before . apply_filters( 'the_title', $page->post_title, $page->ID ) . $link_after . '</a>';
    10611064
    10621065                if ( !empty($show_date) ) {