woof_modify_settings_before_action
Filters the entire plugin settings array before the filter shortcode renders, allowing dynamic per-instance modification of all filter settings.
Parameters
$settings (array) — The complete woof_settings array loaded from the database
$atts (array) — The shortcode attributes array passed to the [woof] shortcode
Source File
index.php:3024
Code Example
add_filter('woof_modify_settings_before_action', function($settings, $atts) {
// Force a specific view type for a taxonomy for this instance
if (isset($atts['force_view'])) {
$settings['tax_type']['pa_color'] = $atts['force_view'];
}
return $settings;
}, 10, 2);
Usage Notes
- Use with great care — modifications affect the current filter instance only while the shortcode renders.
- Original settings are restored after rendering via $genuine_settings.
- Bypasses normal settings entirely; only use when you need per-instance overrides.