Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years 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:

Description

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 2 years ago.
#54835.patch (914 bytes) - added by rehanali 2 years ago.
Added patch

Download all attachments as: .zip

Change History (6)

@thelovekesh
2 years ago

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


2 years ago
#1

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

Trac ticket: https://core.trac.wordpress.org/ticket/54835

#2 @davidbaumwald
2 years ago

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

@rehanali
2 years ago

Added patch

#3 @davidbaumwald
2 years 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:


2 years ago
#4

Thanks for the ticket and PR! This was merged into core in https://core.trac.wordpress.org/changeset/52660.

Note: See TracTickets for help on using tickets.