Files
wc-bootstrap/templates/brands/shortcodes/single-brand.html.twig

25 lines
748 B
Twig
Raw Normal View History

{#
# 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>