You've already forked wc-bootstrap
25 lines
748 B
Twig
25 lines
748 B
Twig
|
|
{#
|
||
|
|
# Single Brand Thumbnail (Bootstrap 5 Override)
|
||
|
|
#
|
||
|
|
# Renders a single brand image link, used by [product_brand] shortcode.
|
||
|
|
#
|
||
|
|
# Expected context:
|
||
|
|
# term - WP_Term object for the brand
|
||
|
|
# thumbnail - URL to brand thumbnail image
|
||
|
|
# class - CSS class for the image
|
||
|
|
# width - Image width
|
||
|
|
# height - Image height
|
||
|
|
#
|
||
|
|
# WooCommerce PHP equivalent: brands/shortcodes/single-brand.php
|
||
|
|
#
|
||
|
|
# @package WcBootstrap
|
||
|
|
# @since 0.1.0
|
||
|
|
#}
|
||
|
|
|
||
|
|
<a href="{{ get_term_link(term, 'product_brand')|esc_url }}" class="d-inline-block">
|
||
|
|
<img src="{{ thumbnail|esc_url }}"
|
||
|
|
alt="{{ term.name|esc_attr }}"
|
||
|
|
class="{{ class|esc_attr }}"
|
||
|
|
style="width: {{ width|esc_attr }}; height: {{ height|esc_attr }};" />
|
||
|
|
</a>
|