WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/05/13 15:41:46 (4 years ago)
Author:
markjaquith
Message:

Keep the Nav Menu walker from blowing up the layout on empty-titled items.

fixes #23254. props cais, SergeyBiryukov.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/nav-menu.php

    r24235 r24560  
    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 ); 
Note: See TracChangeset for help on using the changeset viewer.