WP_Font_Utils::apply_sanitizer
Applies a sanitizer function to a value.
Method of the class: WP_Font_Utils{}
No Hooks.
Returns
Mixed. The sanitized value.
Usage
$result = WP_Font_Utils::apply_sanitizer( $value, $sanitizer );
- $value(mixed) (required)
- The value to sanitize.
- $sanitizer(callable) (required)
- The sanitizer function to apply.
Changelog
| Since 6.5.0 | Introduced. |
WP_Font_Utils::apply_sanitizer() WP Font Utils::apply sanitizer code WP 7.0
private static function apply_sanitizer( $value, $sanitizer ) {
if ( null === $sanitizer ) {
return $value;
}
return call_user_func( $sanitizer, $value );
}