Applies a sanitizer function to a value.
Parameters
$valuemixedrequired- The value to sanitize.
$sanitizercallablerequired- The sanitizer function to apply.
Source
private static function apply_sanitizer( $value, $sanitizer ) {
if ( null === $sanitizer ) {
return $value;
}
return call_user_func( $sanitizer, $value );
}
Changelog
| Version | Description |
|---|---|
| 6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.