- Timestamp:
- 10/02/2021 05:04:52 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/inc/menu-functions.php
r51304 r51881 88 88 */ 89 89 function twenty_twenty_one_add_menu_description_args( $args, $item, $depth ) { 90 $args->link_after = ''; 90 if ( '</span>' !== $args->link_after ) { 91 $args->link_after = ''; 92 } 93 91 94 if ( 0 === $depth && isset( $item->description ) && $item->description ) { 92 95 // The extra <span> element is here for styling purposes: Allows the description to not be underlined on hover. 93 96 $args->link_after = '<p class="menu-item-description"><span>' . $item->description . '</span></p>'; 94 97 } 98 95 99 return $args; 96 100 }
Note: See TracChangeset
for help on using the changeset viewer.