woof_html_types_view_checkbox
从版本 2.2.4/1.2.4 开始
使用此钩子可以重写文件视图:\views\html_types\checkbox.php
参数
$html (string) — the template HTML, $term_data (array) — term data
源文件
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文件或自定义插件中。 - 该钩子在筛选过程中应用——更改会立即生效。
- 始终从回调函数中返回预期的值类型。