--- a/wp/wp-admin/includes/class-walker-nav-menu-edit.php Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-admin/includes/class-walker-nav-menu-edit.php Fri Sep 05 18:40:08 2025 +0200
@@ -61,7 +61,8 @@
global $_wp_nav_menu_max_depth;
// Restores the more descriptive, specific name for use within this method.
- $menu_item = $data_object;
+ $menu_item = $data_object;
+
$_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth;
ob_start();
@@ -180,8 +181,9 @@
printf(
'<a class="item-edit" id="edit-%s" href="%s" aria-label="%s"><span class="screen-reader-text">%s</span></a>',
$item_id,
- $edit_url,
+ esc_url( $edit_url ),
esc_attr__( 'Edit menu item' ),
+ /* translators: Hidden accessibility text. */
__( 'Edit' )
);
?>
@@ -265,7 +267,7 @@
<p class="link-to-original">
<?php
/* translators: %s: Link to menu item's original object. */
- printf( __( 'Original: %s' ), '<a href="' . esc_attr( $menu_item->url ) . '">' . esc_html( $original_title ) . '</a>' );
+ printf( __( 'Original: %s' ), '<a href="' . esc_url( $menu_item->url ) . '">' . esc_html( $original_title ) . '</a>' );
?>
</p>
<?php endif; ?>
@@ -318,5 +320,4 @@
<?php
$output .= ob_get_clean();
}
-
}