You appear to be a bot. Output may be restricted
Description
Return the query_string to pass to akismet given the fields in $fields and $_SERVER
Usage
oiku_build_query_string( $fields );
Parameters
- $fields
- ( mixed ) required –
Returns
voidSource
File name: oik-user/shortcodes/oik-contact-user.phpLines:
1 to 27 of 27
function oiku_build_query_string( $fields ) { $form = $_SERVER; $form['blog'] = get_option( 'home' ); $form['user_ip'] = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] ); $form['user_agent'] = $_SERVER['HTTP_USER_AGENT']; $form['referrer'] = $_SERVER['HTTP_REFERER']; $form['permalink'] = get_permalink(); $form['comment_type'] = 'oik-contact-form'; $form['comment_author'] = $fields['contact']; $form['comment_author_email'] = $fields['from']; //$form['comment_author_url'] = $author_url; $form['comment_content'] = $fields['message']; //foreach ( $_SERVER as $k => $value ) { // if ( !in_array( $k, $ignore ) && is_string( $value ) ) { // $form["$k"] = $value; // } //} unset( $form['HTTP_COOKIE'] ); $query_string = http_build_query( $form ); return( $query_string ); }View on GitHub