Used By
| Used By | Description |
|---|---|
| wp-includes/load.php: wp_check_php_mysql_versions() | Check for the required PHP version, and the MySQL extension or a database drop-in. |
| wp-includes/functions.php: status_header() | Set HTTP status header. |
Return the HTTP protocol sent by the server.
(string) The HTTP protocol. Default: HTTP/1.0.
File: wp-includes/load.php
function wp_get_server_protocol() {
$protocol = isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : '';
if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ), true ) ) {
$protocol = 'HTTP/1.0';
}
return $protocol;
} | Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_get_server_protocol