woof_use_chosen
Controls whether the Chosen jQuery plugin is used for enhancing select dropdown elements, allowing forced enable/disable of the enhanced select UI.
Parameter
$is (bool) — Boolean determined by the select_design option: true if 'chosen' is selected or use_chosen legacy option is 1
Quelldatei
index.php:1969
Codebeispiel
add_filter('woof_use_chosen', function($is) {
// Force Chosen off for performance
return false;
});
Verwendungshinweise
- Considers both the new 'select_design' option and the legacy 'use_chosen' option.
- Returns true only if select_design is 'chosen' OR the old use_chosen is 1 and select_design is not set.
- This is a legacy compatibility hook — newer code uses get_select_type() directly.