sanitize_file_name WordPress Filter Hook
This hook is used to clean up a filename before it is used. This is useful when you want to ensure that a filename is safe to use on a particular system. For example, you may want to remove any characters that are not allowed on a Windows system.
apply_filters( 'sanitize_file_name', string $filename , string $filename_raw ) #
Filters a sanitized filename string.
Parameters
- $filename
(string)Sanitized filename.
- $filename_raw
(string)The filename prior to sanitization.
Source
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |