woocommerce/templates/global/breadcrumb.php

39 lines
619 B
PHP
Raw Normal View History

2011-12-12 11:35:54 +00:00
<?php
/**
2012-08-14 18:05:45 +00:00
* Shop breadcrumb
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.3.0
* @see woocommerce_breadcrumb()
2011-12-12 11:35:54 +00:00
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( $breadcrumb ) {
2011-12-12 11:35:54 +00:00
echo $wrap_before;
foreach ( $breadcrumb as $key => $crumb ) {
2012-08-14 18:05:45 +00:00
echo $before;
2012-08-14 18:05:45 +00:00
if ( ! empty( $crumb[1] ) && sizeof( $breadcrumb ) !== $key + 1 ) {
echo '<a href="' . esc_url( $crumb[1] ) . '">' . esc_html( $crumb[0] ) . '</a>';
} else {
echo esc_html( $crumb[0] );
}
2012-08-14 18:05:45 +00:00
echo $after;
2012-08-14 18:05:45 +00:00
if ( sizeof( $breadcrumb ) !== $key + 1 ) {
echo $delimiter;
}
2013-04-08 19:10:55 +00:00
}
2012-11-27 16:22:47 +00:00
echo $wrap_after;
2012-11-27 16:22:47 +00:00
}