acf_strip_protocol()
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() acf strip protocol code ACF 6.8.8
function acf_strip_protocol( $url ) {
// strip the protocol
return str_replace( array( 'http://', 'https://' ), '', $url );
}