acf_strip_protocol()ACF 5.5.4

This function will remove the proticol from a url Used to allow licenses to remain active if a site is switched to https

No Hooks.

Returns

String.

Usage

acf_strip_protocol( $url );
$url(string) (required)
The URL to strip the protocol from.

Changelog

Since 5.5.4 Introduced.

acf_strip_protocol() code ACF 6.8.8

function acf_strip_protocol( $url ) {

	// strip the protocol
	return str_replace( array( 'http://', 'https://' ), '', $url );
}