[wp-hackers] Modifying wp-comments-post.php to accept new custom
mlrichard at gmail.com
Wed Sep 24 20:10:04 GMT 2008
I have yet to implement these suggestions today but I will get back to you
all with my follow-up tomorrow. Thank you for your very specific directions
On Wed, Sep 24, 2008 at 3:41 AM, Peter Westwood
<peter.westwood at ftwr.co.uk>wrote:
> DD32 wrote:
>> Sorry, Seems that filter will be useless, as wp_insert_comment()
>> completely ignores any extra fields which you pass it, So you -will- need to
>> modify core files and add the item to the compact() in wp_insert_comment()
>> too (line 700ish of wp-includes/comment.php)
>> Yeah it does. :-(
> But then it would have to magically guess the field names.
> It looks like we need an action in wp_insert_comment which passes the ID of
> the new comment and the $commentdata to the action handlers so they can do
> things based on that - like add extra info to the database.
> That way you can collect and process the data on pre_process_comment and
> insert it on the new action hook.
> How does that sound?
> Peter Westwood
> http://blog.ftwr.co.uk | http://westi.wordpress.com
> C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers