HUSKY - Products Filter Professional for WooCommerce

woof_html_types_view_mselect

woof_html_types_view_mselect

允许为多选(multiple select)重写显示模板。

参数

$html (string) — HTML 模板, $term_data (array) — 术语数据

源文件

views/html_types/mselect.php

代码示例

add_filter('woof_html_types_view_mselect', function($html, $term_data) {
    // Add a placeholder option to multi-select
    $placeholder = '';
    return $placeholder . $html;
}, 10, 2);

使用说明

  • 将此代码添加到您的主题的 functions.php 文件或自定义插件中。
  • 此钩子在过滤过程中应用 — 更改会立即生效。
  • 始终从回调函数返回预期值类型。