#62803 closed defect (bug) (fixed)
Fix update_attached_file return type comment
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | minor | Version: | trunk |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | docs, coding-standards | Cc: |
Description
The current return type comment of update_attached_file
is inaccurate. It only has the correct return type when the post meta is deleted. But doesn't take into consideration when the post meta is updated.
Proposed new comment:
/** * Updates attachment file path based on attachment ID. * * Used to update the file path of the attachment, which uses post meta name * '_wp_attached_file' to store the path of the attachment. * * @since 2.1.0 * * @param int $attachment_id Attachment ID. * @param string $file File path for the attachment. * @return int|bool Meta ID if the key didn't exist, true on success, * false on failure or if the value passed to the function * is the same as the one that is already in the database. */ function update_attached_file( $attachment_id, $file ) {
Attachments (1)
Change History (5)
#1
@
5 weeks ago
- Component changed from General to Posts, Post Types
- Focuses docs added
- Milestone changed from Awaiting Review to 6.8
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
Note: See
TracTickets for help on using
tickets.
Patch file with updated comments