Set min-height for menu item title. Add a fallback for empty-titled items.
props philiparthurmoore. fixes #30283. Built from https://develop.svn.wordpress.org/trunk@30500 git-svn-id: http://core.svn.wordpress.org/trunk@30489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -661,6 +661,11 @@ function wp_setup_nav_menu_item( $menu_item ) {
|
||||
|
||||
$original_object = get_post( $menu_item->object_id );
|
||||
$original_title = $original_object->post_title;
|
||||
|
||||
if ( '' === $original_title ) {
|
||||
$original_title = sprintf( __( '#%d (no title)' ), $original_object->ID );
|
||||
}
|
||||
|
||||
$menu_item->title = '' == $menu_item->post_title ? $original_title : $menu_item->post_title;
|
||||
|
||||
} elseif ( 'taxonomy' == $menu_item->type ) {
|
||||
|
||||
Reference in New Issue
Block a user