__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* Single Product Image
*
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/product-image.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 9.7.0
*/
use Automattic\WooCommerce\Enums\ProductType;
defined( 'ABSPATH' ) || exit;
// Note: `wc_get_gallery_image_html` was added in WC 3.3.2 and did not exist prior. This check protects against theme overrides being used on older versions of WC.
if ( ! function_exists( 'wc_get_gallery_image_html' ) ) {
return;
}
global $product;
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 4 );
$post_thumbnail_id = $product->get_image_id();
$wrapper_classes = apply_filters(
'woocommerce_single_product_image_gallery_classes',
array(
'woocommerce-product-gallery',
'woocommerce-product-gallery--' . ( $post_thumbnail_id ? 'with-images' : 'without-images' ),
'woocommerce-product-gallery--columns-' . absint( $columns ),
'images',
)
);
?>
<div class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>" style="opacity: 0; transition: opacity .25s ease-in-out;">
<div class="woocommerce-product-gallery__wrapper">
<?php
if ( $post_thumbnail_id ) {
$html = wc_get_gallery_image_html( $post_thumbnail_id, true );
} else {
$wrapper_classname = $product->is_type( ProductType::VARIABLE ) && ! empty( $product->get_available_variations( 'image' ) ) ?
'woocommerce-product-gallery__image woocommerce-product-gallery__image--placeholder' :
'woocommerce-product-gallery__image--placeholder';
$html = sprintf( '<div class="%s">', esc_attr( $wrapper_classname ) );
$html .= sprintf( '<img src="%s" alt="%s" class="wp-post-image" />', esc_url( wc_placeholder_img_src( 'woocommerce_single' ) ), esc_html__( 'Awaiting product image', 'woocommerce' ) );
$html .= '</div>';
}
echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $post_thumbnail_id ); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
do_action( 'woocommerce_product_thumbnails' );
?>
</div>
</div>
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| add-to-cart | Folder | 0775 |
|
|
| tabs | Folder | 0775 |
|
|
| back-in-stock-form.php | File | 2.56 KB | 0664 |
|
| meta.php | File | 1.58 KB | 0664 |
|
| photoswipe.php | File | 2.4 KB | 0664 |
|
| price.php | File | 861 B | 0664 |
|
| product-attributes.php | File | 1.39 KB | 0664 |
|
| product-image.php | File | 2.56 KB | 0664 |
|
| product-thumbnails.php | File | 1.56 KB | 0664 |
|
| rating.php | File | 1.4 KB | 0664 |
|
| related.php | File | 2.01 KB | 0664 |
|
| review-meta.php | File | 1.59 KB | 0664 |
|
| review-rating.php | File | 930 B | 0664 |
|
| review.php | File | 1.77 KB | 0664 |
|
| sale-flash.php | File | 1.02 KB | 0664 |
|
| share.php | File | 942 B | 0664 |
|
| short-description.php | File | 994 B | 0664 |
|
| stock.php | File | 771 B | 0664 |
|
| title.php | File | 770 B | 0664 |
|
| up-sells.php | File | 1.44 KB | 0664 |
|