is_lighttpd_before_150() WordPress Function

This function checks if the Lighttpd server is before version 1.5.0.

is_lighttpd_before_150() #

Is the server running earlier than 1.5.0 version of lighttpd?


Return

(bool) Whether the server is running lighttpd < 1.5.0.


Top ↑

Source

File: wp-includes/functions.php

function is_lighttpd_before_150() {
	$server_parts    = explode( '/', isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '' );
	$server_parts[1] = isset( $server_parts[1] ) ? $server_parts[1] : '';

	return ( 'lighttpd' === $server_parts[0] && -1 == version_compare( $server_parts[1], '1.5.0' ) );
}

Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More