$args { * Optional. Overrides for the Breadcrumbs settings. * * @type bool $echo Print the breadcrumb (default) or only return it. * @type string $separator Text between items. * @type string $home_label Label of the first item. * @type bool $show_current Whether the current page is the last item. * @type bool $hide_on_front Whether to print nothing on the front page. * @type string $class Extra CSS classes for the `nav` element. * } * @return string The HTML when `echo` is false; an empty string when it was printed. */ function elevenrank_breadcrumbs( $args = array() ) { $args = wp_parse_args( $args, array( 'echo' => true ) ); $echo = (bool) $args['echo']; unset( $args['echo'] ); /** * Renders the breadcrumb. Added by the Breadcrumbs module. * * @since 1.0.0 * * @param string $html Breadcrumb HTML; empty until the module fills it. * @param array $args Arguments. */ $html = (string) apply_filters( 'elevenrank_breadcrumbs_render', '', $args ); if ( $echo ) { echo wp_kses( $html, array( 'nav' => array( 'class' => true, 'aria-label' => true, ), 'ol' => array( 'class' => true ), 'ul' => array( 'class' => true ), 'li' => array( 'class' => true, 'aria-current' => true, ), 'a' => array( 'href' => true, 'class' => true, ), 'span' => array( 'class' => true, 'aria-hidden' => true, ), ) ); return ''; } return $html; } }