woof_taxonomy_type_objects_front_render
Filters whether a taxonomy type object should render as the current filter type and allows passing modified arguments, supporting custom taxonomy rendering extensions.
Parameters
$is (bool) — Boolean indicating whether the current object's html_type matches the configured taxonomy type
$html_type (string) — The html_type key of the current taxonomy type extension object being checked
$tax_type (string) — The configured taxonomy type for the current taxonomy (e.g. 'radio', 'checkbox', 'select')
$args (array) — The rendering arguments array including woof_settings, taxonomies_info, and other template data
Source File
views/woof.php:291
Code Example
add_filter('woof_taxonomy_type_objects_front_render', function($is, $html_type, $tax_type, $args) {
// Force a custom renderer for a specific taxonomy
if ('my_custom_tax' === $html_type) {
return array(
'is' => true,
'args' => array_merge($args, array('custom_data' => 'value'))
);
}
return $is;
}, 10, 4);
Usage Notes
- When the filter returns an array with 'args' key, those args overwrite the existing $args variable for subsequent rendering.
- When 'is' returns true (and not overridden), the extension's html_type view is rendered.
- If no taxonomy type extension matches, the default radio view is used as fallback.