[wp-trac] [WordPress Trac] #16365: Comment transition for new comments

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 16 10:13:25 UTC 2011


#16365: Comment transition for new comments
------------------------------------+-----------------------------
 Reporter:  MattyRob                |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Comments                |     Version:  3.1
 Severity:  minor                   |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------------
Changes (by MattyRob):

 * keywords:  has-patch => has-patch dev-feedback
 * severity:  normal => minor


Comment:

 Replying to [comment:8 nacin]:
 > So here's why I said maybe regarding 3.3, and definite no regarding 3.2:
 I'm not sure I like it. wp_transition_comment_status() is for
 transitioning a comment status from one to another, not for the comment
 creation to begin with. This might cause backwards compatibility issues
 due to the generic hooks in wp_transition_comment_status(). It should
 possibly be a new hook.

 I've been thinking about this. Compare and contrast the
 [http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php#L2981,
 wp_transition_post_status()] function with the
 [http://core.trac.wordpress.org/browser/trunk/wp-
 includes/comment.php#L1153, wp_transition_comment_status()] function.

 Apart from some code that renames some instances of comment statuses that
 are inconsistently implemented through the code (like approved being the
 same a 1 and unapproved being the same as 0 and hold) the do_action hook
 calls are all virtually identical to the post transition calls.

 I have had this patch running on my 3.1.3 main site for the last 3 weeks.
 I've had over 100 comments made in this time - mainly spam but some
 genuine comments and also pingbacks. I have seen no unusual behaviours or
 issues that would lead me to think there are compatibility issues with
 other hooks but can you give me any indication as to what I could or
 should look for?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16365#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list