woof_get_all_filter_titles
Filters the associative array of all filter titles before they are localized to JavaScript, allowing customization of displayed filter names.
Parameters
$options (array) — Associative array where keys are filter slugs (taxonomy names, meta keys, or extension keys) and values are their display titles
Source File
index.php:1358
Code Example
add_filter('woof_get_all_filter_titles', function($titles) {
// Override a taxonomy label
if (isset($titles['pa_color'])) {
$titles['pa_color'] = __('Shade', 'my-theme');
}
return $titles;
});
Usage Notes
- Builds titles from: meta_filter titles, custom_tax_label settings, WPML translations, and taxonomy labels.
- For taxonomy terms with 'NOT IN' comparison logic, a 'rev_' prefixed key is also added.
- The result is used in wp_localize_script as 'woof_filter_titles'.