[wp-trac] [WordPress Trac] #30946: wp_update_comment() can't update the comment_post_ID

WordPress Trac noreply at wordpress.org
Wed Jan 7 23:56:58 UTC 2015


#30946: wp_update_comment() can't update the comment_post_ID
--------------------------+-----------------------------
 Reporter:  tyxla         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:  4.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The current implementation of `wp_update_comment()` does not allow to
 change the `comment_post_ID` - the `ID` of the post that the comment is
 posted to. Even if `comment_post_ID` is passed to the array parameter, it
 is being stripped off the database update query.

 So, the following code:


 {{{
 wp_update_comment(array(
         'comment_ID' => 1,
         'comment_post_ID' => 2,
         'comment_content' => 'test text here',
 ));
 }}}

 will not change the `comment_post_ID` to `2`, even if `2` is a valid post
 `ID`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30946>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list