Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/woocommerce/content-widget-product.php

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 + /**
3 + * The template for displaying product widget entries.
4 + *
5 + * This template can be overridden by copying it to yourtheme/woocommerce/content-widget-product.php.
6 + * HOWEVER, on occasion WooCommerce will need to update template files and you
7 + * (the theme developer) will need to copy the new files to your theme to
8 + * maintain compatibility. We try to do this as little as possible, but it does
9 + * happen. When this occurs the version of the template file will be bumped and
10 + * the readme will list any important changes.
11 + *
12 + * @see https://docs.woocommerce.com/document/template-structure/
13 + * @package WooCommerce/Templates
14 + * @version 3.5.5
15 + */
16 +
17 + if ( ! defined( 'ABSPATH' ) ) {
18 + exit;
19 + }
20 +
21 + global $product;
22 +
23 + if ( ! is_a( $product, 'WC_Product' ) ) {
24 + return;
25 + }
26 +
27 + ?>
28 + <li>
29 + <?php do_action( 'woocommerce_widget_product_item_start', $args ); ?>
30 +
31 + <?php
32 +
33 + echo blocksy_media([
34 + 'no_image_type' => 'woo',
35 + 'attachment_id' => $product->get_image_id(),
36 + 'post_id' => $product->get_id(),
37 + 'size' => 'woocommerce_gallery_thumbnail',
38 + 'ratio' => '1/1',
39 + 'tag_name' => 'a',
40 + 'html_atts' => [
41 + 'href' => esc_url( $product->get_permalink() )
42 + ],
43 + ]);
44 +
45 + ?>
46 +
47 + <div class="product-data">
48 + <a href="<?php echo esc_url( $product->get_permalink() ); ?>" class="product-title">
49 + <?php echo wp_kses_post( $product->get_name() ); ?>
50 + </a>
51 +
52 + <?php if ( ! empty( $show_rating ) ) : ?>
53 + <?php echo wc_get_rating_html( $product->get_average_rating() ); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
54 + <?php endif; ?>
55 +
56 + <span class="price">
57 + <?php echo $product->get_price_html(); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
58 + </span>
59 + </div>
60 +
61 + <?php do_action( 'woocommerce_widget_product_item_end', $args ); ?>
62 + </li>
63 +