Changes between Initial Version and Version 1 of Ticket #39732, comment 35
- Timestamp:
- 01/23/2020 10:05:03 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #39732, comment 35
initial v1 3 3 I've updated the patch to current trunk and made the following edits in [https://core.trac.wordpress.org/attachment/ticket/39732/39732.9.patch 39732.9.patch] 4 4 5 1. I think it's safer to return what was used before if the `$wp_error` argument is true. That is to say `0`.5 1. I think it's safer to return what was used before if the `$wp_error` argument is false. That is to say `0`. 6 6 2. I've edited what was done for the `'wp_update_comment_data'` as I believe the WP_Error object never makes its way there as it is returned, so we must keep the comment `$data` unchanged. I believe it is better to pass the `$wp_error` argument to inform the plugin what type of return is expected if it's needed to stop the update process. 7 7 3. I believe it's wrong to return an error if the comment data has not changed because it prevents the comment meta update. So I removed the code you added after the `$wpdb->update()` part.