PHPDoc incorrect with the return value of add_*_meta functions
|Reported by:||mark8barnes||Owned by:||SergeyBiryukov|
|Component:||Options, Meta APIs||Keywords:||has-patch commit|
The PHPDocs for add_comment_meta, add_post_meta and add_user_meta all say that they return true on success. In fact, each calls add_metadata, which returns the metadata_id on success.
In addition, update_metadata currently returns the metadata_id on success if the metadata did not already exist, but true on success if the metadata did already exist (the PHPDoc says simply that it is true on success).
The patch corrects the documentation, and additionally ensures consistency with the return value for update_metadata.
Change History (11)
- Component changed from Inline Docs to Options and Meta
- Focuses docs added
comment:7 DrewAPicture — 2 months ago
- Milestone changed from Awaiting Review to 3.6
- Resolution set to fixed
- Status changed from new to closed
comment:8 SergeyBiryukov — 2 months ago
- Keywords commit added; needs-testing dev-feedback removed
- Milestone changed from 3.6 to 3.9
- Resolution fixed deleted
- Status changed from closed to reopened