apply_filters( 'wp_unique_filename', string $filename, string $ext, string $dir, callable|null $unique_filename_callback )

Filters the result when generating a unique file name.

Parameters Parameters


(string) Unique file name.


(string) File extension, eg. ".png".


(string) Directory path.


(callable|null) Callback function that generates the unique file name.

Top ↑

Source Source

File: wp-includes/functions.php

View on Trac

Top ↑

Changelog Changelog

Version Description
4.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.