WPDev.one
Core Function
View Source on Trac ↗

sanitize_file_name()

sanitize_file_name( mixed $filename )

Sanitizes a filename, replacing whitespace with dashes.

Parameters 1 required

Name / Type Description
$filename
string

The filename to be sanitized.

Required

Return Value

(string)
The sanitized filename.

Function Information

Since Version
2.1.0
Source File
wp-includes/formatting.php
Advertisement