wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



is_ssl › WordPress Function

Od2.6.0
Przestarzałyn/a
is_ssl ( Brak parametrów )
Powrót:
  • (bool) True if SSL, otherwise false.
Zdefiniowane na:
Codex:
Dziennik zmian:
  • 4.6.0

Determines if SSL is used.



Powiązane Funkcje: is_single, is_rtl, filter_ssl, is_success, esc_sql

Źródło

function is_ssl() {
	if ( isset( $_SERVER['HTTPS'] ) ) {
		if ( 'on' === strtolower( $_SERVER['HTTPS'] ) ) {
			return true;
		}

		if ( '1' === (string) $_SERVER['HTTPS'] ) {
			return true;
		}
	} elseif ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' === (string) $_SERVER['SERVER_PORT'] ) ) {
		return true;
	}

	return false;
}