function rest_parse_request_arg( $value,
$request,
$param ) { $is_valid =
rest_validate_request_arg( $value,
$request,
$param );
if ( is_wp_error( $is_valid ) ) { return $is_valid;
} $value =
rest_sanitize_request_arg( $value,
$request,
$param );
return $value;
}/**
* Determines if an IP address is valid.
*
* Handles both IPv4 and IPv6 addresses.
*
* @since 4.7.0
*
* @param string $ip IP address.
* @return string|false The valid IP address, otherwise false.
*/