mainwp_module_log_filter_var()
mainwp_module_log_filter_var(string $var_value, integer $filter = null, mixed $options = array()) : \Returns
Filters a variable with a specified filter.
This is a polyfill function intended to be used in place of PHP's filter_var() function, which can occasionally be unreliable.
Parameters
string | $var_value | Value to filter. |
integer | $filter | The ID of the filter to apply. |
mixed | $options | Associative array of options or bitwise disjunction of flags. If filter accepts options, flags can be provided in "flags" field of array. For the "callback" filter, callable type should be passed. The callback must accept one argument, the value to be filtered, and return the value after filtering/sanitizing it. |
Returns
\Returns —the filtered data, or FALSE if the filter fails.