usces_filter_sub_img / フィルターフック

usces_the_itemImage() で出力されるサブ画像を書き換える

説明

usces_the_itemImage() で出力されるサブ画像を書き換えます。

使い方

add_filter( 'usces_filter_sub_img', 'my_filter_sub_img', 10, 5 );
function my_filter_sub_img( $html, $post_id, $pictid, $width, $height ) {
    //処理
    return $html;
}

パラメータ

$html
(HTML)wp_get_attachment_image() で出力されるサブ画像のHTML文字列
$post_id
(数値)商品の投稿ID
$pictid
(数値)画像の投稿ID
$width
(数値)商品画像を出力時の幅を決める。初期値は 60(60px)。
$height
(数値)商品画像を出力時の高さを決める。初期値は 60(60px)。

用例

ソースファイル

usc-e-shop/functions/template_func.php

関連資料