We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c62f232 + b14a0d3 commit e583f40Copy full SHA for e583f40
php/wp-cli.php
@@ -19,7 +19,7 @@
19
20
// Set common headers, to prevent warnings from plugins.
21
$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';
22
-$_SERVER['HTTP_USER_AGENT'] = '';
+$_SERVER['HTTP_USER_AGENT'] = ( ! empty( getenv( 'WP_CLI_USER_AGENT' ) ) ? getenv( 'WP_CLI_USER_AGENT' ) : 'WP CLI ' . WP_CLI_VERSION );
23
$_SERVER['REQUEST_METHOD'] = 'GET';
24
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
25
0 commit comments