Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
$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' ) );
'zoom_enabled' => apply_filters( 'woocommerce_single_product_zoom_enabled', get_theme_support( 'wc-product-gallery-zoom' ) ), 'zoom_options' => apply_filters( 'woocommerce_single_product_zoom_options', array() ), 'photoswipe_enabled' => apply_filters( 'woocommerce_single_product_photoswipe_enabled', get_theme_support( 'wc-product-gallery-lightbox' ) ), 'photoswipe_options' => apply_filters(
remove_theme_support( 'wc-product-gallery-zoom' );
woocommerce_single_product_zoom_options
add_filter( 'woocommerce_single_product_zoom_options', 'change_wooc_zoom_options' ); function change_wooc_zoom_options($array) { var_dump($array); exit; //return $array; }
role="presentation"
img.setAttribute('role', 'presentation');
$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' ) ); var_dump($html);
img = document.createElement('img'), $img = $(img),
единственный выход - это копировать файл jquery.zoom.js, заново его подключать и изменять ?
наименьшим из зол будет просто в вашем custom.js просто убрать.
$(document).ready(function() { $('.zoomImg').attr('role', 'lightbox'); });
add_action('wp_enqueue_scripts', 'add_custom_script'); function add_custom_script(){ wp_enqueue_script( 'custom', get_template_directory_uri() . '/js/custom.js'); }
wp_enqueue_script( 'custom', get_template_directory_uri() . '/js/custom.js');