HEX
Server: Apache/2.4.57 (Debian)
System: Linux web-server-k8s-e92jnr3j-6f99bff6b6-rp2wg 6.1.0-22-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21) x86_64
User: apache (48)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/sites/1250.info/wp-content/themes/savoy/woocommerce/single-product/product-image.php
<?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://docs.woocommerce.com/document/template-structure/
 * @package WooCommerce/Templates
 * @version 3.5.1
 NM: Modified */

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, $nm_globals, $nm_theme_options, $nm_single_product_gallery_classes;

$nm_single_product_gallery_classes = array();

// Lightbox
if ( get_theme_support( 'wc-product-gallery-lightbox' ) ) {
    $nm_single_product_gallery_classes[] = 'lightbox-enabled';
}

// Zoom
//if ( $nm_globals['product_layout'] != 'scrolling' && $nm_globals['product_image_hover_zoom'] ) {
if ( $nm_globals['product_image_hover_zoom'] ) {
    $nm_single_product_gallery_classes[] = 'zoom-enabled';
}

// Pagination
if ( $nm_theme_options['product_image_pagination'] ) {
    $nm_single_product_gallery_classes[] = 'pagination-enabled';
}

// Featured video
$featured_video_url = get_post_meta( $product->get_id(), 'nm_featured_product_video', true );
$has_featured_video = ( empty( $featured_video_url ) ) ? false : true;
if ( $has_featured_video ) {
	$nm_single_product_gallery_classes[] = 'has-featured-video';
}

// Gallery wrapper classes
add_filter( 'woocommerce_single_product_image_gallery_classes', function( $wrapper_classes ) {
    global $nm_single_product_gallery_classes;
    $wrapper_classes = array_merge( $wrapper_classes, $nm_single_product_gallery_classes );
    return $wrapper_classes;
} );

$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;">
	<?php woocommerce_show_product_sale_flash(); ?>
    
    <figure class="woocommerce-product-gallery__wrapper">
		<?php
        if ( $post_thumbnail_id ) {
			$html = wc_get_gallery_image_html( $post_thumbnail_id, true );
		} else {
			$html  = '<div class="woocommerce-product-gallery__image--placeholder">';
			$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' );
		?>
	</figure>
    
    <?php if ( $has_featured_video ) : ?>
    <a href="#" id="nm-featured-video-link" class="nm-featured-video-link" data-mfp-src="<?php echo esc_url( $featured_video_url ); ?>">
        <span class="nm-featured-video-icon nm-font nm-font-media-play"></span>
        <span class="nm-featured-video-label"><?php esc_html_e( 'Watch Video', 'nm-framework' ); ?></span>
    </a>
    <?php endif; ?>
</div>