filter_SSL

Formats a URL to use https.

Description

(string) filter_SSL( (string) $url ); 

Useful as a filter.

Returns (string)

URL with https as the scheme

Parameters (1)

0. $url (string)
The url.

Usage

  1. if ( !function_exists( 'filter_SSL' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-functions.php'; 
  3.  
  4. // The url. 
  5. $url = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = filter_SSL($url); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/ms-functions.php  
  1. function filter_SSL( $url ) { 
  2. if ( ! is_string( $url ) ) 
  3. return get_bloginfo( 'url' ); // Return home blog url with proper scheme 
  4.  
  5. if ( force_ssl_content() && is_ssl() ) 
  6. $url = set_url_scheme( $url, 'https' ); 
  7.  
  8. return $url;