woocommerce_gallery_image_html_attachment_image_params хук-фильтрWC 1.0

Использование

add_filter( 'woocommerce_gallery_image_html_attachment_image_params', 'wp_kama_woocommerce_gallery_image_html_attachment_params_filter', 10, 4 );

/**
 * Function for `woocommerce_gallery_image_html_attachment_image_params` filter-hook.
 * 
 * @param  $array         
 * @param  $attachment_id 
 * @param  $image_size    
 * @param  $main_image    
 *
 * @return 
 */
function wp_kama_woocommerce_gallery_image_html_attachment_params_filter( $array, $attachment_id, $image_size, $main_image ){

	// filter...
	return $array;
}
$array
-
$attachment_id
-
$image_size
-
$main_image
-

Где вызывается хук

wc_get_gallery_image_html()
woocommerce_gallery_image_html_attachment_image_params
woocommerce/includes/wc-template-functions.php 1606-1620
apply_filters(
	'woocommerce_gallery_image_html_attachment_image_params',
	array(
		'title'                   => _wp_specialchars( get_post_field( 'post_title', $attachment_id ), ENT_QUOTES, 'UTF-8', true ),
		'data-caption'            => _wp_specialchars( get_post_field( 'post_excerpt', $attachment_id ), ENT_QUOTES, 'UTF-8', true ),
		'data-src'                => esc_url( $full_src[0] ),
		'data-large_image'        => esc_url( $full_src[0] ),
		'data-large_image_width'  => esc_attr( $full_src[1] ),
		'data-large_image_height' => esc_attr( $full_src[2] ),
		'class'                   => esc_attr( $main_image ? 'wp-post-image' : '' ),
	),
	$attachment_id,
	$image_size,
	$main_image
)

Где используется хук в WooCommerce

Использование не найдено.