WordPress 4.7
[autoinstalls/wordpress.git] / wp-includes / customize / class-wp-customize-nav-menu-item-control.php
index 95e7b54df0c8a275146aacf62d07a2fd8eb378f5..941dad4c345652efcd6cf949079755b6c48a5b59 100644 (file)
@@ -69,7 +69,7 @@ class WP_Customize_Nav_Menu_Item_Control extends WP_Customize_Control {
                                <span class="item-type" aria-hidden="true">{{ data.item_type_label }}</span>
                                <span class="item-title" aria-hidden="true">
                                        <span class="spinner"></span>
                                <span class="item-type" aria-hidden="true">{{ data.item_type_label }}</span>
                                <span class="item-title" aria-hidden="true">
                                        <span class="spinner"></span>
-                                       <span class="menu-item-title<# if ( ! data.title ) { #> no-title<# } #>">{{ data.title || wp.customize.Menus.data.l10n.untitled }}</span>
+                                       <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>
                                </span>
                                <span class="item-controls">
                                        <button type="button" class="button-link item-edit" aria-expanded="false"><span class="screen-reader-text"><?php
                                </span>
                                <span class="item-controls">
                                        <button type="button" class="button-link item-edit" aria-expanded="false"><span class="screen-reader-text"><?php
@@ -96,7 +96,7 @@ class WP_Customize_Nav_Menu_Item_Control extends WP_Customize_Control {
                        <p class="description description-thin">
                                <label for="edit-menu-item-title-{{ data.menu_item_id }}">
                                        <?php _e( 'Navigation Label' ); ?><br />
                        <p class="description description-thin">
                                <label for="edit-menu-item-title-{{ data.menu_item_id }}">
                                        <?php _e( 'Navigation Label' ); ?><br />
-                                       <input type="text" id="edit-menu-item-title-{{ data.menu_item_id }}" class="widefat edit-menu-item-title" name="menu-item-title" />
+                                       <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" />
                                </label>
                        </p>
                        <p class="field-link-target description description-thin">
                                </label>
                        </p>
                        <p class="field-link-target description description-thin">
@@ -134,7 +134,10 @@ class WP_Customize_Nav_Menu_Item_Control extends WP_Customize_Control {
                        <div class="menu-item-actions description-thin submitbox">
                                <# if ( ( 'post_type' === data.item_type || 'taxonomy' === data.item_type ) && '' !== data.original_title ) { #>
                                <p class="link-to-original">
                        <div class="menu-item-actions description-thin submitbox">
                                <# if ( ( 'post_type' === data.item_type || 'taxonomy' === data.item_type ) && '' !== data.original_title ) { #>
                                <p class="link-to-original">
-                                       <?php printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' ); ?>
+                                       <?php
+                                               /* translators: Nav menu item original title. 1: Original title */
+                                               printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' );
+                                       ?>
                                </p>
                                <# } #>
 
                                </p>
                                <# } #>