mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-11 08:04:32 +00:00
Comments: Allow wp_update_comment() to return WP_Error().
The `wp_update_comment_data` filter introduced in 4.7 allows comment data to be filtered before it is updated in the database. The patch aims to handle `WP_Error` as the filter above return value in a similar manner as is done for `wp_new_comment()`. Fixes #39732. Props: enricosorcinelli, swissspidy, gkloveweb, jnylen0, jbpaul17, afercia, SergeyBiryukov, audrasjb, imath, davidbaumwald. git-svn-id: https://develop.svn.wordpress.org/trunk@48154 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -92,7 +92,7 @@ function edit_comment() {
|
||||
$_POST['comment_date'] = "$aa-$mm-$jj $hh:$mn:$ss";
|
||||
}
|
||||
|
||||
wp_update_comment( $_POST );
|
||||
return wp_update_comment( $_POST, true );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user