woof_ext_custom_title_stock_quantity
管理者フィルタータイトル一覧とフロントエンド表示テンプレートの両方で表示される「在庫数量スライダー」フィルターのラベルテキストをカスタマイズできます。
パラメーター
$label (string) — 既定の翻訳済みラベル文字列で、通常は 'Stock quantity slider' または 'Stock Quantity' です。
ソースファイル
ext/stock_quantity/index.php:62
ext/stock_quantity/views/woof.php:107
コード例
add_filter('woof_ext_custom_title_stock_quantity', function($label) {
return __('Inventory Level', 'my-theme');
});
使用上の注意
- 2つの場所で適用されます:index.phpのadd_titles()メソッド(woof_get_all_filter_titlesにフック)、およびviews/woof.php(フロントエンド表示用)。
- デフォルト値は呼び出し場所によって若干異なります:'Stock quantity slider' と 'Stock Quantity'。
- index.phpからの結果は、さらにWOOF_HELPER::wpml_translate()を通過します。