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.


Top ↑

Source

File: wp-includes/formatting.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More