A WordPress-centric search engine for devs and theme authors



wp_unique_filename ›

Since4.5.0
Deprecatedn/a
apply_filters( 'wp_unique_filename', $filename2, $ext, $dir, $unique_filename_callback )
Parameters: (4)
  • (string) $filename Unique file name.
    Required: Yes
  • (string) $ext File extension, eg. ".png".
    Required: Yes
  • (string) $dir Directory path.
    Required: Yes
  • (callable|null) $unique_filename_callback Callback function that generates the unique file name.
    Required: Yes
Defined at:
Codex:

Filters the result when generating a unique file name.





Source

return apply_filters( 'wp_unique_filename', $filename2, $ext, $dir, $unique_filename_callback );