説明
画像の代替テキスト(alt属性)を書き換えます。
使い方
add_filter( 'usces_filter_img_alt', 'my_filter_img_alt', 10, 5 );
function my_filter_img_alt( $alt, $post_id, $pictid, $width, $height ) {
    //処理
    return $alt;
}
パラメータ
- $alt
 - (文字列)代替テキスト
 - $post_id
 - (数値)商品の投稿ID
 - $pictid
 - (数値)画像の投稿ID
 - $width
 - (数値)商品画像を出力時の幅を決める。初期値は 60(60px)。
 - $height
 - (数値)商品画像を出力時の高さを決める。初期値は 60(60px)。
 
用例
ソースファイル
usc-e-shop/functions/template_func.php
関連資料
- usces_the_itemImage() ・・・ 現在の商品画像を表示する
 - usces_filter_img_title ・・・ 画像のタイトル(title属性)を書き換える
 - usces_filter_main_img ・・・ usces_the_itemImage() で出力されるメイン画像を書き換える
 - usces_filter_sub_img ・・・ usces_the_itemImage() で出力されるサブ画像を書き換える
 
PAGE TOP