Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




is_ssl [ WordPress Function ]

is_ssl ( No parameters )
Returns:
  • (bool) True if SSL, false if not used.
Defined at:

Soorgelijke functies: is_rtl, is_single, filter_ssl, is_success, esc_sql


Determine if SSL is used.

Source


<?php
function is_ssl() {
    if ( isset(
$_SERVER['HTTPS']) ) {
        if ( 
'on' == strtolower($_SERVER['HTTPS']) )
            return 
true;
        if ( 
'1' == $_SERVER['HTTPS'] )
            return 
true;
    } elseif ( isset(
$_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
        return 
true;
    }
    return 
false;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics