Opened 6 years ago
Closed 6 years ago
#51481 closed defect (bug) (fixed)
Inline doc for `wp_set_comment_status` hook is wrong
| Reported by: | henry.wright | Owned by: | davidbaumwald |
|---|---|---|---|
| Priority: | low | Milestone: | 5.6 |
| Component: | Comments | Version: | 5.6 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.