wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
is_ssl › WordPress Function
Depuis2.6.0
Dépréciéen/a
› is_ssl ( Pas de paramètres )
| Retourne: |
|
| Défini(e) dans: |
|
| Codex: | |
| Changelog: |
|
Determines if SSL is used.
Source
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;
}