This is a difficult one. GF defines this function to only have 2 args ($filter
and $value
), which is reflected in the stub.
For the time being, I have modified the stubs installed for one my GF addon plugins that calls gf_apply_filters()
as be follows:
/**
* Gravity Forms pre-processing for apply_filters
*
* Allows additional filters based on form and field ID to be defined easily.
*
* @since Unknown
* @access public
*
* @param string|array $filter The name of the filter.
* @param mixed $value The value to filter.
* @param mixed ...$additional_args Additional arguments.
*
* @return mixed The filtered value.
*/
function gf_apply_filters($filter, $value, ...$additional_args)
{
}
I'm sure it would be too much trouble for you to manually modify the generated stubs that you generate every time a new version of GF is released. But I just wanted to open this issue to raise the possibility.