summaryrefslogtreecommitdiffstats
path: root/wp-includes/vars.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
commit30883c26bdceb9eaf32c8d4a1b0c1bce223b5226 (patch)
tree39a02e2aeb21ab5b7923c6f5757d66d55b708912 /wp-includes/vars.php
parentAdding upstream version 6.4.3+dfsg1. (diff)
downloadwordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.tar.xz
wordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.zip
Adding upstream version 6.5+dfsg1.upstream/6.5+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/vars.php')
-rw-r--r--wp-includes/vars.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/wp-includes/vars.php b/wp-includes/vars.php
index dc28b85..a123696 100644
--- a/wp-includes/vars.php
+++ b/wp-includes/vars.php
@@ -17,7 +17,7 @@
global $pagenow,
$is_lynx, $is_gecko, $is_winIE, $is_macIE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $is_IE, $is_edge,
- $is_apache, $is_IIS, $is_iis7, $is_nginx;
+ $is_apache, $is_IIS, $is_iis7, $is_nginx, $is_caddy;
// On which page are we?
if ( is_admin() ) {
@@ -113,35 +113,42 @@ $is_IE = ( $is_macIE || $is_winIE );
// Server detection.
/**
- * Whether the server software is Apache or something else
+ * Whether the server software is Apache or something else.
*
* @global bool $is_apache
*/
$is_apache = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) || str_contains( $_SERVER['SERVER_SOFTWARE'], 'LiteSpeed' ) );
/**
- * Whether the server software is Nginx or something else
+ * Whether the server software is Nginx or something else.
*
* @global bool $is_nginx
*/
$is_nginx = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'nginx' ) );
/**
- * Whether the server software is IIS or something else
+ * Whether the server software is Caddy or something else.
+ *
+ * @global bool $is_caddy
+ */
+$is_caddy = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'Caddy' ) );
+
+/**
+ * Whether the server software is IIS or something else.
*
* @global bool $is_IIS
*/
$is_IIS = ! $is_apache && ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) || str_contains( $_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer' ) );
/**
- * Whether the server software is IIS 7.X or greater
+ * Whether the server software is IIS 7.X or greater.
*
* @global bool $is_iis7
*/
$is_iis7 = $is_IIS && (int) substr( $_SERVER['SERVER_SOFTWARE'], strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/' ) + 14 ) >= 7;
/**
- * Test if the current browser runs on a mobile device (smart phone, tablet, etc.)
+ * Test if the current browser runs on a mobile device (smart phone, tablet, etc.).
*
* @since 3.4.0
* @since 6.4.0 Added checking for the Sec-CH-UA-Mobile request header.