HUSKY - Product Filter for WooCommerce

woof_front_builder_option

Filters the value of an individual front builder option after it has been loaded from the database, allowing runtime modification of option values.

Parameters

$value (mixed) — The current value of the front builder option loaded from the database

$field (string) — The field key/name of the option being filtered

Source File

ext/front_builder/classes/options.php:94

Code Example


add_filter('woof_front_builder_option', function($value, $field) {
    if ('max_posts' === $field) {
        return min($value, 50);
    }
    return $value;
}, 10, 2);

Usage Notes

  • Each option is defined in options.php with a 'field' key that is passed as the second parameter.
  • Only runs when the option's field key exists in the database-stored options data.
  • Part of the Front Builder extension for managing widget-style filter layouts.