wp/wp-includes/customize/class-wp-customize-nav-menu-item-control.php
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
--- a/wp/wp-includes/customize/class-wp-customize-nav-menu-item-control.php	Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/customize/class-wp-customize-nav-menu-item-control.php	Fri Sep 05 18:40:08 2025 +0200
@@ -69,18 +69,35 @@
 				<span class="item-title" aria-hidden="true">
 					<span class="spinner"></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>
+					<# if ( 0 === data.depth ) { #>
+						<span class="is-submenu" style="display: none;"><?php _e( 'sub item' ); ?></span>
+					<# } else { #>
+						<span class="is-submenu"><?php _e( 'sub item' ); ?></span>
+					<# } #>
 				</span>
 				<span class="item-controls">
 					<button type="button" class="button-link item-edit" aria-expanded="false"><span class="screen-reader-text">
-					<?php
-						/* translators: 1: Title of a menu item, 2: Type of a menu item. */
-						printf( __( 'Edit menu item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );
-					?>
+					<# if ( 0 === data.depth ) { #>
+						<?php
+						/* translators: 1: Title of a menu item, 2: Type of a menu item. 3: Item index, 4: Total items. */
+						printf( __( 'Edit %1$s (%2$s, %3$d of %4$d)' ), '{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}', '', '' );
+						?>
+					<# } else if ( 1 === data.depth ) { #>
+						<?php
+							/* translators: 1: Title of a menu item, 2: Type of a menu item, 3, Item index, 4, Total items, 5: Item parent. */
+							printf( __( 'Edit %1$s (%2$s, sub-item %3$d of %4$d under %5$s)' ), '{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}', '', '', '' );
+						?>
+					<# } else { #>
+						<?php
+							/* translators: 1: Title of a menu item, 2: Type of a menu item, 3, Item index, 4, Total items, 5: Item parent, 6: Item depth. */
+							printf( __( 'Edit %1$s (%2$s, sub-item %3$d of %4$d under %5$s, level %6$s)' ), '{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}', '', '', '', '{{data.depth}}' );
+						?>
+					<# } #>
 					</span><span class="toggle-indicator" aria-hidden="true"></span></button>
 					<button type="button" class="button-link item-delete submitdelete deletion"><span class="screen-reader-text">
 					<?php
 						/* translators: 1: Title of a menu item, 2: Type of a menu item. */
-						printf( __( 'Remove Menu Item: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );
+						printf( __( 'Remove Menu Item: %1$s (%2$s)' ), '{{ data.title || data.original_title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.item_type_label }}' );
 					?>
 					</span></button>
 				</span>