Make WordPress Core

Changeset 32895


Ignore:
Timestamp:
06/20/2015 10:32:37 PM (9 years ago)
Author:
ocean90
Message:

Customizer: Fix live preview for menu item titles.

Show also a default label for menu items without a label which are assigned to a menu. This is currently only supported in the Customizer, see #24146 for nav menus screen.

see #32576.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r32893 r32895  
    15591559                <span class="item-title">
    15601560                    <span class="spinner"></span>
    1561                     <span class="menu-item-title">{{ data.title }}</span>
     1561                    <span class="menu-item-title<# if ( ! data.title ) { #> no-title<# } #>">{{ data.title || wp.customize.Menus.data.l10n.untitled }}</span>
    15621562                </span>
    15631563                <span class="item-controls">
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r32892 r32895  
    581581                    <div class="menu-item-handle">
    582582                        <span class="item-type">{{ data.type_label }}</span>
    583                         <span class="item-title">{{ data.title || wp.customize.Menus.data.l10n.untitled }}</span>
     583                        <span class="item-title">
     584                            <span class="menu-item-title<# if ( ! data.title ) { #> no-title<# } #>">{{ data.title || wp.customize.Menus.data.l10n.untitled }}</span>
     585                        </span>
    584586                        <button type="button" class="not-a-button item-add"><span class="screen-reader-text"><?php _e( 'Add Menu Item' ) ?></span></button>
    585587                    </div>
Note: See TracChangeset for help on using the changeset viewer.