woocommerce/templates/global/breadcrumb.php

40 lines
789 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;
}
?>
<?php if ( $breadcrumb ) : ?>
2011-12-12 11:35:54 +00:00
<?php echo $wrap_before; ?>
<?php foreach ( $breadcrumb as $key => $crumb ) : ?>
2012-08-14 18:05:45 +00:00
<?php echo $before; ?>
2012-08-14 18:05:45 +00:00
<?php if ( ! empty( $crumb[1] ) && sizeof( $breadcrumb ) !== $key + 1 ) : ?>
<?php echo '<a href="' . esc_url( $crumb[1] ) . '">' . esc_html( $crumb[0] ) . '</a>'; ?>
<?php else : ?>
<?php echo esc_html( $crumb[0] ); ?>
<?php endif; ?>
2012-08-14 18:05:45 +00:00
<?php echo $after; ?>
2012-08-14 18:05:45 +00:00
<?php if ( sizeof( $breadcrumb ) !== $key + 1 ) : ?>
<?php echo $delimiter; ?>
<?php endif; ?>
2013-04-08 19:10:55 +00:00
<?php endforeach; ?>
2012-11-27 16:22:47 +00:00
<?php echo $wrap_after; ?>
2012-11-27 16:22:47 +00:00
<?php endif; ?>