[wp-trac] [WordPress Trac] #39732: Allowing wp_update_comment() to return WP_Error

WordPress Trac noreply at wordpress.org
Tue Jun 30 12:01:20 UTC 2020


#39732: Allowing wp_update_comment() to return WP_Error
-------------------------------------------------+-------------------------
 Reporter:  enrico.sorcinelli                    |       Owner:
                                                 |  enrico.sorcinelli
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  5.5
Component:  Comments                             |     Version:  4.8
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note commit                                    |
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 In [changeset:"48230" 48230]:
 {{{
 #!CommitTicketReference repository="" revision="48230"
 Comments: Add a `@since` note to the `wp_update_comment_data` filter about
 returning a `WP_Error` value.

 Remove the ability to short-circuit comment update by returning `false`
 from the filter for now.

 This was inconsistent with the `pre_comment_approved` filter, and should
 not be necessary if a more descriptive reason can be given by always using
 `WP_Error`.

 See #39732.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/39732#comment:55>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list