woof_html_types_view_radio
woof_html_types_view_radio
Позволяет переопределить шаблон отображения для radio-типа фильтра.
Parameters
$html (string) — HTML шаблона, $term_data (array) — данные термина
Source File
views/html_types/radio.php
Code Example
add_filter('woof_html_types_view_radio', function($html, $term_data) {
// Style radio buttons as beautiful chips/pills
$custom = '';
$custom .= $html;
$custom .= '';
return $custom;
}, 10, 2);
Usage Notes
- Add this code to your theme's
functions.phpfile or a custom plugin. - The hook is applied during the filtering process — changes take effect immediately.
- Always return the expected value type from the callback function.