You are here

function _twitter_profile_widget_schema_free_link in Twitter Profile Widget 8

Strip 'http://' and 'https://' from a url, and replace it for '//'.

1 call to _twitter_profile_widget_schema_free_link()
_twitter_profile_widget_prepare_tweets in ./twitter_profile_widget.module
Helper to parse Twitter's JSON and return a normalized array of tweets.

File

./twitter_profile_widget.module, line 243
Contains twitter_profile_widget.module.

Code

function _twitter_profile_widget_schema_free_link($url) {
  $schemes = [
    'http://',
    'https://',
  ];
  $url = str_replace($schemes, '//', $url);
  return $url;
}