[wp-trac] [WordPress Trac] #14601: wp_new_comment method doesn't allow passed in values for IP and user-agent

WordPress Trac noreply at wordpress.org
Tue Jun 23 19:13:20 UTC 2015


#14601: wp_new_comment method doesn't allow passed in values for IP and user-agent
--------------------------------+--------------------------
 Reporter:  mrutz               |       Owner:  rachelbaker
     Type:  enhancement         |      Status:  accepted
 Priority:  normal              |   Milestone:  4.3
Component:  Comments            |     Version:  3.0.1
 Severity:  normal              |  Resolution:
 Keywords:  rest-api has-patch  |     Focuses:
--------------------------------+--------------------------

Comment (by rmccue):

 Replying to [comment:28 dd32]:
 > @rachelbaker I'm curious as to this - other than a CLI use-case,
 REMOTE_ADDR should be set correctly, and if not, should be set in the
 bootstrap for the API.. same goes for the user agent..

 If you're programmatically creating comments on behalf of a user (e.g.
 custom commenting system backed by WP), and your requests to the API
 aren't on the client, the IP and UA will refer to the client making the
 request, not the original client.

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


More information about the wp-trac mailing list