woof_html_types_view_checkbox
woof_html_types_view_checkbox
允许覆盖复选框类型过滤器的显示模板。用于完整的 HTML 布局自定义。
参数
$html (string) — HTML 模板, $term_data (array) — 术语数据
源文件
views/html_types/checkbox.php
代码示例
add_filter('woof_html_types_view_checkbox', function($html, $term_data) {
// Wrap checkbox in custom HTML structure
$custom_html = '';
return $custom_html;
}, 10, 2);
使用说明
- 将此代码添加到您的主题的
functions.php文件或自定义插件中。 - 该 hook 在过滤过程中应用 — 更改立即生效。
- 始终从回调函数返回预期值类型。