[wp-trac] Re: [WordPress Trac] #8863: wp_set_comment_status action
is not raised
WordPress Trac
wp-trac at lists.automattic.com
Mon Apr 27 20:54:37 GMT 2009
#8863: wp_set_comment_status action is not raised
--------------------------+-------------------------------------------------
Reporter: Jehan | Owner: Jehan
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 2.7.2
Component: Comments | Version: 2.7
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+-------------------------------------------------
Changes (by josephscott):
* keywords: => has-patch
* status: closed => reopened
* resolution: fixed =>
Comment:
I've confirmed that this is a problem -trunk. Even though
wp_transition_comment_status() was being called, the new and old status
that were being passed to it were always the same when using the comment
edit form. wp_transition_comment_status() checks and only fires off the
actions if they are different. Since they are always the same when using
the comment edit form the comment status change actions never fired.
A simple patch has been added to this ticket that tracks the status passed
to wp_update_comment() and the current status for the comment that is
pulled from the database, then uses those when calling
wp_transition_comment_status(). This ensures that if the status was
changed the correct values are used and the transition actions fire.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/8863#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list