Make WordPress Core

Opened 17 months ago

Closed 16 months ago

Last modified 16 months ago

#54835 closed enhancement (fixed)

Docs: Update comments for the post_meta functions

Reported by: thelovekesh's profile thelovekesh Owned by: davidbaumwald's profile davidbaumwald
Milestone: 6.0 Priority: normal
Severity: normal Version: 5.9
Component: Options, Meta APIs Keywords: has-patch
Focuses: docs Cc:


Inline code comment for update_post_meta and delete_post_meta were same as add_post_meta when checking for the wp_is_post_revision.

Attachments (2)

54835.diff (956 bytes) - added by thelovekesh 17 months ago.
#54835.patch (914 bytes) - added by rehanali 16 months ago.
Added patch

Download all attachments as: .zip

Change History (6)

17 months ago

This ticket was mentioned in PR #2177 on WordPress/wordpress-develop by thelovekesh.

17 months ago

  • During checking wp_is_post_revision all post_meta functions have the same inline comment that matched add_post_meta comment.

Trac ticket:

#2 @davidbaumwald
17 months ago

  • Milestone changed from Awaiting Review to 6.0
  • Owner set to davidbaumwald
  • Status changed from new to reviewing

16 months ago

Added patch

#3 @davidbaumwald
16 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 52660:

Options, Meta APIs: Correct some inline docs for update_post_meta and delete_post_meta.

In update_post_meta and delete_post_meta, code was added to fetch the parent post if these functions were called for a revision post ID. In [9252], the code was apparently copied from add_post_meta, and the inline comment describing the new block of code was not updated to mention either "updated" or "deleted" respectively. This change corrects the comment in both functions to reflect the current action instead of "added".

Props thelovekesh, rehanali.
Fixes #54835.

dream-encode commented on PR #2177:

16 months ago

Thanks for the ticket and PR! This was merged into core in

Note: See TracTickets for help on using tickets.