cart->cart_contents_count, 'bazaar-lite' ), WC()->cart->cart_contents_count ); ?>
"none") ):
do_action('bazaarlite_header_sidebar', bazaarlite_postmeta('wip_header_sidebar'));
endif;
?>
"none") ):
do_action('bazaarlite_header_sidebar', bazaarlite_postmeta('wip_bottom_sidebar'));
endif;
}
add_action('woocommerce_after_main_content', 'bazaarlite_woocommerce_after_main_content', 10);
}
/*-----------------------------------------------------------------------------------*/
/* Replace wc_get_gallery_image_html function */
/*-----------------------------------------------------------------------------------*/
if ( ! function_exists( 'bazaarlite_wc_get_gallery_image_html' ) ) {
function bazaarlite_wc_get_gallery_image_html( $attachment_id, $main_image = false ) {
$flexslider = (bool) apply_filters( 'woocommerce_single_product_flexslider_enabled', get_theme_support( 'wc-product-gallery-slider' ) );
$gallery_thumbnail = wc_get_image_size( 'gallery_thumbnail' );
$thumbnail_size = apply_filters( 'woocommerce_gallery_thumbnail_size', array( $gallery_thumbnail['width'], $gallery_thumbnail['height'] ) );
$image_size = apply_filters( 'woocommerce_gallery_image_size', $flexslider || $main_image ? 'woocommerce_single' : $thumbnail_size );
$full_size = apply_filters( 'woocommerce_gallery_full_size', apply_filters( 'woocommerce_product_thumbnails_large_size', 'full' ) );
$thumbnail_src = wp_get_attachment_image_src( $attachment_id, $thumbnail_size );
$full_src = wp_get_attachment_image_src( $attachment_id, $full_size );
$image = wp_get_attachment_image( $attachment_id, $image_size, false, array(
'title' => get_post_field( 'post_title', $attachment_id ),
'data-caption' => get_post_field( 'post_excerpt', $attachment_id ),
'data-src' => $full_src[0],
'data-large_image' => $full_src[0],
'data-large_image_width' => $full_src[1],
'data-large_image_height' => $full_src[2],
'class' => $main_image ? 'wp-post-image' : '',
) );
return '';
}
}
?>