| Server IP : 149.28.60.191 / Your IP : 216.73.217.128 Web Server : nginx/1.31.1 System : Linux vultr.guest 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : mda ( ) PHP Version : 7.4.33 Disable Function : getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,shell_exec,dl,exec,system,highlight_file,source,show_source,fpassthru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_open,proc_close,proc_nice,proc_terminate,escapeshellcmd,ini_alter,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,symlink,posix_geteuid,ini_alter,socket_listen,socket_create_listen,socket_read,socket_create_pair,stream_socket_server MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/mda/webapps/mda-restore/wp-content/themes/Avada/templates/ |
Upload File : |
<?php
/**
* WooCommerce thumbnail template (classic mode).
*
* @author ThemeFusion
* @copyright (c) Copyright by ThemeFusion
* @link https://theme-fusion.com
* @package Avada
* @subpackage Core
* @since 5.1.0
*/
global $product;
$id = get_the_ID(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride
$is_product = class_exists( 'WooCommerce' ) && 'product' === get_post_type();
$size = 'full';
if ( true === $is_product ) {
$in_cart = fusion_library()->woocommerce->is_product_in_cart( $id );
$size = 'shop_catalog';
}
$first_image_id = '';
$attachment_image = '';
if ( true === $is_product && Avada()->settings->get( 'woocommerce_disable_crossfade_effect' ) ) {
$gallery = get_post_meta( $id, '_product_image_gallery', true );
if ( ! empty( $gallery ) ) {
$gallery = explode( ',', $gallery );
$first_image_id = $gallery[0];
}
} else {
$first_image_id = fusion_get_featured_image_id( 'featured-image-2' );
}
if ( $first_image_id ) {
$attachment_image = wp_get_attachment_image(
$first_image_id,
$size,
false,
[
'class' => 'hover-image',
]
);
}
$thumb_image = get_the_post_thumbnail( $id, $size );
if ( ! $thumb_image && function_exists( 'wc_placeholder_img_src' ) && wc_placeholder_img_src() ) {
$thumb_image = wc_placeholder_img( $size );
}
$classes = 'featured-image';
if ( $attachment_image ) {
$classes = 'crossfade-images';
}
?>
<div class="<?php echo esc_attr( $classes ); ?>">
<?php echo $attachment_image; // phpcs:ignore WordPress.Security.EscapeOutput ?>
<?php echo $thumb_image; // phpcs:ignore WordPress.Security.EscapeOutput ?>
<?php if ( true === $is_product ) : ?>
<?php if ( $in_cart ) : ?>
<div class="cart-loading"><i class="awb-icon-check-square-o" aria-hidden="true"></i></div>
<?php else : ?>
<div class="cart-loading"><i class="awb-icon-spinner" aria-hidden="true"></i></div>
<?php endif; ?>
<?php endif; ?>
</div>