Set min-height for menu item title. Add a fallback for empty-titled items.
props philiparthurmoore. fixes #30283. git-svn-id: https://develop.svn.wordpress.org/trunk@30500 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1eca0cb442
commit
5f1c87f271
@ -471,6 +471,7 @@ ul.add-menu-item-tabs li {
|
||||
position: relative;
|
||||
padding: 10px 15px;
|
||||
height: auto;
|
||||
min-height: 20px;
|
||||
width: 382px;
|
||||
line-height: 30px;
|
||||
overflow: hidden;
|
||||
|
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user