Filters the result when generating a unique file name.
$filenamestring$extstring$dirstring$unique_filename_callbackcallable|null$alt_filenamesstring[]$numberint|stringwp-includes/functions.php:2809wp_unique_filename() * @param string $dir Directory path. * @param callable|null $unique_filename_callback Callback function that generates the unique file name. * @param string[] $alt_filenames Array of alternate file names that were checked for collisions. * @param int|string $number The highest number that was used to make the file name unique * or an empty string if unused. */ return apply_filters( 'wp_unique_filename', $filename, $ext, $dir, $unique_filename_callback, $alt_filenames, $number );} /** * Helper function to test if each of an array of file names could conflict with existing files. * * @since 5.8.1Introduced in 4.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.