Opened 5 months ago
Closed 5 months ago
#51481 closed defect (bug) (fixed)
Inline doc for `wp_set_comment_status` hook is wrong
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.6 | Priority: | low |
Severity: | normal | Version: | 5.6 |
Component: | Comments | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
Taken from the wp_set_comment_status()
function definition in comment.php
Fires immediately before transitioning a comment's status from one to another in the database.
This is wrong. The database update has already happened when the wp_set_comment_status
hook is fired.
Attachments (1)
Change History (7)
Note: See
TracTickets for help on using
tickets.
Thanks for the ticket!
Looking at the code, this appears to refer to
wp_transition_comment_status()
called immediately after.However,
wp_transition_comment_status()
only calls the related hooks, the database update has indeed already occurred earlier at this point, so the comment should be corrected to clarify that.