From e286586edaa96c5c2ad40fc74615ad0ec618f7cd Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 2 Oct 2021 17:06:00 +0000 Subject: [PATCH] Twenty Twenty-One: Keep the closing `` tag in footer links. When the `link_after` value is emptied to reset any description markup, make sure not to remove the closing tag within footer links. Follow-up to [49216]. Props sabernhardt, mukesh27. Fixes #54209. Built from https://develop.svn.wordpress.org/trunk@51881 git-svn-id: http://core.svn.wordpress.org/trunk@51474 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentytwentyone/inc/menu-functions.php | 6 +++++- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentytwentyone/inc/menu-functions.php b/wp-content/themes/twentytwentyone/inc/menu-functions.php index 0299c58c41..c461047c77 100644 --- a/wp-content/themes/twentytwentyone/inc/menu-functions.php +++ b/wp-content/themes/twentytwentyone/inc/menu-functions.php @@ -87,11 +87,15 @@ add_filter( 'walker_nav_menu_start_el', 'twenty_twenty_one_nav_menu_social_icons * @return stdClass */ function twenty_twenty_one_add_menu_description_args( $args, $item, $depth ) { - $args->link_after = ''; + if ( '' !== $args->link_after ) { + $args->link_after = ''; + } + if ( 0 === $depth && isset( $item->description ) && $item->description ) { // The extra element is here for styling purposes: Allows the description to not be underlined on hover. $args->link_after = ''; } + return $args; } add_filter( 'nav_menu_item_args', 'twenty_twenty_one_add_menu_description_args', 10, 3 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 38e0c359da..48a68bd3d5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51880'; +$wp_version = '5.9-alpha-51881'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.