Validates a file against and allowed set of defined rules.
<?php validate_file( $file, $allowed_files ); ?>
- (string) (required) The file path.
- Default: None
- (array) (optional) An array of allowed files
- Default: null
- The cleaned $url after the 'cleaned_url' filter is applied.
validate_file() is located in
See the Data Validation article for an in-depth discussion of input and output sanitization.