[wp-trac] [WordPress Trac] #51481: Inline doc for `wp_set_comment_status` hook is wrong

WordPress Trac noreply at wordpress.org
Thu Oct 8 15:39:22 UTC 2020


#51481: Inline doc for `wp_set_comment_status` hook is wrong
--------------------------+------------------------------
 Reporter:  henry.wright  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Comments      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  docs
--------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => needs-patch


Comment:

 Thanks for the ticket!

 Looking at the code, this appears to refer to
 `wp_transition_comment_status()` [source:tags/5.5.1/src/wp-
 includes/comment.php?marks=2412#L2398 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51481#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list