rest_sanitize_value_from_schema
rest_sanitize_value_from_schema ( $value, $args, $param = '' )
Parameters:- (mixed) value The value to sanitize.
- (array) args Schema array to use for sanitization.
- (string) param The parameter name, used in error messages.
Returns:- (mixed|WP_Error) The sanitized value or a WP_Error instance if the value cannot be safely sanitized.
Defined at:Change Log: - Introduced in WordPress: 4.7.0
- Deprecated in WordPress: —
Description
Sanitize a value based on a schema.