Wordpress inserting comments via wp_insert_comment()
- by Cyber Junkie
Hello all happy holidays! :)
I'm trying to insert comments in my wordpress blog via the wp_insert_comment() function. It's for a plugin I'm trying to make.
I have this code in my header for testing. It works every time I refresh the page.
$agent = $_SERVER['HTTP_USER_AGENT'];
$data = array(
'comment_post_ID' => 256,
…