From bb365054b874dc089564c8da361e900d5bf15ab6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 9 Jul 2019 20:45:56 +0000 Subject: [PATCH] Menus: Remove extra whitespace from URLs in `Walker_Nav_Menu_Edit::start_el()`. Props alexeyskr, SergeyBiryukov. Fixes #47666. Built from https://develop.svn.wordpress.org/trunk@45614 git-svn-id: http://core.svn.wordpress.org/trunk@45425 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../includes/class-walker-nav-menu-edit.php | 99 ++++++++++++------- wp-includes/version.php | 2 +- 2 files changed, 65 insertions(+), 36 deletions(-) diff --git a/wp-admin/includes/class-walker-nav-menu-edit.php b/wp-admin/includes/class-walker-nav-menu-edit.php index eb940af37c..974b00bee5 100644 --- a/wp-admin/includes/class-walker-nav-menu-edit.php +++ b/wp-admin/includes/class-walker-nav-menu-edit.php @@ -119,9 +119,10 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { type_label ); ?> - ', + wp_nonce_url( add_query_arg( array( 'action' => 'move-up-menu-item', @@ -130,13 +131,15 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { remove_query_arg( $removed_args, admin_url( 'nav-menus.php' ) ) ), 'move-menu_item' - ); + ), + esc_attr__( 'Move up' ) + ); ?> - " class="item-move-up" aria-label="">↑ | - ', + wp_nonce_url( add_query_arg( array( 'action' => 'move-down-menu-item', @@ -145,15 +148,31 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { remove_query_arg( $removed_args, admin_url( 'nav-menus.php' ) ) ), 'move-menu_item' - ); + ), + esc_attr__( 'Move down' ) + ); ?> - " class="item-move-down" aria-label="">↓ - + $item_id, + ), + remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) + ); + } + + printf( + '%s', + $item_id, + $edit_url, + esc_attr__( 'Edit menu item' ), + __( 'Edit' ) + ); + ?> @@ -223,32 +242,42 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { ?>

- | %s', + $item_id, + wp_nonce_url( + add_query_arg( + array( + 'action' => 'delete-menu-item', + 'menu-item' => $item_id, + ), + admin_url( 'nav-menus.php' ) ), - admin_url( 'nav-menus.php' ) - ) + 'delete-menu_item_' . $item_id + ), + __( 'Remove' ) + ); + ?> + | + %s', + $item_id, + esc_url( + add_query_arg( + array( + 'edit-menu-item' => $item_id, + 'cancel' => time(), + ), + admin_url( 'nav-menus.php' ) + ) + ), + $item_id, + __( 'Cancel' ) ); ?> - #menu-item-settings-"> diff --git a/wp-includes/version.php b/wp-includes/version.php index 470ea1b02a..388164f1e6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45613'; +$wp_version = '5.3-alpha-45614'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.