wpseek.com
A WordPress-centric search engine for devs and theme authors
is_ssl › WordPress Function
Since2.6.0
Deprecatedn/a
› is_ssl ( No parameters )
| Returns: |
|
| Defined at: |
|
| Codex: | |
| Change Log: |
|
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;
}