Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/themify-.../template.../wc/single
File: image.php
<?php
[0] Fix | Delete
themify_product_image_start(); // Hook
[1] Fix | Delete
$product = wc_get_product( get_the_ID() );
[2] Fix | Delete
$attachment_id = $product->get_image_id();
[3] Fix | Delete
$html='';
[4] Fix | Delete
if ( !empty($args['thumb_image_w']) || !empty($args['thumb_image_h']) ) {
[5] Fix | Delete
$GLOBALS['themify']->gallery_thumb_size_w = $args['thumb_image_w'];
[6] Fix | Delete
$GLOBALS['themify']->gallery_thumb_size_h = $args['thumb_image_h'];
[7] Fix | Delete
if(!function_exists('tb_pro_set_image_size_gallery_thumbnail')){
[8] Fix | Delete
function tb_pro_set_image_size_gallery_thumbnail($size){
[9] Fix | Delete
remove_filter( 'woocommerce_gallery_thumbnail_size', 'tb_pro_set_image_size_gallery_thumbnail',99 );
[10] Fix | Delete
return array(
[11] Fix | Delete
empty($GLOBALS['themify']->gallery_thumb_size_w) ? $size['width'] : $GLOBALS['themify']->gallery_thumb_size_w,
[12] Fix | Delete
empty($GLOBALS['themify']->gallery_thumb_size_h) ? $size['height'] : $GLOBALS['themify']->gallery_thumb_size_h,
[13] Fix | Delete
);
[14] Fix | Delete
}
[15] Fix | Delete
}
[16] Fix | Delete
add_filter( 'woocommerce_gallery_thumbnail_size', 'tb_pro_set_image_size_gallery_thumbnail',99 );
[17] Fix | Delete
}
[18] Fix | Delete
if(!empty($attachment_id)){
[19] Fix | Delete
if ( !empty($args['thumb_image_w']) || !empty($args['thumb_image_h']) ) {
[20] Fix | Delete
// Generate the custom thumbnail size form main image
[21] Fix | Delete
TB_Product_Image_Module::get_product_image_thumbnail_html($args,$attachment_id,true);
[22] Fix | Delete
}
[23] Fix | Delete
$html = TB_Product_Image_Module::get_product_image_thumbnail_html($args,$attachment_id);
[24] Fix | Delete
}
[25] Fix | Delete
elseif($args['fallback_s'] === 'yes' && $args['fallback_i'] !== ''){
[26] Fix | Delete
//fallback
[27] Fix | Delete
$full_src = esc_url($args['fallback_i']);
[28] Fix | Delete
if(!Themify_Builder_Model::is_img_php_disabled()){
[29] Fix | Delete
$image = themify_get_image(array(
[30] Fix | Delete
'src'=>$full_src,
[31] Fix | Delete
'w'=>$args['image_w'],
[32] Fix | Delete
'h'=>$args['image_h']
[33] Fix | Delete
));
[34] Fix | Delete
}
[35] Fix | Delete
else{
[36] Fix | Delete
$image = '<img class="wp-post-image" src="' . $full_src . '" width="' . $args['image_w'] . '" height="' . $args['image_h'] . '"/>';
[37] Fix | Delete
}
[38] Fix | Delete
$html='<div class="woocommerce-product-gallery__image">'.$image.'</div>';
[39] Fix | Delete
}
[40] Fix | Delete
$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 4 );
[41] Fix | Delete
$wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_classes', array(
[42] Fix | Delete
'woocommerce-product-gallery',
[43] Fix | Delete
'image-wrap',
[44] Fix | Delete
'woocommerce-product-gallery--' . ( $attachment_id ? 'with-images' : 'without-images' ),
[45] Fix | Delete
'woocommerce-product-gallery--columns-' . absint( $columns ),
[46] Fix | Delete
'images'
[47] Fix | Delete
) );
[48] Fix | Delete
if($args['sale_b'] === 'yes'){
[49] Fix | Delete
Tbp_Utils::loadCssModules('sale_badge',TBP_WC_CSS_MODULES.'sale-badge.css');
[50] Fix | Delete
}
[51] Fix | Delete
Tbp_Utils::loadCssModules('single_product_image',TBP_WC_CSS_MODULES.'single-product-image.css');
[52] Fix | Delete
?>
[53] Fix | Delete
<div class="product <?php echo $args['sale_b'] === 'yes' ? ' sale-badge-' . $args['badge_pos'] : ''; ?>">
[54] Fix | Delete
<?php if ($args['sale_b'] === 'yes'):?>
[55] Fix | Delete
<?php woocommerce_show_product_sale_flash();?>
[56] Fix | Delete
<?php endif; ?>
[57] Fix | Delete
<div class="image-wrap <?php esc_attr_e( implode( ' ', $wrapper_classes ) ); ?>" data-columns="<?php esc_attr_e( $columns ); ?>">
[58] Fix | Delete
<figure class="woocommerce-product-gallery__wrapper">
[59] Fix | Delete
<?php echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', $html, $attachment_id );$html=null; ?>
[60] Fix | Delete
<?php if ( !empty($args['thumb_image_w']) || !empty($args['thumb_image_h']) ): ?>
[61] Fix | Delete
<?php
[62] Fix | Delete
$attachment_ids = $product->get_gallery_image_ids();
[63] Fix | Delete
if ( $attachment_ids && $product->get_image_id() ) {
[64] Fix | Delete
foreach ( $attachment_ids as $attachment_id ) {
[65] Fix | Delete
// Generate custom image thumbnails
[66] Fix | Delete
TB_Product_Image_Module::get_product_image_thumbnail_html($args,$attachment_id,true); // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
[67] Fix | Delete
}
[68] Fix | Delete
}
[69] Fix | Delete
?>
[70] Fix | Delete
<?php endif; ?>
[71] Fix | Delete
<?php do_action( 'woocommerce_product_thumbnails' );?>
[72] Fix | Delete
</figure>
[73] Fix | Delete
</div>
[74] Fix | Delete
</div>
[75] Fix | Delete
<?php
[76] Fix | Delete
if ( !empty($args['thumb_image_w']) || !empty($args['thumb_image_h']) ) {
[77] Fix | Delete
unset($GLOBALS['themify']->gallery_thumb_size_w,$GLOBALS['themify']->gallery_thumb_size_h);
[78] Fix | Delete
remove_filter( 'woocommerce_gallery_thumbnail_size', 'tb_pro_set_image_size_gallery_thumbnail',99 );
[79] Fix | Delete
}
[80] Fix | Delete
themify_product_image_end(); // Hook
[81] Fix | Delete
[82] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function