wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



filter_ssl › WordPress Function

Desde2.8.5
Obsoleton/a
filter_ssl ( $url )
Parâmetros:
  • (string) $url URL.
    Required: Yes
Retorna:
  • (string) URL with https as the scheme.
Definido em:
Codex:

Formats a URL to use https.

Useful as a filter.


Fonte

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;
}