AnsPress_Breadcrumbs_Widget::breadcrumbs()
Description #
Output AnsPress breadcrumbs.
Source #
File: widgets/breadcrumbs.php
public static function breadcrumbs() { $navs = self::get_breadcrumbs(); echo '<ul class="ap-breadcrumbs clearfix">'; echo '<li class="ap-breadcrumbs-home"><a href="' . esc_url( home_url( '/' ) ) . '" class="apicon-home"></a></li>'; echo '<li><i class="apicon-chevron-right"></i></li>'; $i = 1; $total_nav = count( $navs ); foreach ( $navs as $k => $nav ) { if ( ! empty( $nav ) ) { echo '<li>'; echo '<a href="' . esc_url( $nav['link'] ) . '">' . esc_attr( $nav['title'] ) . '</a>'; echo '</li>'; if ( $total_nav !== $i ) { echo '<li><i class="apicon-chevron-right"></i></li>'; } } ++$i; } echo '</ul>'; }
Expand full source code Collapse full source code View on GitHub: widgets/breadcrumbs.php:90
Add your comment