Changes between Initial Version and Version 1 of Ticket #761, comment 13
- Timestamp:
- 09/26/2012 10:58:04 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #761, comment 13
initial v1 12 12 The only risk I see for breaking existing compatibility would be if someone was calling `wp_notify_postauthor()` directly and not expecting `get_option('comments_notify')` and comment_approved checks to be performed. They can bypass those using the newly introduced 'wp_notify_postauthor' hook and do a `__return_true`. 13 13 14 Additionally, the patch does change `wp_set_comment_status()` such that the call to `wp_notify_postauthor()` happens after the `$wpdb->update()`. This ensures that the comment is in the approved state prior to `wp_notify_postauthor()` acts on the comment, and also prevents the notification from being triggered if the update fails for some reason .14 Additionally, the patch does change `wp_set_comment_status()` such that the call to `wp_notify_postauthor()` happens after the `$wpdb->update()`. This ensures that the comment is in the approved state prior to `wp_notify_postauthor()` acts on the comment, and also prevents the notification from being triggered if the update fails for some reason (prior to this patch, the notification gets sent before the update is attempted). 15 15 16 16 Tangentially, the `$comment_type` argument to `wp_notify_postauthor()` is superfluous, but I'll open a separate ticket to address that.