WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/17/2016 09:49:49 PM (3 years ago)
Author:
westonruter
Message:

Customize: Ensure nav menu items lacking a label use the title from the original object.

Use original title as placeholder for label and in control title. Prevent original title from overriding empty label in initial setting values.

Fixes #38015.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-nav-menu-item-control.php

    r37153 r38618  
    7070                <span class="item-title" aria-hidden="true">
    7171                    <span class="spinner"></span>
    72                     <span class="menu-item-title<# if ( ! data.title ) { #> no-title<# } #>">{{ data.title || wp.customize.Menus.data.l10n.untitled }}</span>
     72                    <span class="menu-item-title<# if ( ! data.title && ! data.original_title ) { #> no-title<# } #>">{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}</span>
    7373                </span>
    7474                <span class="item-controls">
     
    9797                <label for="edit-menu-item-title-{{ data.menu_item_id }}">
    9898                    <?php _e( 'Navigation Label' ); ?><br />
    99                     <input type="text" id="edit-menu-item-title-{{ data.menu_item_id }}" class="widefat edit-menu-item-title" name="menu-item-title" />
     99                    <input type="text" id="edit-menu-item-title-{{ data.menu_item_id }}" placeholder="{{ data.original_title }}" class="widefat edit-menu-item-title" name="menu-item-title" />
    100100                </label>
    101101            </p>
Note: See TracChangeset for help on using the changeset viewer.