On this page
filter_SSL( string $url ): string
Formats a URL to use https.
Description
Useful as a filter.
Parameters
$urlstring Required-
URL
Return
string URL with https as the scheme
Source
File: wp-includes/ms-functions.php. View all references
function filter_SSL( $url ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
if ( ! is_string( $url ) ) {
return get_bloginfo( 'url' ); // Return home blog URL with proper scheme.
}
if ( force_ssl_content() && is_ssl() ) {
$url = set_url_scheme( $url, 'https' );
}
return $url;
}
Related
Uses
| Uses | Description |
|---|---|
| set_url_scheme() wp-includes/link-template.php | Sets the scheme for a URL. |
| is_ssl() wp-includes/load.php | Determines if SSL is used. |
| force_ssl_content() wp-includes/ms-functions.php | Determines whether to force SSL on content. |
| get_bloginfo() wp-includes/general-template.php | Retrieves information about the current site. |
Changelog
| Version | Description |
|---|---|
| 2.8.5 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/filter_ssl