home_url(), 'blog_lang' => get_locale(), 'blog_charset' => get_option( 'blog_charset' ), 'user_ip' => isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : '', 'user_agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : '', 'referrer' => isset( $_SERVER['HTTP_REFERER'] ) ? esc_url_raw( wp_unslash( $_SERVER['HTTP_REFERER'] ) ) : '', 'comment_type' => 'forum-post', 'comment_author' => $submission['name'], 'comment_author_email' => $submission['email'], 'comment_content' => $submission['title'] . "\n\n" . $submission['description'], ]; // Akismet answers with its response headers and body. The body is "true" for spam. $response = \Akismet::http_post( \Akismet::build_query( $query ), 'comment-check' ); return 'true' === trim( $response[1] ); } }