function _media_youtube_protocol in Media: YouTube 6
Check if the current request is over HTTPS.
Return value
string 'http://' or 'https://'
7 calls to _media_youtube_protocol()
- emvideo_youtube_thumbnail in providers/
emvideo/ youtube.inc - hook emvideo_PROVIDER_thumbnail returns the external url for a thumbnail of a specific video TODO: make the args: ($video_id, $field, $item), with $field/$item provided if we need it, but otherwise simplifying things
- media_youtube_emfield_data in ./
media_youtube.module - media_youtube_upload_video in includes/
media_youtube.media_mover.inc - Upload a video to YouTube through Media Mover.
- media_youtube_video_url in ./
media_youtube.module - Return the direct URL to this video.
- template_preprocess_media_youtube_default_external in themes/
media_youtube.theme.inc
File
- ./
media_youtube.module, line 611 - Embedded Video Field provider file for YouTube.com.
Code
function _media_youtube_protocol() {
$is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
// Force the use of https if that setting is activated.
return $is_https || media_youtube_variable_get('force_https') ? 'https://' : 'http://';
}