breadcrumb.php
2 years ago
form-login.php
1 year ago
quantity-input.php
3 months ago
sidebar.php
2 years ago
wrapper-end.php
2 years ago
wrapper-start.php
2 years ago
breadcrumb.php
47 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Shop breadcrumb |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/global/breadcrumb.php. |
| 6 | * |
| 7 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 | * (the theme developer) will need to copy the new files to your theme to |
| 9 | * maintain compatibility. We try to do this as little as possible, but it does |
| 10 | * happen. When this occurs the version of the template file will be bumped and |
| 11 | * the readme will list any important changes. |
| 12 | * |
| 13 | * @see https://woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates |
| 15 | * @version 2.3.0 |
| 16 | * @see woocommerce_breadcrumb() |
| 17 | */ |
| 18 | |
| 19 | if ( ! defined( 'ABSPATH' ) ) { |
| 20 | exit; |
| 21 | } |
| 22 | |
| 23 | if ( ! empty( $breadcrumb ) ) { |
| 24 | |
| 25 | echo $wrap_before; |
| 26 | |
| 27 | foreach ( $breadcrumb as $key => $crumb ) { |
| 28 | |
| 29 | echo $before; |
| 30 | |
| 31 | if ( ! empty( $crumb[1] ) && sizeof( $breadcrumb ) !== $key + 1 ) { |
| 32 | echo '<a href="' . esc_url( $crumb[1] ) . '">' . esc_html( $crumb[0] ) . '</a>'; |
| 33 | } else { |
| 34 | echo esc_html( $crumb[0] ); |
| 35 | } |
| 36 | |
| 37 | echo $after; |
| 38 | |
| 39 | if ( sizeof( $breadcrumb ) !== $key + 1 ) { |
| 40 | echo $delimiter; |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | echo $wrap_after; |
| 45 | |
| 46 | } |
| 47 |