Switch language

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




filter_ssl [ WordPress Function ]

filter_ssl ( $url )
Defined at:



Formats an String URL to use HTTPS if HTTP is found.

Useful as a filter.

Source


<?php
function filter_SSL$url ) {
    if ( !
is_string$url ) )
        return 
get_bloginfo'url' ); //return home blog url with proper scheme

    
$arrURL parse_url$url );

    if ( 
force_ssl_content() && is_ssl() ) {
        if ( 
'http' === $arrURL['scheme'] )
            
$url str_replace$arrURL['scheme'], 'https'$url );
    }

    return 
$url;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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