$value =
$new_instance[ $field ];
/*
* Workaround for rest_validate_value_from_schema() due to the fact that
* rest_is_boolean( '' ) === false, while rest_is_boolean( '1' ) is true.
*/
if ( 'boolean' ===
$field_schema['type'
] && '' ===
$value ) { $value = false;
} if ( true !==
rest_validate_value_from_schema( $value,
$field_schema,
$field ) ) { continue;
} $value =
rest_sanitize_value_from_schema( $value,
$field_schema );
// @codeCoverageIgnoreStart
if ( is_wp_error( $value ) ) { continue; // Handle case when rest_sanitize_value_from_schema() ever returns WP_Error as its phpdoc @return tag indicates.
} // @codeCoverageIgnoreEnd