WordPress.org

Make WordPress Core

Changeset 30500


Ignore:
Timestamp:
11/21/2014 05:56:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Set min-height for menu item title. Add a fallback for empty-titled items.

props philiparthurmoore.
fixes #30283.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/nav-menus.css

    r28707 r30500  
    472472    padding: 10px 15px;
    473473    height: auto;
     474    min-height: 20px;
    474475    width: 382px;
    475476    line-height: 30px;
  • trunk/src/wp-includes/nav-menu.php

    r30105 r30500  
    662662                $original_object = get_post( $menu_item->object_id );
    663663                $original_title = $original_object->post_title;
     664
     665                if ( '' === $original_title ) {
     666                    $original_title = sprintf( __( '#%d (no title)' ), $original_object->ID );
     667                }
     668
    664669                $menu_item->title = '' == $menu_item->post_title ? $original_title : $menu_item->post_title;
    665670
Note: See TracChangeset for help on using the changeset viewer.