function emvideo_fix_src_protocol in Asset 7
We need to make any src or url attribute to be protocol-agnostic to make things work both on http/https.
Parameters
string $source: Source URL or whole iframe tag string.
Return value
string String with replacements of all certain protocols.
1 call to emvideo_fix_src_protocol()
- emvideo_field_formatter_view in modules/
emvideo/ emvideo.module - Implements hook_field_formatter_view().
File
- modules/
emvideo/ emvideo.module, line 155 - Emvideo core module.
Code
function emvideo_fix_src_protocol($source) {
return str_replace(array(
'http://',
'https://',
), '//', $source);
}