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:
Sergey Biryukov 2014-11-21 05:57:22 +00:00
parent 2aabde8f74
commit aad05ece16
6 changed files with 10 additions and 3 deletions

View File

@ -471,6 +471,7 @@ ul.add-menu-item-tabs li {
position: relative; position: relative;
padding: 10px 15px; padding: 10px 15px;
height: auto; height: auto;
min-height: 20px;
width: 382px; width: 382px;
line-height: 30px; line-height: 30px;
overflow: hidden; overflow: hidden;

View File

@ -471,6 +471,7 @@ ul.add-menu-item-tabs li {
position: relative; position: relative;
padding: 10px 15px; padding: 10px 15px;
height: auto; height: auto;
min-height: 20px;
width: 382px; width: 382px;
line-height: 30px; line-height: 30px;
overflow: hidden; overflow: hidden;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -661,6 +661,11 @@ function wp_setup_nav_menu_item( $menu_item ) {
$original_object = get_post( $menu_item->object_id ); $original_object = get_post( $menu_item->object_id );
$original_title = $original_object->post_title; $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; $menu_item->title = '' == $menu_item->post_title ? $original_title : $menu_item->post_title;
} elseif ( 'taxonomy' == $menu_item->type ) { } elseif ( 'taxonomy' == $menu_item->type ) {

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.1-beta2-30499'; $wp_version = '4.1-beta2-30500';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.