apply_filters( ‘nav_menu_description’, string $description )

In this article

Filters a navigation menu item’s description.

Parameters

$descriptionstring
The menu item description.

Source

$menu_item->description = apply_filters( 'nav_menu_description', wp_trim_words( $menu_item->post_content, 200 ) );

Changelog

VersionDescription
3.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.