wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
filter_ssl › WordPress Function
Od2.8.5
Przestarzałyn/a
› filter_ssl ( $url )
| Parametry: |
|
| Powrót: |
|
| Zdefiniowane na: |
|
| Codex: |
Formats a URL to use https.
Useful as a filter.Źródło
function filter_SSL( $url ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
if ( ! is_string( $url ) ) {
return get_bloginfo( 'url' ); // Return home site URL with proper scheme.
}
if ( force_ssl_content() && is_ssl() ) {
$url = set_url_scheme( $url, 'https' );
}
return $url;
}