Opened 14 months ago
Closed 11 months ago
#20311 closed enhancement (invalid)
Docblock error for wp_unique_filename
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Inline Docs | Version: | 3.4 |
| Severity: | trivial | Keywords: | has-patch |
| Cc: | joachim.kudish@… |
Description
The current docblock for wp_unique_filename inaccurately describes the third parameter passed to this function
Attachments (2)
Change History (8)
- Component changed from General to Inline Docs
- Keywords needs-refresh added
A note: patches should be made from root.
- Cc joachim.kudish@… added
- Keywords needs-refresh removed
- Severity changed from normal to trivial
Amended transom's initial patch with the right format :)
comment:4
SergeyBiryukov — 14 months ago
- Keywords commit added
comment:5
SergeyBiryukov — 11 months ago
- Milestone changed from Awaiting Review to 3.5
- Keywords commit removed
- Milestone 3.5 deleted
- Resolution set to invalid
- Status changed from new to closed
The documentation itself appears wrong.
* The callback is passed three parameters, the first one is the directory, the * second is the filename, and the third is an optional supplied callback * to generate a unique filename.
This paragraph is not talking about the function, whose third argument is indeed the optional supplied callback. This is talking about how the supplied callback gets called. As you can see, the third argument is indeed the extension:
call_user_func( $unique_filename_callback, $dir, $name, $ext );
Note: See
TracTickets for help on using
tickets.

Update docblock for wp_unique_filename