You appear to be a bot. Output may be restricted
Description
Display descriptions in main navigation.
Usage
$string = twentyfifteen_nav_description( $item_output, $item, $depth, $args );
Parameters
- $item_output
- ( string ) required – The menu item's starting HTML output.
- $item
- ( WP_Post ) required – Menu item data object.
- $depth
- ( int ) required – Depth of the menu. Used for padding.
- $args
- ( stdClass ) required – An object of wp_nav_menu() arguments.
Returns
string Menu item with possible description.
Source
File name: twentyfifteen/functions.php
Lines:
1 to 7 of 7
function twentyfifteen_nav_description( $item_output, $item, $depth, $args ) { if ( 'primary' === $args->theme_location && $item->description ) { $item_output = str_replace( $args->link_after . '</a>', '<div class="menu-item-description">' . $item->description . '</div>' . $args->link_after . '</a>', $item_output ); } return $item_output; }