$comment =
$commentdata;
$comment['user_ip'
] = self::
get_ip_address();
$comment['user_agent'
] = self::
get_user_agent();
$comment['referrer'
] = self::
get_referer();
$comment['blog'
] =
get_option( 'home'
);
$comment['blog_lang'
] =
get_locale();
$comment['blog_charset'
] =
get_option('blog_charset'
);
$comment['permalink'
] =
get_permalink( $comment['comment_post_ID'
] );
if ( !
empty( $comment['user_ID'
] ) ) { $comment['user_role'
] = Akismet::
get_user_roles( $comment['user_ID'
] );
} /** See filter documentation in init_hooks(). */
$akismet_nonce_option =
apply_filters( 'akismet_comment_nonce',
get_option( 'akismet_comment_nonce'
) );
$comment['akismet_comment_nonce'
] = 'inactive';
if ( $akismet_nonce_option == 'true' ||
$akismet_nonce_option == ''
) { $comment['akismet_comment_nonce'
] = 'failed';
if ( isset( $_POST['akismet_comment_nonce'
] ) &&
wp_verify_nonce( $_POST['akismet_comment_nonce'
], 'akismet_comment_nonce_' .
$comment['comment_post_ID'
] ) ) $comment['akismet_comment_nonce'
] = 'passed';
// comment reply in wp-admin