#59761 closed enhancement (fixed)
download_url DocBloc suggests to use unlink() over wp_delete_file()
Reported by: | bedas | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | 6.4 |
Component: | HTTP API | Keywords: | has-patch |
Focuses: | docs, coding-standards | Cc: |
Description
The DocBloc of https://developer.wordpress.org/reference/functions/download_url/ suggests to unlink() the file, while according WPCS we should wp_delete_file().
This trac merely is to update the docbloc
Change History (5)
This ticket was mentioned in PR #5586 on WordPress/wordpress-develop by @bedas.
11 months ago
#1
- Adds reference to wp_delete_file() instead of unlink()
#2
@
11 months ago
Hi there, thanks for the ticket!
Depending on the context, it looks like moving the temporary file to another location might also be common here, so instead of mentioning unlink()
or wp_delete_file()
specifically, perhaps the DocBlock could just state that the calling function must delete or move the file.
Note: See
TracTickets for help on using
tickets.