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 ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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