WordPress at Your Fingertips
filter is not described

wp_unique_filename filter-hook . WP 4.5.0

Filters the result when generating a unique file name.

Usage

add_filter( 'wp_unique_filename', 'filter_function_name_3707', 10, 6 );
function filter_function_name_3707( $filename, $ext, $dir, $unique_filename_callback, $alt_filenames, $number ){
	// filter...

	return $filename;
}
$filename(string)
Unique file name.
$ext(string)
File extension, eg. ".png".
$dir(string)
Directory path.
$unique_filename_callback(callable|null)
Callback function that generates the unique file name.
$alt_filenames(string[])
Array of alternate file names that were checked for collisions.
$number(int|string)
The highest number that was used to make the file name unique or an empty string if unused.

Changelog

Since 5.8.1 The $alt_filenames and $number parameters were added.

Where the hook is called

wp_unique_filename()
wp_unique_filename
wp-includes/functions.php 2690
return apply_filters( 'wp_unique_filename', $filename, $ext, $dir, $unique_filename_callback, $alt_filenames, $number );

Where in WP core the hook is used WordPress

Usage not found.