Instead of just passing the $value through the sanitize function, we are now passing $original_value and then setting a value for $new_value within the function.
This helps in situations where you might need to alter the original value in a custom callback and not work with just the new value that might not be sanitized properly.
Example: if we're getting a French date, and it's already sanitized then we're left with a null value. Instead we need to sanitize the original value properly and set the new value that way.
Instead of just passing the
$value
through the sanitize function, we are now passing$original_value
and then setting a value for$new_value
within the function.This helps in situations where you might need to alter the original value in a custom callback and not work with just the new value that might not be sanitized properly.
Example: if we're getting a French date, and it's already sanitized then we're left with a null value. Instead we need to sanitize the original value properly and set the new value that way.