[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
Wed Jan 14 18:57:13 UTC 2015
#14601: wp_new_comment method doesn't allow passed in values for IP and user-agent
---------------------------------+--------------------
Reporter: mrutz | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.2
Component: Comments | Version: 3.0.1
Severity: normal | Resolution:
Keywords: has-patch 3.2-early | Focuses:
---------------------------------+--------------------
Comment (by rachelbaker):
To create comments with the WP REST API, we would like to use
wp_new_comment(). This would allow us to take advantage of the filters,
actions, and notifications already baked into wp_new_comment().
For API use the REMOTE_ADDR attribute would not be reliable or populated,
and will trigger a PHP Notice of Undefined Index.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14601#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list