src/WPametu/Service/Akismet.php
public static function make_request( array $args = [] ){
		$args = wp_parse_args([
			'blog' => get_option( 'home' ),
			'blog_lang' => get_locale(),
			'blog_charset' => get_option( 'blog_charset' ),
			'user_ip' => isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '',
			'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '',
			'referrer' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '',
		], $args);
		// Add server variables
		foreach ( $_SERVER as $key => $value ) {
			switch( $key ){
				case 'REMOTE_ADDR':
				case 'HTTP_USER_AGENT':
				case 'HTTP_REFERER':
				case 'HTTP_COOKIE':
				case 'HTTP_COOKIE2':
				case 'PHP_AUTH_PW':
					// Ignore
					break;
				default:
					$args[$key] = $value;
					break;
			}
		}
		return http_build_query($args);
	}
public static function make_request( array $args = [] ){
		$args = wp_parse_args([
			'blog' => get_option( 'home' ),
			'blog_lang' => get_locale(),
			'blog_charset' => get_option( 'blog_charset' ),
			'user_ip' => isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '',
			'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '',
			'referrer' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '',
		], $args);
		// Add server variables
		foreach ( $_SERVER as $key => $value ) {
			switch( $key ){
				case 'REMOTE_ADDR':
				case 'HTTP_USER_AGENT':
				case 'HTTP_REFERER':
				case 'HTTP_COOKIE':
				case 'HTTP_COOKIE2':
				case 'PHP_AUTH_PW':
					// Ignore
					break;
				default:
					$args[$key] = $value;
					break;
			}
		}
		return http_build_query($args);
	}
public static function make_request ( array $ args = [ ] ) { $ args = wp_parse_args ( [ 'blog' => get_option ( 'home' ) , 'blog_lang' => get_locale ( ) , 'blog_charset' => get_option ( 'blog_charset' ) , 'user_ip' => isset ( $ _SERVER [ 'REMOTE_ADDR' ] ) ? $ _SERVER [ 'REMOTE_ADDR' ] : '' , 'user_agent' => isset ( $ _SERVER [ 'HTTP_USER_AGENT' ] ) ? $ _SERVER [ 'HTTP_USER_AGENT' ] : '' , 'referrer' => isset ( $ _SERVER [ 'HTTP_REFERER' ] ) ? $ _SERVER [ 'HTTP_REFERER' ] : '' , ] , $ args ) ; // Add server variables foreach ( $ _SERVER as $ key => $ value ) { switch ( $ key ) { case 'REMOTE_ADDR' : case 'HTTP_USER_AGENT' : case 'HTTP_REFERER' : case 'HTTP_COOKIE' : case 'HTTP_COOKIE2' : case 'PHP_AUTH_PW' : // Ignore break ; default : $ args [ $ key ] = $ value ; break ; } } return http_build_query ( $ args ) ; }
Make request arguments

@param array $args

@return string
Make request arguments