woof_html_types_view_mselect
woof_html_types_view_mselect
Позволяет переопределить шаблон отображения для мультиселекта (multiple select).
Parameters
$html (string) — HTML шаблона, $term_data (array) — данные термина
Source File
views/html_types/mselect.php
Code Example
add_filter('woof_html_types_view_mselect', function($html, $term_data) {
// Add a placeholder option to multi-select
$placeholder = '';
return $placeholder . $html;
}, 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.