Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: navigation_widgets_format

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
62
63           /**
64            * Filters the HTML format of widgets with navigation links.
65            *
66            * @since 5.5.0
67            *
68            * @param string $format The type of markup to use in widgets with navigation links.
69            *                       Accepts 'html5', 'xhtml'.
70            */
71           $format = apply_filters( 'navigation_widgets_format', $format );
72
73           if ( 'html5' === $format ) {
74                // The title may be filtered: Strip out HTML and make sure the aria-label is never empty.
75                $title      = trim( strip_tags( $title ) );
76                $aria_label = $title ? $title : $default_title;
77
78                $nav_menu_args = array(
79                     'fallback_cb'          => '',
80                     'menu'                 => $nav_menu,